Update heuristic nameserver regex to remove false positives and partial matches

master
Sven Slootweg 12 years ago
parent f9bc7176dc
commit 7924e56e82

@ -41,7 +41,7 @@ grammar = {
'Record maintained by:\s?(?P<val>.+)',
'Registration Service Provided By:\s?(?P<val>.+)'],
'whois_server': ['Registrar Whois:\s?(?P<val>.+)'],
'name_servers': ['(?P<val>d?ns[0-9]+\.([a-z0-9-]+\.)+[a-z0-9]+)',
'name_servers': ['(?P<val>[a-z]+d?ns[0-9]+\.([a-z0-9-]+\.)+[a-z0-9]+)',
'(?P<val>[a-z0-9-]+\.d?ns[0-9]*\.([a-z0-9-]+\.)+[a-z0-9]+)',
'(?P<val>([a-z0-9-]+\.)+[a-z0-9]+)(\s+([0-9]{1,3}\.){3}[0-9]{1,3})'],
'emails': ['(?P<val>[\w.-]+@[\w.-]+\.[\w]{2,4})']

@ -9,7 +9,8 @@ testlist = open("testlist.txt").readlines()
# if result['updated_date'] is None:
# print "WHOIS for %s does not contain an update date?" % line
result = pythonwhois.whois("google.com")
#result = pythonwhois.whois("google.com")
result = pythonwhois.whois(sys.argv[1])
print result
#print "Creation date: ",

Loading…
Cancel
Save