Made whois less intrusive
This commit is contained in:
parent
ca5b11186b
commit
245e98d8b8
15
HTTPy.py
15
HTTPy.py
@ -108,17 +108,16 @@ def whois(inDomain):
|
|||||||
|
|
||||||
def dig(inDomain, record):
|
def dig(inDomain, record):
|
||||||
dig = subprocess.check_output(["dig", record, "+short", inDomain])
|
dig = subprocess.check_output(["dig", record, "+short", inDomain])
|
||||||
print "========================================================" #ADD REST OF DIGS
|
print "========================================================"
|
||||||
test = dig.split("\n")
|
test = dig.split("\n")
|
||||||
#print record, test[0]
|
iterate(test, record)
|
||||||
iterate(test, record) #fix up mutiple record types...
|
|
||||||
return test
|
return test
|
||||||
|
|
||||||
def ipLookup(inDomain):
|
def ipLookup(inDomain):
|
||||||
host = "N/A"
|
host = "N/A"
|
||||||
ipLook = subprocess.check_output(["geoiplookup", inDomain])
|
ipLook = subprocess.check_output(["geoiplookup", inDomain])
|
||||||
try:
|
try:
|
||||||
host = subprocess.check_output(["host", inDomain]) #Do exit status check...
|
host = subprocess.check_output(["host", inDomain])
|
||||||
returncode = 0
|
returncode = 0
|
||||||
except subprocess.CalledProcessError as e:
|
except subprocess.CalledProcessError as e:
|
||||||
output = e.output
|
output = e.output
|
||||||
@ -156,13 +155,11 @@ while running == 1:
|
|||||||
print "========================================================"
|
print "========================================================"
|
||||||
ipPing(inInput)
|
ipPing(inInput)
|
||||||
else:
|
else:
|
||||||
pass
|
if whoOn == "W":
|
||||||
|
whois(inInput)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
if whoOn == "W":
|
|
||||||
whois(inInput)
|
|
||||||
else:
|
|
||||||
pass
|
|
||||||
#Condense dig calls
|
#Condense dig calls
|
||||||
dig(inInput, "A")
|
dig(inInput, "A")
|
||||||
dig(inInput, "MX")
|
dig(inInput, "MX")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user