From cd6cf6fab36e2ead99be8a6db321e8a108e204e6 Mon Sep 17 00:00:00 2001 From: phalanx8 <41516795+phalanx8@users.noreply.github.com> Date: Sat, 23 Jan 2021 17:21:23 +0000 Subject: [PATCH] Fixed Syntax error Replaced else: on line 40 with an if statement --- GetHostNames.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/GetHostNames.py b/GetHostNames.py index 5fffe02..a2b1fc8 100644 --- a/GetHostNames.py +++ b/GetHostNames.py @@ -15,6 +15,7 @@ domain = sys.argv[1] hosts = [] m = MaltegoTransform() +found = False try: @@ -37,7 +38,8 @@ hostname = i.split(',')[0] ipaddress = i.split(',')[1] m.addEntity('maltego.DNSName', hostname) - else: + found = True + if not(found): m.addUIMessage("No results found from Host Search") except Exception as e: m.addUIMessage(str(e))