From a42ac1a361b18d3d1e6622efea9d9dba4f06e4c2 Mon Sep 17 00:00:00 2001 From: epi052 Date: Fri, 18 Oct 2019 09:29:05 -0500 Subject: [PATCH] added logic to only run amass when TargetFile returns .domains file --- recon/amass.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/recon/amass.py b/recon/amass.py index 6580892..37e7c76 100644 --- a/recon/amass.py +++ b/recon/amass.py @@ -51,6 +51,9 @@ class AmassScan(ExternalProgramTask): Returns: 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 = [ "amass", "enum", @@ -149,9 +152,7 @@ class ParseAmassOutput(luigi.Task): ipaddr = address.get("ip") if isinstance(ipaddress.ip_address(ipaddr), ipaddress.IPv4Address): # ipv4 addr unique_ips.add(ipaddr) - elif isinstance( - ipaddress.ip_address(ipaddr), ipaddress.IPv6Address - ): # ipv6 addr + elif isinstance(ipaddress.ip_address(ipaddr), ipaddress.IPv6Address): # ipv6 unique_ip6s.add(ipaddr) # send gathered results to their appropriate destination