Fixed IP handling in input
This commit is contained in:
parent
483d03a542
commit
bb16df4156
24
HTTPy.py
24
HTTPy.py
@ -47,6 +47,16 @@ def compareSOA(inNameservers, inDomain, origSOA):
|
||||
|
||||
#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):
|
||||
for word in phrases:
|
||||
@ -139,13 +149,15 @@ while running == 1:
|
||||
pass
|
||||
else:
|
||||
if len(partDomain) == 4:
|
||||
print "========================================================"
|
||||
ipLookup(inInput)
|
||||
if pingOn == "P":
|
||||
if checkIfIP(partDomain):
|
||||
print "========================================================"
|
||||
ipPing(inInput)
|
||||
else:
|
||||
pass
|
||||
ipLookup(inInput)
|
||||
if pingOn == "P":
|
||||
print "========================================================"
|
||||
ipPing(inInput)
|
||||
else:
|
||||
pass
|
||||
|
||||
else:
|
||||
if whoOn == "W":
|
||||
whois(inInput)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user