Skip to content

Commit

Permalink
fix internetdb bug
Browse files Browse the repository at this point in the history
  • Loading branch information
TheTechromancer committed Feb 5, 2024
1 parent 15f4f48 commit 5963173
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bbot/modules/internetdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ def get_ip(self, event):
elif event.type == "DNS_NAME":
# always try IPv4 first
ipv6 = []
ips = [self.helpers.make_ip_type(h) for h in event.resolved_hosts if self.helpers.is_ip(h)]
for ip in sorted(ips):
ips = [h for h in event.resolved_hosts if self.helpers.is_ip(h)]
for ip in sorted([str(ip) for ip in ips]):
if self.helpers.is_ip(ip, version=4):
return ip
elif self.helpers.is_ip(ip, version=6):
Expand Down

0 comments on commit 5963173

Please sign in to comment.