mirror of
https://github.com/aljazceru/recon-pipeline.git
synced 2025-12-19 23:34:27 +01:00
added logic to only run amass when TargetFile returns .domains file
This commit is contained in:
@@ -51,6 +51,9 @@ class AmassScan(ExternalProgramTask):
|
|||||||
Returns:
|
Returns:
|
||||||
list: list of options/arguments, beginning with the name of the executable to run
|
list: list of options/arguments, beginning with the name of the executable to run
|
||||||
"""
|
"""
|
||||||
|
if not self.input().path.endswith("domains"):
|
||||||
|
return f"touch {self.output().path}".split()
|
||||||
|
|
||||||
command = [
|
command = [
|
||||||
"amass",
|
"amass",
|
||||||
"enum",
|
"enum",
|
||||||
@@ -149,9 +152,7 @@ class ParseAmassOutput(luigi.Task):
|
|||||||
ipaddr = address.get("ip")
|
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)
|
unique_ips.add(ipaddr)
|
||||||
elif isinstance(
|
elif isinstance(ipaddress.ip_address(ipaddr), ipaddress.IPv6Address): # ipv6
|
||||||
ipaddress.ip_address(ipaddr), ipaddress.IPv6Address
|
|
||||||
): # ipv6 addr
|
|
||||||
unique_ip6s.add(ipaddr)
|
unique_ip6s.add(ipaddr)
|
||||||
|
|
||||||
# send gathered results to their appropriate destination
|
# send gathered results to their appropriate destination
|
||||||
|
|||||||
Reference in New Issue
Block a user