kinda working shits broke though
This commit is contained in:
parent
927cdeb86d
commit
dc5769a819
21
HTTPy.py
21
HTTPy.py
@ -143,12 +143,12 @@ def iterate(inArray, pre):
|
|||||||
else:
|
else:
|
||||||
if checkIfIP(inArray[count].split('.')) == 0:
|
if checkIfIP(inArray[count].split('.')) == 0:
|
||||||
tmpVal = isCNAME(inArray[count])
|
tmpVal = isCNAME(inArray[count])
|
||||||
recordDict[pre] = inArray[count], tmpVal[0]
|
recordDict[pre] = pre, inArray[count], tmpVal[0]
|
||||||
#recordDict[pre] = indent + bcolors.CYAN + pre, bcolors.GREEN + inArray[count] + bcolors.RESET + " -> " + bcolors.GREEN + tmpVal[0] + bcolors.RESET
|
#recordDict[pre] = indent + bcolors.CYAN + pre, bcolors.GREEN + inArray[count] + bcolors.RESET + " -> " + bcolors.GREEN + tmpVal[0] + bcolors.RESET
|
||||||
|
|
||||||
#print indent + bcolors.CYAN + pre, bcolors.GREEN + inArray[count] + bcolors.RESET + " -> " + bcolors.GREEN + tmpVal[0] + bcolors.RESET
|
#print indent + bcolors.CYAN + pre, bcolors.GREEN + inArray[count] + bcolors.RESET + " -> " + bcolors.GREEN + tmpVal[0] + bcolors.RESET
|
||||||
else:
|
else:
|
||||||
recordDict[pre] = inArray[count]
|
recordDict[pre] = pre, inArray[count]
|
||||||
#recordDict[pre] = indent + bcolors.CYAN + pre, bcolors.GREEN + inArray[count] + bcolors.RESET
|
#recordDict[pre] = indent + bcolors.CYAN + pre, bcolors.GREEN + inArray[count] + bcolors.RESET
|
||||||
#print indent + bcolors.CYAN + pre, bcolors.GREEN + inArray[count] + bcolors.RESET
|
#print indent + bcolors.CYAN + pre, bcolors.GREEN + inArray[count] + bcolors.RESET
|
||||||
count = count + 1
|
count = count + 1
|
||||||
@ -256,6 +256,18 @@ def isCNAME(CNAME, DOMAIN=""):
|
|||||||
retval = newdig(CNAME, "A")
|
retval = newdig(CNAME, "A")
|
||||||
return retval[0]
|
return retval[0]
|
||||||
|
|
||||||
|
def printDict(dictionary):
|
||||||
|
#for item in dictionary:
|
||||||
|
for item in sorted(dictionary.iterkeys()):
|
||||||
|
#print item
|
||||||
|
#if len(dictionary[item]) == 2:
|
||||||
|
# print indent + bcolors.CYAN + item, bcolors.GREEN + dictionary[item][1] + bcolors.RESET
|
||||||
|
#else:
|
||||||
|
# print indent + bcolors.CYAN + item, bcolors.GREEN + dictionary[item][1] + bcolors.RESET + " -> " + bcolors.GREEN + dictionary[item][2] + bcolors.RESET
|
||||||
|
pass
|
||||||
|
for key in sorted(dictionary.iterkeys()):
|
||||||
|
print "%s:" % (key)
|
||||||
|
|
||||||
|
|
||||||
#Main Loop
|
#Main Loop
|
||||||
testFile = openFile(os.path.expanduser('~/.httpy'))
|
testFile = openFile(os.path.expanduser('~/.httpy'))
|
||||||
@ -296,6 +308,7 @@ while running == 1:
|
|||||||
dnsRec, dnsType, blank = newdig(inInput, rec)
|
dnsRec, dnsType, blank = newdig(inInput, rec)
|
||||||
iterate(dnsRec, dnsType)
|
iterate(dnsRec, dnsType)
|
||||||
#pprint(recordDict)
|
#pprint(recordDict)
|
||||||
for data in recordDict:
|
#for data in recordDict:
|
||||||
print recordDict[data]
|
# print recordDict[data]
|
||||||
|
printDict(recordDict)
|
||||||
print '\n'
|
print '\n'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user