bugfix: initial pathing of results_dir and nmap indexing

This commit is contained in:
epi052
2020-01-25 07:11:41 -06:00
parent 234fe5e639
commit 82653674dd
4 changed files with 14 additions and 10 deletions

View File

@@ -110,7 +110,7 @@ class ThreadedNmapScan(luigi.Task):
tmp_cmd[2] = "-sT" if protocol == "tcp" else "-sU"
# arg to -oA, will drop into subdir off curdir
tmp_cmd[9] = ",".join(ports)
tmp_cmd[10] = ",".join(ports)
tmp_cmd.append(f"{self.output().path}/nmap.{target}-{protocol}")
tmp_cmd.append(target) # target as final arg to nmap
@@ -121,6 +121,7 @@ class ThreadedNmapScan(luigi.Task):
Path(self.output().path).mkdir(parents=True, exist_ok=True)
with concurrent.futures.ThreadPoolExecutor(max_workers=self.threads) as executor:
executor.map(subprocess.run, commands)