Fixed up error with my string spliting :) and improved dig functionality
This commit is contained in:
parent
4ba53007c9
commit
68a8270286
15
HTTPy.py
15
HTTPy.py
@ -29,11 +29,11 @@ def whois(inDomain):
|
||||
test = lookup.split("\n")
|
||||
iterate(test)
|
||||
|
||||
def dig(inDomain):
|
||||
dig = subprocess.check_output(["dig", "A", "+short", inDomain])
|
||||
def dig(inDomain, record):
|
||||
dig = subprocess.check_output(["dig", record, "+short", inDomain])
|
||||
print "========================================================" #ADD REST OF DIGS
|
||||
test = dig.split("\n")
|
||||
iterate(test)
|
||||
print record, test[0]
|
||||
|
||||
def ipLookup(inDomain):
|
||||
ipLook = subprocess.check_output(["geoiplookup", inDomain])
|
||||
@ -44,7 +44,7 @@ def getInput():
|
||||
global inInput
|
||||
global partDomain
|
||||
inInput = raw_input()
|
||||
partDomain = inInput.partition(".")
|
||||
partDomain = inInput.split(".")
|
||||
|
||||
|
||||
#if partDomain[2] != "":
|
||||
@ -53,8 +53,13 @@ def getInput():
|
||||
|
||||
print "Domain: "
|
||||
getInput()
|
||||
if len(partDomain) == 3:
|
||||
if len(partDomain) == 4:
|
||||
ipLookup(inInput)
|
||||
else:
|
||||
whois(inInput)
|
||||
dig(inInput, "A")
|
||||
dig(inInput, "MX")
|
||||
dig(inInput, "TXT")
|
||||
|
||||
#whois(inInput)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user