Added Whois parsing to make stuff prettier :D Regex is easy

This commit is contained in:
Benjamyn Love 2017-07-14 12:05:58 +10:00
parent b9b2f476a7
commit 6de6d2af0e
2 changed files with 11 additions and 78229 deletions

View File

@ -77,12 +77,22 @@ def iterate(inArray, pre):
while count != len(inArray) - 1:
print pre, inArray[count]
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):
lookup = subprocess.check_output(["whois", inDomain])
print "========================================================"
test = lookup.split("\n")
iterate(test, "")
#iterate(test, "")
parseWhois(test)
def dig(inDomain, record):
dig = subprocess.check_output(["dig", record, "+short", inDomain])

78228
re

File diff suppressed because it is too large Load Diff