Skip to content

Commit

Permalink
Fixes bugs in vt and telegram
Browse files Browse the repository at this point in the history
  • Loading branch information
Te-k committed Nov 18, 2018
1 parent e30e9a5 commit 020d967
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
6 changes: 6 additions & 0 deletions harpoon/commands/telegram.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,12 @@ def run(self, conf, args, plugins):
", ".join([str(a) for a in msg.action.users])
)
)
elif isinstance(msg.action, telethon.tl.types.MessageActionChatDeleteUser):
print("[%s] Remove User from the chat - %i" % (
msg.date.isoformat(),
msg.action.user_id
)
)
else:
print("[%s] Message Service: %s" % (
msg.date.isoformat(),
Expand Down
10 changes: 6 additions & 4 deletions harpoon/commands/vt.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,10 @@ def print_file(self, response):
print("[+] MD5: %s" % response["results"]["md5"])
print("[+] SHA1: %s" % response["results"]["sha1"])
print("[+] SHA256: %s" % response["results"]["sha256"])
print("[+] First Seen: %s" % response["results"]["first_seen"])
print("[+] Last Seen: %s" % response["results"]["last_seen"])
if "first_seen" in response['results']:
print("[+] First Seen: %s" % response["results"]["first_seen"])
if "last_seen" in response['results']:
print("[+] Last Seen: %s" % response["results"]["last_seen"])
print("[+] Link: %s" % response["results"]["permalink"])

def run(self, conf, args, plugins):
Expand Down Expand Up @@ -239,7 +241,7 @@ def run(self, conf, args, plugins):
res = vt.get_ip_report(unbracket(d.strip()))
print(json.dumps(res, sort_keys=False, indent=4))
elif args.subcommand == "domain":
res = vt.get_domain_report(args.DOMAIN)
res = vt.get_domain_report(unbracket(args.DOMAIN))
if args.json:
print(json.dumps(res, sort_keys=False, indent=4))
else:
Expand Down Expand Up @@ -301,7 +303,7 @@ def run(self, conf, args, plugins):
else:
print("%s;Not found;;;" % h)
elif args.subcommand == "domain":
res = vt.get_domain_report(args.DOMAIN)
res = vt.get_domain_report(unbracket(args.DOMAIN))
if args.json:
print(json.dumps(res, sort_keys=False, indent=4))
else:
Expand Down

0 comments on commit 020d967

Please sign in to comment.