Added Whois parsing to make stuff prettier :D Regex is easy
This commit is contained in:
parent
b9b2f476a7
commit
6de6d2af0e
12
HTTPy.py
12
HTTPy.py
@ -77,12 +77,22 @@ def iterate(inArray, pre):
|
|||||||
while count != len(inArray) - 1:
|
while count != len(inArray) - 1:
|
||||||
print pre, inArray[count]
|
print pre, inArray[count]
|
||||||
count = count + 1
|
count = count + 1
|
||||||
|
def parseWhois(whioisInfo):
|
||||||
|
NS = re.compile("^[Nn]")
|
||||||
|
D = re.compile("^[Dd]")
|
||||||
|
R = re.compile("^[Rr]")
|
||||||
|
U = re.compile("^[Uu]")
|
||||||
|
|
||||||
|
for str in whioisInfo:
|
||||||
|
if NS.match(str) or D.match(str) or R.match(str) or U.match(str):
|
||||||
|
print str
|
||||||
|
|
||||||
def whois(inDomain):
|
def whois(inDomain):
|
||||||
lookup = subprocess.check_output(["whois", inDomain])
|
lookup = subprocess.check_output(["whois", inDomain])
|
||||||
print "========================================================"
|
print "========================================================"
|
||||||
test = lookup.split("\n")
|
test = lookup.split("\n")
|
||||||
iterate(test, "")
|
#iterate(test, "")
|
||||||
|
parseWhois(test)
|
||||||
|
|
||||||
def dig(inDomain, record):
|
def dig(inDomain, record):
|
||||||
dig = subprocess.check_output(["dig", record, "+short", inDomain])
|
dig = subprocess.check_output(["dig", record, "+short", inDomain])
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user