|
12 | 12 | } |
13 | 13 | ############################################################################### |
14 | 14 | # Created by: Alan Orlikoski |
15 | | -cdqr_version = "CDQR Version: 4.1.9" |
| 15 | +cdqr_version = "CDQR Version: 4.2.0" |
16 | 16 | # |
17 | 17 | ############################################################################### |
18 | 18 | # Global Variables |
@@ -1554,7 +1554,7 @@ def main(): |
1554 | 1554 | parser.add_argument('-z',action='store_true', default=False, help='Indicates the input file is a zip file and needs to be decompressed') |
1555 | 1555 | parser.add_argument('--no_dependencies_check',action='store_false', default=True, help='Re-enables the log2timeline the dependencies check. It is skipped by default') |
1556 | 1556 | parser.add_argument('-v','--version', action='version', version=cdqr_version) |
1557 | | - |
| 1557 | + parser.add_argument('-f', nargs=1, action="store", help='Include a filter file to filter log2timeline output. List of files to include for targeted collection of files to parse, one line per file path') |
1558 | 1558 | args=parser.parse_args() |
1559 | 1559 |
|
1560 | 1560 | # List to help with logging |
@@ -1628,6 +1628,22 @@ def main(): |
1628 | 1628 | print("Number of cpu cores to use: "+str(num_cpus)) |
1629 | 1629 | log_list.append("Number of cpu cores to use: "+str(num_cpus)+"\n") |
1630 | 1630 |
|
| 1631 | + # Set filter file location |
| 1632 | + if args.f: |
| 1633 | + filter_file_loc = args.f[0] |
| 1634 | + filter_file_loc = filter_file_loc.replace("\\\\","/").replace("\\","/").rstrip("/") |
| 1635 | + if filter_file_loc.count("/") > 1: |
| 1636 | + filter_file_loc = filter_file_loc.rstrip("/") |
| 1637 | + |
| 1638 | + if not os.path.exists(filter_file_loc): |
| 1639 | + print("ERROR: \""+filter_file_loc+"\" cannot be found by the system. Please verify command.") |
| 1640 | + print("Exiting...") |
| 1641 | + sys.exit(1) |
| 1642 | + command1.append("-f") |
| 1643 | + command1.append(filter_file_loc) |
| 1644 | + print("Filter file being used is: " + filter_file_loc) |
| 1645 | + log_list.append("Filter file to use is: " + filter_file_loc) |
| 1646 | + |
1631 | 1647 | # Set source location/file |
1632 | 1648 | src_loc = args.src_location[0] |
1633 | 1649 | src_loc = src_loc.replace("\\\\","/").replace("\\","/").rstrip("/") |
|
0 commit comments