mirror of
https://github.com/aljazceru/recon-pipeline.git
synced 2025-12-21 16:24:26 +01:00
added searchsploit to installable tools (#25)
* added searchsploit to installable tools * formatted with black
This commit is contained in:
@@ -30,7 +30,20 @@ tools = {
|
||||
"seclists": {
|
||||
"installed": False,
|
||||
"dependencies": None,
|
||||
"commands": [f"git clone https://github.com/danielmiessler/SecLists.git {defaults.get('tools-dir')}/seclists"],
|
||||
"shell": True,
|
||||
"commands": [
|
||||
f"bash -c 'if [[ -d {defaults.get('tools-dir')}/seclists ]] ; then cd {defaults.get('tools-dir')}/seclists && git fetch --all && git pull; else git clone https://github.com/danielmiessler/SecLists.git {defaults.get('tools-dir')}/seclists; fi'"
|
||||
],
|
||||
},
|
||||
"searchsploit": {
|
||||
"installed": False,
|
||||
"dependencies": None,
|
||||
"shell": True,
|
||||
"commands": [
|
||||
f"bash -c 'if [[ -d {Path(tool_paths.get('searchsploit')).parent} ]] ; then cd {Path(tool_paths.get('searchsploit')).parent} && git fetch --all && git pull; else git clone https://github.com/offensive-security/exploitdb.git {defaults.get('tools-dir')}/exploitdb; fi'",
|
||||
f"cp -n {Path(tool_paths.get('searchsploit')).parent}/.searchsploit_rc {Path.home().resolve()}",
|
||||
f"sed -i 's#/opt#{defaults.get('tools-dir')}#g' {Path.home().resolve()}/.searchsploit_rc",
|
||||
],
|
||||
},
|
||||
"masscan": {
|
||||
"installed": False,
|
||||
|
||||
@@ -29,7 +29,8 @@ tool_paths = {
|
||||
"webanalyze": f"{Path.home()}/go/bin/webanalyze",
|
||||
"masscan": f"{defaults.get('tools-dir')}/masscan",
|
||||
"amass": f"{defaults.get('tools-dir')}/amass",
|
||||
"go": "/usr/local/go/bin/go"
|
||||
"go": "/usr/local/go/bin/go",
|
||||
"searchsploit": f"{defaults.get('tools-dir')}/exploitdb/searchsploit"
|
||||
}
|
||||
|
||||
top_tcp_ports = [
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user