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))