mirror of
https://github.com/aljazceru/recon-pipeline.git
synced 2025-12-22 08:44:22 +01:00
Add scan tests (#12) - tests of current codebase complete
* 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
This commit is contained in:
@@ -171,9 +171,7 @@ class ParseAmassOutput(luigi.Task):
|
||||
unique_ip6s = set()
|
||||
unique_subs = set()
|
||||
|
||||
Path(self.output().get("target-ips").path).parent.mkdir(
|
||||
parents=True, exist_ok=True
|
||||
)
|
||||
Path(self.output().get("target-ips").path).parent.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
amass_json = self.input().open()
|
||||
ip_file = self.output().get("target-ips").open("w")
|
||||
@@ -187,13 +185,9 @@ class ParseAmassOutput(luigi.Task):
|
||||
|
||||
for address in entry.get("addresses"):
|
||||
ipaddr = address.get("ip")
|
||||
if isinstance(
|
||||
ipaddress.ip_address(ipaddr), ipaddress.IPv4Address
|
||||
): # ipv4 addr
|
||||
if isinstance(ipaddress.ip_address(ipaddr), ipaddress.IPv4Address): # ipv4 addr
|
||||
unique_ips.add(ipaddr)
|
||||
elif isinstance(
|
||||
ipaddress.ip_address(ipaddr), ipaddress.IPv6Address
|
||||
): # ipv6
|
||||
elif isinstance(ipaddress.ip_address(ipaddr), ipaddress.IPv6Address): # ipv6
|
||||
unique_ip6s.add(ipaddr)
|
||||
|
||||
# send gathered results to their appropriate destination
|
||||
|
||||
Reference in New Issue
Block a user