added CORScannerScan; added related tool_path config; added web ports to nmap scans

This commit is contained in:
epi052
2019-10-20 13:17:05 -05:00
parent bf748c5e4a
commit 0b45b6e2ad
4 changed files with 99 additions and 8 deletions

View File

@@ -102,16 +102,12 @@ class ThreadedNmap(luigi.Task):
"""
for target, protocol_dict in ip_dict.items():
for protocol, ports in protocol_dict.items():
non_web_ports = ",".join(ports.difference(web_ports))
if not non_web_ports:
continue
tmp_cmd = nmap_command[:]
tmp_cmd[2] = "-sT" if protocol == "tcp" else "-sU"
# arg to -oA, will drop into subdir off curdir
tmp_cmd[9] = non_web_ports
tmp_cmd[9] = ",".join(ports)
tmp_cmd.append(f"{self.output().path}/nmap.{target}-{protocol}")
tmp_cmd.append(target) # target as final arg to nmap
@@ -177,7 +173,7 @@ class Searchsploit(luigi.Task):
Returns:
luigi.local_target.LocalTarget
"""
return luigi.LocalTarget(f"{self.target_file}-searchsploit-results")
return luigi.LocalTarget(f"searchsploit-{self.target_file}-results")
def run(self):
""" Grabs the xml files created by ThreadedNmap and runs searchsploit --nmap on each one, saving the output. """