Compare commits

..

No commits in common. "master" and "testing" have entirely different histories.

View File

@ -1,4 +1,3 @@
#!/usr/bin/python2.7
import subprocess
import re # YAY REVERSE ENGINEER... wait its just regex
import readline
@ -148,15 +147,11 @@ def iterate(inArray, pre):
def iterateMX(inArray, pre):
global inInput
count = 0
while count != len(inArray) - 1:
tmp = inArray[count].split(' ')
if (len(tmp) == 1):
pass
else:
tmpVal = isCNAME(tmp[1])
print indent + bcolors.CYAN + pre, bcolors.GREEN + inArray[count] + bcolors.RESET + " -> " + bcolors.GREEN + tmpVal[0] + bcolors.RESET
tmpVal = isCNAME(tmp[1])
print indent + bcolors.CYAN + pre, bcolors.GREEN + inArray[count] + bcolors.RESET + " -> " + bcolors.GREEN + tmpVal[0] + bcolors.RESET
count = count + 1
def parseWhois(whioisInfo):
@ -198,7 +193,7 @@ def dig(inDomain, record):
dig = subprocess.check_output(["dig", record, "+short", inDomain])
except Exception as e:
dig = "error"
#print str(e)
print str(e)
print "========================================================"
test = dig.split("\n")
iterate(test, record)
@ -209,7 +204,7 @@ def newdig(inDomain, record, sub=""):
dig = subprocess.check_output(["dig", record, "+short", inDomain])
except Exception as e:
dig = "error"
#print str(e)
print str(e)
#print "========================================================"
test = dig.split("\n")
#iterate(test, record)
@ -242,12 +237,9 @@ def getInput():
if inInput == "quit":
running = 0
def isCNAME(CNAME, DOMAIN=""):
if (DOMAIN == CNAME):
return 0
else:
retval = newdig(CNAME, "A")
return retval[0]
def isCNAME(CNAME):
retval = newdig(CNAME, "A")
return retval[0]
#Main Loop
@ -288,4 +280,4 @@ while running == 1:
else:
dnsRec, dnsType, blank = newdig(inInput, rec)
iterate(dnsRec, dnsType)
print '\n'
print '\n'