Skip to content

Commit

Permalink
Update dead_connect.py
Browse files Browse the repository at this point in the history
  • Loading branch information
doomedraven committed Dec 4, 2023
1 parent 0187476 commit 02e1633
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/signatures/dead_connect.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ def on_complete(self):

for deadip in self.connections:
ip = deadip.split(":")[0]
if "hosts" in self.results["network"]:
hostdata = next((i for i in self.results["network"]["hosts"] if i["ip"] == ip), None)
if "hosts" in self.results.get("network", {}):
hostdata = next((i for i in self.results.get("network", {}).get("hosts", {}) if i["ip"] == ip), None)
if hostdata:
self.data.append({"IP": "{0} ({1})".format(deadip, hostdata["country_name"])})
else:
Expand Down

0 comments on commit 02e1633

Please sign in to comment.