Fixed IP handling in input
This commit is contained in:
parent
483d03a542
commit
bb16df4156
12
HTTPy.py
12
HTTPy.py
@ -47,6 +47,16 @@ def compareSOA(inNameservers, inDomain, origSOA):
|
|||||||
|
|
||||||
#print soaRecords
|
#print soaRecords
|
||||||
|
|
||||||
|
def checkIfIP(in1):
|
||||||
|
count = 0
|
||||||
|
for dom in in1:
|
||||||
|
if dom.isdigit():
|
||||||
|
count += 1
|
||||||
|
else:
|
||||||
|
return 0
|
||||||
|
if count == 4:
|
||||||
|
return 1
|
||||||
|
|
||||||
|
|
||||||
def checkPhrase(inputs):
|
def checkPhrase(inputs):
|
||||||
for word in phrases:
|
for word in phrases:
|
||||||
@ -139,6 +149,7 @@ while running == 1:
|
|||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
if len(partDomain) == 4:
|
if len(partDomain) == 4:
|
||||||
|
if checkIfIP(partDomain):
|
||||||
print "========================================================"
|
print "========================================================"
|
||||||
ipLookup(inInput)
|
ipLookup(inInput)
|
||||||
if pingOn == "P":
|
if pingOn == "P":
|
||||||
@ -146,6 +157,7 @@ while running == 1:
|
|||||||
ipPing(inInput)
|
ipPing(inInput)
|
||||||
else:
|
else:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
else:
|
else:
|
||||||
if whoOn == "W":
|
if whoOn == "W":
|
||||||
whois(inInput)
|
whois(inInput)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user