added searchsploit to installable tools (#25)

* added searchsploit to installable tools

* formatted with black
This commit is contained in:
epi052
2020-02-22 12:20:13 -06:00
committed by GitHub
parent 6613ab69a9
commit ff801dfc6b
3 changed files with 18 additions and 4 deletions

View File

@@ -7,8 +7,8 @@ from pathlib import Path
import luigi
from luigi.util import inherits
from recon.config import defaults
from recon.masscan import ParseMasscanOutput
from recon.config import defaults, tool_paths
@inherits(ParseMasscanOutput)
@@ -200,7 +200,7 @@ class SearchsploitScan(luigi.Task):
def run(self):
""" Grabs the xml files created by ThreadedNmap and runs searchsploit --nmap on each one, saving the output. """
for entry in Path(self.input().path).glob("nmap*.xml"):
proc = subprocess.run(["searchsploit", "--nmap", str(entry)], stderr=subprocess.PIPE)
proc = subprocess.run([tool_paths.get("searchsploit"), "--nmap", str(entry)], stderr=subprocess.PIPE)
if proc.stderr:
Path(self.output().path).mkdir(parents=True, exist_ok=True)