Testing new dig function

This commit is contained in:
Benjamyn Love 2017-08-12 21:37:28 +10:00
parent e6ea289d18
commit 0de1da57be

View File

@ -143,6 +143,17 @@ def dig(inDomain, record):
iterate(test, record) iterate(test, record)
return test return test
def newdig(inDomain, record):
try:
dig = subprocess.check_output(["dig", record, "+short", inDomain])
except Exception as e:
dig = "error"
print str(e)
print "========================================================"
test = dig.split("\n")
#iterate(test, record)
return test, record
def ipLookup(inDomain): def ipLookup(inDomain):
host = "N/A" host = "N/A"
ipLook = subprocess.check_output(["geoiplookup", inDomain]) ipLook = subprocess.check_output(["geoiplookup", inDomain])