diff --git a/.HTTPy.py.swp b/.HTTPy.py.swp deleted file mode 100644 index dc573ba..0000000 Binary files a/.HTTPy.py.swp and /dev/null differ diff --git a/HTTPy.py b/HTTPy.py index 8e16c7e..eac4cdc 100755 --- a/HTTPy.py +++ b/HTTPy.py @@ -137,18 +137,19 @@ def options(inputs): def iterate(inArray, pre): count = 0 while count != len(inArray) - 1: + print pre #print checkIfIP(inArray[count].split('.')) if pre == "TXT" or pre == "SOA": print indent + bcolors.CYAN + pre, bcolors.GREEN + inArray[count] + bcolors.RESET else: if checkIfIP(inArray[count].split('.')) == 0: tmpVal = isCNAME(inArray[count]) - recordDict[pre] = pre, inArray[count], tmpVal[0] + recordDict[pre + str(count)] = 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: - recordDict[pre] = pre, inArray[count] + recordDict[pre + str(count)] = 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 @@ -208,7 +209,7 @@ def dig(inDomain, record): #print str(e) print "========================================================" test = dig.split("\n") - iterate(test, record) + #iterate(test, record) return test def newdig(inDomain, record, sub=""): @@ -298,7 +299,7 @@ while running == 1: if sub != "": tmpDom = sub + "." + inInput subRec, subType, subDomain = newdig(tmpDom, "A", sub) - iterate(subRec, subDomain) + #iterate(subRec, subDomain) for rec in rec2check: if rec != "": if rec == "MX": @@ -307,8 +308,8 @@ while running == 1: else: dnsRec, dnsType, blank = newdig(inInput, rec) iterate(dnsRec, dnsType) - #pprint(recordDict) + print(recordDict) #for data in recordDict: # print recordDict[data] - printDict(recordDict) + #printDict(recordDict) print '\n' diff --git a/notes.txt b/notes.txt new file mode 100644 index 0000000..3cb8cd2 --- /dev/null +++ b/notes.txt @@ -0,0 +1,18 @@ +## NOTES +# I am an idiot +# {'A': ('A', '172.217.25.142'), 'mail': ('mail', '172.217.25.133'), 'www': ('www', '172.217.25.132')} +# ~ MX 10 aspmx.l.google.com. -> 108.177.97.26 +# ~ MX 30 alt2.aspmx.l.google.com. -> 74.125.201.26 +# ~ MX 50 alt4.aspmx.l.google.com. -> 173.194.175.26 +# ~ MX 20 alt1.aspmx.l.google.com. -> 64.233.168.26 +# ~ MX 40 alt3.aspmx.l.google.com. -> 173.194.219.27 +# ~ TXT "docusign=05958488-4752-4ef2-95eb-aa7ba8a3bd0e" +# ~ TXT "v=spf1 include:_spf.google.com ~all" +# {'A': ('A', '172.217.25.142'), 'mail': ('mail', '172.217.25.133'), 'www': ('www', '172.217.25.132')} +# {'A': ('A', '172.217.25.142'), 'mail': ('mail', '172.217.25.133'), 'www': ('www', '172.217.25.132'), 'NS': ('NS', 'ns3.google.com.', '216.239.36.10')} +# {'A': ('A', '172.217.25.142'), 'mail': ('mail', '172.217.25.133'), 'www': ('www', '172.217.25.132'), 'NS': ('NS', 'ns3.google.com.', '216.239.36.10')} +# ~ SOA ns1.google.com. dns-admin.google.com. 186901781 900 900 1800 60 +# {'A': ('A', '172.217.25.142'), 'mail': ('mail', '172.217.25.133'), 'www': ('www', '172.217.25.132'), 'NS': ('NS', 'ns3.google.com.', '216.239.36.10')} + +There are mutiple records added, i need a unique indentifier :( +Maybe just a counter or something #nfi