diff --git a/HTTPy.py b/HTTPy.py index 1137f08..4c1a251 100755 --- a/HTTPy.py +++ b/HTTPy.py @@ -108,17 +108,16 @@ def whois(inDomain): def dig(inDomain, record): dig = subprocess.check_output(["dig", record, "+short", inDomain]) - print "========================================================" #ADD REST OF DIGS + print "========================================================" test = dig.split("\n") - #print record, test[0] - iterate(test, record) #fix up mutiple record types... + iterate(test, record) return test def ipLookup(inDomain): host = "N/A" ipLook = subprocess.check_output(["geoiplookup", inDomain]) try: - host = subprocess.check_output(["host", inDomain]) #Do exit status check... + host = subprocess.check_output(["host", inDomain]) returncode = 0 except subprocess.CalledProcessError as e: output = e.output @@ -156,13 +155,11 @@ while running == 1: print "========================================================" ipPing(inInput) else: - pass + if whoOn == "W": + whois(inInput) else: - if whoOn == "W": - whois(inInput) - else: - pass + #Condense dig calls dig(inInput, "A") dig(inInput, "MX")