From cefd670a9a800aa592227e44f516107327f2df8a Mon Sep 17 00:00:00 2001 From: Tek Date: Tue, 15 Dec 2020 19:34:39 +0100 Subject: [PATCH] Fixes issue in zetalytics --- harpoon/commands/urlhaus.py | 2 +- harpoon/commands/zetalyticsc.py | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/harpoon/commands/urlhaus.py b/harpoon/commands/urlhaus.py index 06e48d7..4362b91 100644 --- a/harpoon/commands/urlhaus.py +++ b/harpoon/commands/urlhaus.py @@ -95,7 +95,7 @@ def run(self, conf, args, plugins): def intel(self, type, query, data, conf): if type in ["domain", "ip"]: - print("[+] Downloading URLHaus information...") + print("[+] Checking URLHaus...") try: urlhaus = UrlHaus(conf["UrlHaus"]["key"]) res = urlhaus.get_host(query) diff --git a/harpoon/commands/zetalyticsc.py b/harpoon/commands/zetalyticsc.py index b605ae2..1aaaa1d 100644 --- a/harpoon/commands/zetalyticsc.py +++ b/harpoon/commands/zetalyticsc.py @@ -124,7 +124,7 @@ def run(self, conf, args, plugins): else: for r in res['results']: print("{:12}{:35} {:20} {}".format( - r['last_seen'], + r['last_seen'] if "last_seen" in r else "", r['qname'], r['domain'], r['value'] @@ -139,7 +139,7 @@ def run(self, conf, args, plugins): else: for r in res['results']: print("{:12} {:30} {}".format( - r['last_seen'], + r['last_seen'] if "last_seen" in r else "", r['qname'], r['value'] )) @@ -153,7 +153,7 @@ def run(self, conf, args, plugins): else: for r in res['results']: print("{:12} {:30} {}".format( - r['last_seen'], + r['last_seen'] if "last_seen" in r else "", r['qname'], r['value'] )) @@ -170,7 +170,7 @@ def run(self, conf, args, plugins): else: for r in res['results']: print("{:12} {:30} {}".format( - r['last_seen'], + r['last_seen'] if "last_seen" in r else "", r['qname'], r['value'] )) @@ -289,7 +289,7 @@ def run(self, conf, args, plugins): for r in res['results']: print("{} - {} - {}".format( r['date'], - r['last_seen'], + r['last_seen'] if "last_seen" in r else "", r['qname'] )) elif args.subcommand == "ip2malwaredns": @@ -340,5 +340,5 @@ def intel(self, type, query, data, conf): "domain": domain["qname"], "source": "Zetalytics", "first": parse(domain['date']).astimezone(pytz.utc), - "last": parse(domain['last_seen']).astimezone(pytz.utc), + "last": parse(domain['last_seen']).astimezone(pytz.utc) if "last_seen" in domain else None, })