Made whois less intrusive

This commit is contained in:
Benjamyn Love 2017-07-26 18:36:03 +10:00
parent ca5b11186b
commit 245e98d8b8

View File

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