diff --git a/.HTTPy.py.swp b/.HTTPy.py.swp new file mode 100644 index 0000000..dc573ba Binary files /dev/null and b/.HTTPy.py.swp differ diff --git a/HTTPy.py b/HTTPy.py index 6e9f102..77ab11b 100755 --- a/HTTPy.py +++ b/HTTPy.py @@ -3,8 +3,11 @@ import subprocess import re # YAY REVERSE ENGINEER... wait its just regex import readline import os +from pprint import pprint #Made this work with linux magic, test +recordDict = {} + #Define Colours class bcolors: RED = "\033[1;31m" @@ -23,7 +26,7 @@ running = 1 pingOn = "p" whoOn = "W" phrases = ["ping", "whois", "quit", "clear", "help", "nameserver"] -indent = '> ' +indent = '~ ' def openFile(filename): try: @@ -140,10 +143,14 @@ def iterate(inArray, pre): else: if checkIfIP(inArray[count].split('.')) == 0: tmpVal = isCNAME(inArray[count]) - - print indent + bcolors.CYAN + pre, bcolors.GREEN + inArray[count] + bcolors.RESET + " -> " + bcolors.GREEN + tmpVal[0] + bcolors.RESET + recordDict[pre] = inArray[count], tmpVal[0] + #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 else: - print indent + bcolors.CYAN + pre, bcolors.GREEN + inArray[count] + bcolors.RESET + recordDict[pre] = inArray[count] + #recordDict[pre] = indent + bcolors.CYAN + pre, bcolors.GREEN + inArray[count] + bcolors.RESET + #print indent + bcolors.CYAN + pre, bcolors.GREEN + inArray[count] + bcolors.RESET count = count + 1 @@ -288,4 +295,7 @@ while running == 1: else: dnsRec, dnsType, blank = newdig(inInput, rec) iterate(dnsRec, dnsType) + #pprint(recordDict) + for data in recordDict: + print recordDict[data] print '\n'