Skip to content

Commit

Permalink
Fixes issue in zetalytics
Browse files Browse the repository at this point in the history
  • Loading branch information
Te-k committed Dec 15, 2020
1 parent 1b4301b commit cefd670
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion harpoon/commands/urlhaus.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
12 changes: 6 additions & 6 deletions harpoon/commands/zetalyticsc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand All @@ -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']
))
Expand All @@ -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']
))
Expand All @@ -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']
))
Expand Down Expand Up @@ -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":
Expand Down Expand Up @@ -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,
})

0 comments on commit cefd670

Please sign in to comment.