equal
deleted
inserted
replaced
73 def findwhois_server(self, buf, hostname, query): |
73 def findwhois_server(self, buf, hostname, query): |
74 """Search the initial TLD lookup results for the regional-specifc |
74 """Search the initial TLD lookup results for the regional-specifc |
75 whois server for getting contact details. |
75 whois server for getting contact details. |
76 """ |
76 """ |
77 nhost = None |
77 nhost = None |
78 match = re.compile('Domain Name: ' + query + '\s*.*?Whois Server: (.*?)\s', flags=re.IGNORECASE|re.DOTALL).search(buf) |
78 match = re.compile('Domain Name: {}\s*.*?Whois Server: (.*?)\s'.format(query), flags=re.IGNORECASE|re.DOTALL).search(buf) |
79 if match: |
79 if match: |
80 nhost = match.groups()[0] |
80 nhost = match.groups()[0] |
81 # if the whois address is domain.tld/something then |
81 # if the whois address is domain.tld/something then |
82 # s.connect((hostname, 43)) does not work |
82 # s.connect((hostname, 43)) does not work |
83 if nhost.count('/') > 0: |
83 if nhost.count('/') > 0: |