mirror of
https://github.com/aljazceru/recon-pipeline.git
synced 2025-12-18 23:04:21 +01:00
* recon.targets tests added * restructured tests logically * fixed yaml error * fixed job names * recon.__init__ tests added * recon.config tests added * recon.amass.ParseAmassScan tests added * fixed test destined to fail on CI pipeline * testing amass partially complete * Changed the dir layout (#6) and fixed paths (#8) this commit closes #6 and #8 updated existing tests to utilize new paths * tests of current codebase complete * added is_kali check to searchsploit test * added test_web action to pipeline
39 lines
1.1 KiB
Python
39 lines
1.1 KiB
Python
from pathlib import Path
|
|
from recon.nmap import ThreadedNmapScan, SearchsploitScan
|
|
|
|
import luigi
|
|
|
|
from ..utils import is_kali
|
|
|
|
tfp = "../data/bitdiscovery"
|
|
tf = Path(tfp).stem
|
|
el = "../data/blacklist"
|
|
rd = "../data/recon-results"
|
|
|
|
nmap_results = Path(__file__).parent.parent / "data" / "recon-results" / "nmap-results"
|
|
|
|
|
|
def test_nmap_output_location(tmp_path):
|
|
tns = ThreadedNmapScan(target_file=tf, exempt_list=el, results_dir=str(tmp_path), top_ports=100)
|
|
|
|
assert tns.output().path == str(Path(tmp_path) / "nmap-results")
|
|
|
|
|
|
def test_searchsploit_output_location(tmp_path):
|
|
sss = SearchsploitScan(target_file=tf, exempt_list=el, results_dir=str(tmp_path), top_ports=100)
|
|
|
|
assert sss.output().path == str(Path(tmp_path) / "searchsploit-results")
|
|
|
|
|
|
def test_searchsploit_produces_results(tmp_path):
|
|
sss = SearchsploitScan(target_file=tf, exempt_list=el, results_dir=str(tmp_path), top_ports=100)
|
|
|
|
sss.input = lambda: luigi.LocalTarget(nmap_results)
|
|
|
|
if not is_kali():
|
|
return True
|
|
|
|
sss.run()
|
|
|
|
assert len([x for x in Path(sss.output().path).glob("searchsploit*.txt")]) > 0
|