diff --git a/pythonwhois/net.py b/pythonwhois/net.py index 4393b0b..5e23c14 100644 --- a/pythonwhois/net.py +++ b/pythonwhois/net.py @@ -3,13 +3,24 @@ from codecs import encode, decode from . import shared def get_whois_raw(domain, server="", previous=[], rfc3490=True): - + # Sometimes IANA simply won't give us the right root WHOIS server + exceptions = { + ".ac.uk": "whois.ja.net" + } + if rfc3490: domain = encode( domain if type(domain) is unicode else decode(domain, "utf8"), "idna" ) if len(previous) == 0: # Root query - target_server = get_root_server(domain) + is_exception = False + for exception, exc_serv in exceptions.iteritems(): + if domain.endswith(exception): + is_exception = True + target_server = exc_serv + break + if is_exception == False: + target_server = get_root_server(domain) else: target_server = server if domain.endswith(".jp") and target_server == "whois.jprs.jp": diff --git a/pythonwhois/parse.py b/pythonwhois/parse.py index 7a18dd8..80302c1 100644 --- a/pythonwhois/parse.py +++ b/pythonwhois/parse.py @@ -86,16 +86,18 @@ grammar = { 'Registrar Whois:\s?(?P.+)'], 'nameservers': ['Name Server:[ ]*(?P[^ ]+)', 'Nameservers:[ ]*(?P[^ ]+)', - '(?[a-z]*d?ns[0-9]+([a-z]{3})?\.([a-z0-9-]+\.)+[a-z0-9]+)', + '(?<=[ .]{2})(?P([a-z0-9-]+\.)+[a-z0-9]+)(\s+([0-9]{1,3}\.){3}[0-9]{1,3})', 'nameserver:\s*(?P.+)', 'nserver:\s*(?P[^[\s]+)', 'Name Server[.]+ (?P[^[\s]+)', + 'Hostname:\s*(?P[^\s]+)', 'DNS[0-9]+:\s*(?P.+)', 'ns[0-9]+:\s*(?P.+)', 'NS [0-9]+\s*:\s*(?P.+)', - '(?[a-z0-9-]+\.d?ns[0-9]*\.([a-z0-9-]+\.)+[a-z0-9]+)', - '(?([a-z0-9-]+\.)+[a-z0-9]+)(\s+([0-9]{1,3}\.){3}[0-9]{1,3})', - '(?d?ns\.([a-z0-9-]+\.)+[a-z0-9]+)', + '\[Name Server\]\s*(?P.+)', + '(?<=[ .]{2})(?P[a-z0-9-]+\.d?ns[0-9]*\.([a-z0-9-]+\.)+[a-z0-9]+)', + '(?<=[ .]{2})(?P([a-z0-9-]+\.)+[a-z0-9]+)(\s+([0-9]{1,3}\.){3}[0-9]{1,3})', + '(?<=[ .]{2})[^a-z0-9.-](?Pd?ns\.([a-z0-9-]+\.)+[a-z0-9]+)', 'Nserver:\s*(?P.+)'], 'emails': ['(?P[\w.-]+@[\w.-]+\.[\w]{2,6})', # Really need to fix this, much longer TLDs now exist... '(?P[\w.-]+\sAT\s[\w.-]+\sDOT\s[\w]{2,6})'] @@ -103,9 +105,8 @@ grammar = { "_dateformats": ( '(?P[0-9]{1,2})[./ -](?PJan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)[./ -](?P[0-9]{4}|[0-9]{2})' '(\s+(?P[0-9]{1,2})[:.](?P[0-9]{1,2})[:.](?P[0-9]{1,2}))?', - '[a-z]{3}\s(?PJan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)[./ -](?P[0-9]{1,2})' - '(\s+(?P[0-9]{1,2})[:.](?P[0-9]{1,2})[:.](?P[0-9]{1,2}))?' - '\s[a-z]{3}\s(?P[0-9]{4}|[0-9]{2})', + '[a-z]{3}\s(?PJan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)[./ -](?P[0-9]{1,2})(\s+(?P[0-9]{1,2})[:.](?P[0-9]{1,2})[:.](?P[0-9]{1,2}))?\s[a-z]{3}\s(?P[0-9]{4}|[0-9]{2})', + '[a-zA-Z]+\s(?P[0-9]{1,2})(?:st|nd|rd|th)\s(?PJan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec|January|February|March|April|May|June|July|August|September|October|November|December)\s(?P[0-9]{4})', '(?P[0-9]{4})[./-]?(?P[0-9]{2})[./-]?(?P[0-9]{2})(\s|T|/)((?P[0-9]{1,2})[:.-](?P[0-9]{1,2})[:.-](?P[0-9]{1,2}))', '(?P[0-9]{4})[./-](?P[0-9]{1,2})[./-](?P[0-9]{1,2})', '(?P[0-9]{1,2})[./ -](?P[0-9]{1,2})[./ -](?P[0-9]{4}|[0-9]{2})', @@ -171,15 +172,17 @@ def parse_raw_whois(raw_data, normalized=[]): except KeyError as e: data[rule_key] = [val] - # Whois.com is a bit special... Fabulous.com also seems to use this format. - match = re.search("Name [Ss]ervers:([/s/S]+)\n\n", segment) + # Whois.com is a bit special... Fabulous.com also seems to use this format. As do some others. + match = re.search("^\s?Name\s?[Ss]ervers:\s*\n((?:\s*.+\n)+?\s?)\n", segment, re.MULTILINE) if match is not None: chunk = match.group(1) - for match in re.findall("[ ]+(.+)\n", chunk): - try: - data["nameservers"].append(match.strip()) - except KeyError as e: - data["nameservers"] = [match.strip()] + for match in re.findall("[ ]*(.+)\n", chunk): + if match.strip() != "": + if not re.match("^[a-zA-Z]+:", match): + try: + data["nameservers"].append(match.strip()) + except KeyError as e: + data["nameservers"] = [match.strip()] # Nominet also needs some special attention match = re.search(" Registrar:\n (.+)\n", segment) if match is not None: @@ -187,7 +190,7 @@ def parse_raw_whois(raw_data, normalized=[]): match = re.search(" Registration status:\n (.+)\n", segment) if match is not None: data["status"] = [match.group(1).strip()] - match = re.search(" Name servers:([\s\S]*?\n)\n", segment) + match = re.search(" Name servers:\n([\s\S]*?\n)\n", segment) if match is not None: chunk = match.group(1) for match in re.findall(" (.+)\n", chunk): @@ -196,6 +199,28 @@ def parse_raw_whois(raw_data, normalized=[]): data["nameservers"].append(match.strip()) except KeyError as e: data["nameservers"] = [match.strip()] + # janet (.ac.uk) is kinda like Nominet, but also kinda not + match = re.search("Registered By:\n\t(.+)\n", segment) + if match is not None: + data["registrar"] = [match.group(1).strip()] + match = re.search("Entry created:\n\t(.+)\n", segment) + if match is not None: + data["creation_date"] = [match.group(1).strip()] + match = re.search("Renewal date:\n\t(.+)\n", segment) + if match is not None: + data["expiration_date"] = [match.group(1).strip()] + match = re.search("Entry updated:\n\t(.+)\n", segment) + if match is not None: + data["updated_date"] = [match.group(1).strip()] + match = re.search("Servers:([\s\S]*?\n)\n", segment) + if match is not None: + chunk = match.group(1) + for match in re.findall("\t(.+)\n", chunk): + match = match.split()[0] + try: + data["nameservers"].append(match.strip()) + except KeyError as e: + data["nameservers"] = [match.strip()] # .am plays the same game match = re.search(" DNS servers:([\s\S]*?\n)\n", segment) if match is not None: @@ -225,6 +250,7 @@ def parse_raw_whois(raw_data, normalized=[]): match = re.search('ren-status:\s*(.+)', segment) if match is not None: data["status"].insert(0, match.group(1).strip()) + data["contacts"] = parse_registrants(raw_data) @@ -248,6 +274,7 @@ def parse_raw_whois(raw_data, normalized=[]): pass # Not present try: + data['nameservers'] = remove_suffixes(data['nameservers']) data['nameservers'] = remove_duplicates([ns.rstrip(".") for ns in data['nameservers']]) except KeyError as e: pass # Not present @@ -452,6 +479,16 @@ def remove_duplicates(data): return cleaned_list +def remove_suffixes(data): + # Removes everything before and after the first non-whitespace continuous string. + # Used to get rid of IP suffixes for nameservers. + cleaned_list = [] + + for entry in data: + cleaned_list.append(re.search("([^\s]+)\s*[\s]*", entry).group(1).lstrip()) + + return cleaned_list + def preprocess_regex(regex): return re.sub(r"\\s\*\(\?P<([^>]+)>\.\+\)", r"\s*(?P<\1>\S.*)", regex) @@ -483,6 +520,7 @@ def parse_registrants(data): "Registrant:[ ]*(?P.+)\n[\s\S]*Eligibility Type:[ ]*(Higher Education Institution|Company|Incorporated Association|Other)\n[\s\S]*Registrant Contact ID:[ ]*(?P.+)\n[\s\S]*Registrant Contact Name:[ ]*(?P.+)\n", # .au educational, company, 'incorporated association' (non-profit?), other (spotted for linux.conf.au, unsure if also for others) " Registrant:\n (?P.+)\n\n Registrant type:\n .*\n\n Registrant's address:\n The registrant .* opted to have", # Nominet (.uk) with hidden address " Registrant:\n (?P.+)\n\n[\s\S]* Registrant type:\n .*\n\n Registrant's address:\n (?P.+)\n(?: (?P.+)\n)?(?: (?P.+)\n)? (?P.+)\n (?P.+)\n (?P.+)\n (?P.+)\n\n", # Nominet (.uk) with visible address + "Domain Owner:\n\t(?P.+)\n\n[\s\S]*?(?:Registrant Contact:\n\t(?P.+))?\n\nRegistrant(?:'s)? (?:a|A)ddress:(?:\n\t(?P.+)\n(?:\t(?P.+)\n)?(?:\t(?P.+)\n)?\t(?P.+)\n\t(?P.+))?\n\t(?P.+)(?:\n\t(?P.+) \(Phone\)\n\t(?P.+) \(FAX\)\n\t(?P.+))?\n\n", # .ac.uk - what a mess... "Registrant contact:\n (?P.+)\n (?P.*)\n (?P.+), (?P.+) (?P.+) (?P.+)\n\n", # Fabulous.com "registrant-name:\s*(?P.+)\nregistrant-type:\s*(?P.+)\nregistrant-address:\s*(?P.+)\nregistrant-postcode:\s*(?P.+)\nregistrant-city:\s*(?P.+)\nregistrant-country:\s*(?P.+)\n(?:registrant-phone:\s*(?P.+)\n)?(?:registrant-email:\s*(?P.+)\n)?", # Hetzner "Registrant Contact Information :[ ]*\n[ ]+(?P.*)\n[ ]+(?P.*)\n[ ]+(?P.*)\n[ ]+(?P.*)\n[ ]+(?P.*)\n[ ]+(?P.*)\n[ ]+(?P.*)\n[ ]+(?P.*)\n[ ]+(?P.*)\n\n", # GAL Communication diff --git a/test/data/blackburn.ac.uk b/test/data/blackburn.ac.uk new file mode 100644 index 0000000..90f5edb --- /dev/null +++ b/test/data/blackburn.ac.uk @@ -0,0 +1,40 @@ + +Domain: + blackburn.ac.uk + +Registered For: + Blackburn College + +Domain Owner: + Blackburn College + +Registered By: + Jisc Collections and Janet Limited + +Servers: + arrakis.blackburn.ac.uk 194.82.37.34 + ns4.ja.net + +Registrant Contact: + Imtiyaz Patel + +Registrant Address: + Blackburn College + Feilden St. + Blackburn + BB2 1LH + United Kingdom + +44 1254 292512 (Phone) + +44 1254 694291 (FAX) + i.patel@blackburn.ac.uk + +Renewal date: + Monday 20th Oct 2014 + +Entry updated: + Wednesday 20th March 2013 + +Entry created: + Friday 7th November 2003 + + diff --git a/test/data/bristol.ac.uk b/test/data/bristol.ac.uk new file mode 100644 index 0000000..c53bcec --- /dev/null +++ b/test/data/bristol.ac.uk @@ -0,0 +1,31 @@ + +Domain: + bristol.ac.uk + +Registered For: + University of Bristol + +Domain Owner: + University of Bristol + +Registered By: + Jisc Collections and Janet Limited + +Servers: + ncs.bris.ac.uk 137.222.10.36 + irix.bris.ac.uk + ns3.ja.net + +Registrant Address: + United Kingdom + +Renewal date: + Friday 1st Jan 2016 + +Entry updated: + Sunday 1st December 2013 + +Entry created: + Friday 7th November 2003 + + diff --git a/test/data/imperial.ac.uk b/test/data/imperial.ac.uk new file mode 100644 index 0000000..1e22ea0 --- /dev/null +++ b/test/data/imperial.ac.uk @@ -0,0 +1,42 @@ + +Domain: + imperial.ac.uk + +Registered For: + Imperial College London + +Domain Owner: + Imperial College of Science, Technology and Medicine + +Registered By: + Imperial College of Science, Technology and Medicine + +Servers: + ns0.ic.ac.uk + ns1.ic.ac.uk + ns2.ic.ac.uk + authdns1.csx.cam.ac.uk + +Registrant Contact: + Imperial College Hostmaster + +Registrant Address: + ICT Division + Mechanical Engineering Building + Imperial College~Exhibition Road~London + SW7 2BX + United Kingdom + +44 20 7594 6965 (Phone) + +44 20 7594 6958 (FAX) + hostmaster@imperial.ac.uk + +Renewal date: + Tuesday 14th Apr 2015 + +Entry updated: + Thursday 6th February 2014 + +Entry created: + Friday 7th November 2003 + + diff --git a/test/data/warwick.ac.uk b/test/data/warwick.ac.uk new file mode 100644 index 0000000..b8a5fe3 --- /dev/null +++ b/test/data/warwick.ac.uk @@ -0,0 +1,40 @@ + +Domain: + warwick.ac.uk + +Registered For: + University of Warwick + +Domain Owner: + University of Warwick + +Registered By: + Jisc Collections and Janet Limited + +Servers: + extdns1.warwick.ac.uk 137.205.84.17 + extdns2.warwick.ac.uk 137.205.84.18 + +Registrant Contact: + Patrick Green + +Registrant Address: + IT Services + Gibbet Hill Road + Coventry + CV4 7AL + United Kingdom + +44 24 7657 4257 (Phone) + +44 24 7652 3267 (FAX) + P.Green@warwick.ac.uk + +Renewal date: + Wednesday 23rd Mar 2016 + +Entry updated: + Sunday 23rd February 2014 + +Entry created: + Monday 10th November 2003 + + diff --git a/test/target_default/blackburn.ac.uk b/test/target_default/blackburn.ac.uk new file mode 100644 index 0000000..46f279f --- /dev/null +++ b/test/target_default/blackburn.ac.uk @@ -0,0 +1 @@ +{"updated_date": ["2013-03-20T00:00:00"], "contacts": {"admin": null, "tech": null, "registrant": {"city": "Blackburn", "fax": "+44 1254 694291", "name": "Imtiyaz Patel", "phone": "+44 1254 292512", "street": "Blackburn College\nFeilden St.", "country": "United Kingdom", "postalcode": "BB2 1LH", "organization": "Blackburn College", "email": "i.patel@blackburn.ac.uk"}, "billing": null}, "nameservers": ["arrakis.blackburn.ac.uk", "ns4.ja.net"], "expiration_date": ["2014-10-20T00:00:00"], "creation_date": ["2003-11-07T00:00:00"], "raw": ["\nDomain:\n\tblackburn.ac.uk\n\nRegistered For:\n\tBlackburn College\n\nDomain Owner:\n\tBlackburn College\n\nRegistered By:\n\tJisc Collections and Janet Limited\n\nServers:\n\tarrakis.blackburn.ac.uk\t194.82.37.34\n\tns4.ja.net\t\n\nRegistrant Contact:\n\tImtiyaz Patel\n\nRegistrant Address:\n\tBlackburn College\n\tFeilden St.\n\tBlackburn\n\tBB2 1LH\n\tUnited Kingdom\n\t+44 1254 292512 (Phone)\n\t+44 1254 694291 (FAX)\n\ti.patel@blackburn.ac.uk \n\nRenewal date:\n\tMonday 20th Oct 2014\n\nEntry updated:\n\tWednesday 20th March 2013\n\nEntry created:\n\tFriday 7th November 2003\n\n\n"], "registrar": ["Jisc Collections and Janet Limited"]} \ No newline at end of file diff --git a/test/target_default/bristol.ac.uk b/test/target_default/bristol.ac.uk new file mode 100644 index 0000000..be48f63 --- /dev/null +++ b/test/target_default/bristol.ac.uk @@ -0,0 +1 @@ +{"updated_date": ["2013-12-01T00:00:00"], "contacts": {"admin": null, "tech": null, "registrant": {"country": "United Kingdom", "organization": "University of Bristol"}, "billing": null}, "nameservers": ["ncs.bris.ac.uk", "irix.bris.ac.uk", "ns3.ja.net"], "expiration_date": ["2016-01-01T00:00:00"], "creation_date": ["2003-11-07T00:00:00"], "raw": ["\nDomain:\n\tbristol.ac.uk\n\nRegistered For:\n\tUniversity of Bristol\n\nDomain Owner:\n\tUniversity of Bristol\n\nRegistered By:\n\tJisc Collections and Janet Limited\n\nServers:\n\tncs.bris.ac.uk\t137.222.10.36\n\tirix.bris.ac.uk\t\n\tns3.ja.net\t\n\nRegistrant Address:\n\tUnited Kingdom\n\nRenewal date:\n\tFriday 1st Jan 2016\n\nEntry updated:\n\tSunday 1st December 2013\n\nEntry created:\n\tFriday 7th November 2003\n\n\n"], "registrar": ["Jisc Collections and Janet Limited"]} \ No newline at end of file diff --git a/test/target_default/imperial.ac.uk b/test/target_default/imperial.ac.uk new file mode 100644 index 0000000..682f01b --- /dev/null +++ b/test/target_default/imperial.ac.uk @@ -0,0 +1 @@ +{"updated_date": ["2014-02-06T00:00:00"], "contacts": {"admin": null, "tech": null, "registrant": {"city": "Imperial College~Exhibition Road~London", "fax": "+44 20 7594 6958", "name": "Imperial College Hostmaster", "phone": "+44 20 7594 6965", "street": "ICT Division\nMechanical Engineering Building", "country": "United Kingdom", "postalcode": "SW7 2BX", "organization": "Imperial College of Science, Technology and Medicine", "email": "hostmaster@imperial.ac.uk"}, "billing": null}, "nameservers": ["ns0.ic.ac.uk", "ns1.ic.ac.uk", "ns2.ic.ac.uk", "authdns1.csx.cam.ac.uk"], "expiration_date": ["2015-04-14T00:00:00"], "creation_date": ["2003-11-07T00:00:00"], "raw": ["\nDomain:\n\timperial.ac.uk\n\nRegistered For:\n\tImperial College London\n\nDomain Owner:\n\tImperial College of Science, Technology and Medicine\n\nRegistered By:\n\tImperial College of Science, Technology and Medicine\n\nServers:\n\tns0.ic.ac.uk\t\n\tns1.ic.ac.uk\t\n\tns2.ic.ac.uk\t\n\tauthdns1.csx.cam.ac.uk\t\n\nRegistrant Contact:\n\tImperial College Hostmaster\n\nRegistrant Address:\n\tICT Division\n\tMechanical Engineering Building\n\tImperial College~Exhibition Road~London\n\tSW7 2BX\n\tUnited Kingdom\n\t+44 20 7594 6965 (Phone)\n\t+44 20 7594 6958 (FAX)\n\thostmaster@imperial.ac.uk\n\nRenewal date:\n\tTuesday 14th Apr 2015\n\nEntry updated:\n\tThursday 6th February 2014\n\nEntry created:\n\tFriday 7th November 2003\n\n\n"], "registrar": ["Imperial College of Science, Technology and Medicine"]} \ No newline at end of file diff --git a/test/target_default/nic.ru b/test/target_default/nic.ru index 939733e..139f96d 100644 --- a/test/target_default/nic.ru +++ b/test/target_default/nic.ru @@ -1 +1 @@ -{"status": ["REGISTERED, DELEGATED, VERIFIED"], "updated_date": ["2013-11-20T08:41:39"], "contacts": {"admin": null, "tech": null, "registrant": {"organization": "JSC 'RU-CENTER'"}, "billing": null}, "nameservers": ["ns4-cloud.nic.ru", "ns4-cloud.nic.ru. 195.253.65.2, 2a01:5b0:5::2", "ns5.nic.ru", "ns5.nic.ru. 31.177.67.100, 2a02:2090:e800:9000:31:177:67:100", "ns6.nic.ru", "ns6.nic.ru. 31.177.74.100, 2a02:2090:ec00:9040:31:177:74:100", "ns7.nic.ru", "ns7.nic.ru. 31.177.71.100, 2a02:2090:ec00:9000:31:177:71:100", "ns8-cloud.nic.ru", "ns8-cloud.nic.ru. 195.253.64.10, 2a01:5b0:4::a"], "expiration_date": ["2013-12-01T00:00:00"], "creation_date": ["1997-11-28T00:00:00"], "raw": ["% By submitting a query to RIPN's Whois Service\n% you agree to abide by the following terms of use:\n% http://www.ripn.net/about/servpol.html#3.2 (in Russian) \n% http://www.ripn.net/about/en/servpol.html#3.2 (in English).\n\ndomain: NIC.RU\nnserver: ns4-cloud.nic.ru. 195.253.65.2, 2a01:5b0:5::2\nnserver: ns5.nic.ru. 31.177.67.100, 2a02:2090:e800:9000:31:177:67:100\nnserver: ns6.nic.ru. 31.177.74.100, 2a02:2090:ec00:9040:31:177:74:100\nnserver: ns7.nic.ru. 31.177.71.100, 2a02:2090:ec00:9000:31:177:71:100\nnserver: ns8-cloud.nic.ru. 195.253.64.10, 2a01:5b0:4::a\nstate: REGISTERED, DELEGATED, VERIFIED\norg: JSC 'RU-CENTER'\nregistrar: RU-CENTER-REG-RIPN\nadmin-contact: https://www.nic.ru/whois\ncreated: 1997.11.28\npaid-till: 2013.12.01\nfree-date: 2014.01.01\nsource: TCI\n\nLast updated on 2013.11.20 08:41:39 MSK\n\n"], "registrar": ["RU-CENTER-REG-RIPN"]} \ No newline at end of file +{"status": ["REGISTERED, DELEGATED, VERIFIED"], "updated_date": ["2013-11-20T08:41:39"], "contacts": {"admin": null, "tech": null, "registrant": {"organization": "JSC 'RU-CENTER'"}, "billing": null}, "nameservers": ["ns4-cloud.nic.ru", "ns5.nic.ru", "ns6.nic.ru", "ns7.nic.ru", "ns8-cloud.nic.ru"], "expiration_date": ["2013-12-01T00:00:00"], "creation_date": ["1997-11-28T00:00:00"], "raw": ["% By submitting a query to RIPN's Whois Service\n% you agree to abide by the following terms of use:\n% http://www.ripn.net/about/servpol.html#3.2 (in Russian) \n% http://www.ripn.net/about/en/servpol.html#3.2 (in English).\n\ndomain: NIC.RU\nnserver: ns4-cloud.nic.ru. 195.253.65.2, 2a01:5b0:5::2\nnserver: ns5.nic.ru. 31.177.67.100, 2a02:2090:e800:9000:31:177:67:100\nnserver: ns6.nic.ru. 31.177.74.100, 2a02:2090:ec00:9040:31:177:74:100\nnserver: ns7.nic.ru. 31.177.71.100, 2a02:2090:ec00:9000:31:177:71:100\nnserver: ns8-cloud.nic.ru. 195.253.64.10, 2a01:5b0:4::a\nstate: REGISTERED, DELEGATED, VERIFIED\norg: JSC 'RU-CENTER'\nregistrar: RU-CENTER-REG-RIPN\nadmin-contact: https://www.nic.ru/whois\ncreated: 1997.11.28\npaid-till: 2013.12.01\nfree-date: 2014.01.01\nsource: TCI\n\nLast updated on 2013.11.20 08:41:39 MSK\n\n"], "registrar": ["RU-CENTER-REG-RIPN"]} \ No newline at end of file diff --git a/test/target_default/prq.se b/test/target_default/prq.se index 6f2c835..fe7caf7 100644 --- a/test/target_default/prq.se +++ b/test/target_default/prq.se @@ -1 +1 @@ -{"status": ["active", "ok"], "updated_date": ["2012-11-03T00:00:00"], "contacts": {"admin": null, "tech": null, "registrant": {"handle": "perper9352-00001"}, "billing": null}, "nameservers": ["ns.prq.se", "ns.prq.se 193.104.214.194", "ns2.prq.se", "ns2.prq.se 88.80.30.194"], "expiration_date": ["2015-06-14T00:00:00"], "creation_date": ["2004-06-14T00:00:00"], "raw": ["# Copyright (c) 1997- .SE (The Internet Infrastructure Foundation).\n# All rights reserved.\n\n# The information obtained through searches, or otherwise, is protected\n# by the Swedish Copyright Act (1960:729) and international conventions.\n# It is also subject to database protection according to the Swedish\n# Copyright Act.\n\n# Any use of this material to target advertising or\n# similar activities is forbidden and will be prosecuted.\n# If any of the information below is transferred to a third\n# party, it must be done in its entirety. This server must\n# not be used as a backend for a search engine.\n\n# Result of search for registered domain names under\n# the .SE top level domain.\n\n# The data is in the UTF-8 character set and the result is\n# printed with eight bits.\n\nstate: active\ndomain: prq.se\nholder: perper9352-00001\nadmin-c: -\ntech-c: -\nbilling-c: -\ncreated: 2004-06-14\nmodified: 2012-11-03\nexpires: 2015-06-14\ntransferred: 2012-08-09\nnserver: ns.prq.se 193.104.214.194\nnserver: ns2.prq.se 88.80.30.194\ndnssec: unsigned delegation\nstatus: ok\nregistrar: AEB Komm\n\n"], "registrar": ["AEB Komm"]} \ No newline at end of file +{"status": ["active", "ok"], "updated_date": ["2012-11-03T00:00:00"], "contacts": {"admin": null, "tech": null, "registrant": {"handle": "perper9352-00001"}, "billing": null}, "nameservers": ["ns.prq.se", "ns2.prq.se"], "expiration_date": ["2015-06-14T00:00:00"], "creation_date": ["2004-06-14T00:00:00"], "raw": ["# Copyright (c) 1997- .SE (The Internet Infrastructure Foundation).\n# All rights reserved.\n\n# The information obtained through searches, or otherwise, is protected\n# by the Swedish Copyright Act (1960:729) and international conventions.\n# It is also subject to database protection according to the Swedish\n# Copyright Act.\n\n# Any use of this material to target advertising or\n# similar activities is forbidden and will be prosecuted.\n# If any of the information below is transferred to a third\n# party, it must be done in its entirety. This server must\n# not be used as a backend for a search engine.\n\n# Result of search for registered domain names under\n# the .SE top level domain.\n\n# The data is in the UTF-8 character set and the result is\n# printed with eight bits.\n\nstate: active\ndomain: prq.se\nholder: perper9352-00001\nadmin-c: -\ntech-c: -\nbilling-c: -\ncreated: 2004-06-14\nmodified: 2012-11-03\nexpires: 2015-06-14\ntransferred: 2012-08-09\nnserver: ns.prq.se 193.104.214.194\nnserver: ns2.prq.se 88.80.30.194\ndnssec: unsigned delegation\nstatus: ok\nregistrar: AEB Komm\n\n"], "registrar": ["AEB Komm"]} \ No newline at end of file diff --git a/test/target_default/warwick.ac.uk b/test/target_default/warwick.ac.uk new file mode 100644 index 0000000..6dfe8f7 --- /dev/null +++ b/test/target_default/warwick.ac.uk @@ -0,0 +1 @@ +{"updated_date": ["2014-02-23T00:00:00"], "contacts": {"admin": null, "tech": null, "registrant": {"city": "Coventry", "fax": "+44 24 7652 3267", "name": "Patrick Green", "phone": "+44 24 7657 4257", "street": "IT Services\nGibbet Hill Road", "country": "United Kingdom", "postalcode": "CV4 7AL", "organization": "University of Warwick", "email": "P.Green@warwick.ac.uk"}, "billing": null}, "nameservers": ["extdns1.warwick.ac.uk", "extdns2.warwick.ac.uk"], "expiration_date": ["2016-03-23T00:00:00"], "creation_date": ["2003-11-10T00:00:00"], "raw": ["\nDomain:\n\twarwick.ac.uk\n\nRegistered For:\n\tUniversity of Warwick\n\nDomain Owner:\n\tUniversity of Warwick\n\nRegistered By:\n\tJisc Collections and Janet Limited\n\nServers:\n\textdns1.warwick.ac.uk\t137.205.84.17\n\textdns2.warwick.ac.uk\t137.205.84.18\n\nRegistrant Contact:\n\tPatrick Green\n\nRegistrant Address:\n\tIT Services\n\tGibbet Hill Road\n\tCoventry\n\tCV4 7AL\n\tUnited Kingdom\n\t+44 24 7657 4257 (Phone)\n\t+44 24 7652 3267 (FAX)\n\tP.Green@warwick.ac.uk\n\nRenewal date:\n\tWednesday 23rd Mar 2016\n\nEntry updated:\n\tSunday 23rd February 2014\n\nEntry created:\n\tMonday 10th November 2003\n\n\n"], "registrar": ["Jisc Collections and Janet Limited"]} \ No newline at end of file diff --git a/test/target_normalized/blackburn.ac.uk b/test/target_normalized/blackburn.ac.uk new file mode 100644 index 0000000..46f279f --- /dev/null +++ b/test/target_normalized/blackburn.ac.uk @@ -0,0 +1 @@ +{"updated_date": ["2013-03-20T00:00:00"], "contacts": {"admin": null, "tech": null, "registrant": {"city": "Blackburn", "fax": "+44 1254 694291", "name": "Imtiyaz Patel", "phone": "+44 1254 292512", "street": "Blackburn College\nFeilden St.", "country": "United Kingdom", "postalcode": "BB2 1LH", "organization": "Blackburn College", "email": "i.patel@blackburn.ac.uk"}, "billing": null}, "nameservers": ["arrakis.blackburn.ac.uk", "ns4.ja.net"], "expiration_date": ["2014-10-20T00:00:00"], "creation_date": ["2003-11-07T00:00:00"], "raw": ["\nDomain:\n\tblackburn.ac.uk\n\nRegistered For:\n\tBlackburn College\n\nDomain Owner:\n\tBlackburn College\n\nRegistered By:\n\tJisc Collections and Janet Limited\n\nServers:\n\tarrakis.blackburn.ac.uk\t194.82.37.34\n\tns4.ja.net\t\n\nRegistrant Contact:\n\tImtiyaz Patel\n\nRegistrant Address:\n\tBlackburn College\n\tFeilden St.\n\tBlackburn\n\tBB2 1LH\n\tUnited Kingdom\n\t+44 1254 292512 (Phone)\n\t+44 1254 694291 (FAX)\n\ti.patel@blackburn.ac.uk \n\nRenewal date:\n\tMonday 20th Oct 2014\n\nEntry updated:\n\tWednesday 20th March 2013\n\nEntry created:\n\tFriday 7th November 2003\n\n\n"], "registrar": ["Jisc Collections and Janet Limited"]} \ No newline at end of file diff --git a/test/target_normalized/bristol.ac.uk b/test/target_normalized/bristol.ac.uk new file mode 100644 index 0000000..be48f63 --- /dev/null +++ b/test/target_normalized/bristol.ac.uk @@ -0,0 +1 @@ +{"updated_date": ["2013-12-01T00:00:00"], "contacts": {"admin": null, "tech": null, "registrant": {"country": "United Kingdom", "organization": "University of Bristol"}, "billing": null}, "nameservers": ["ncs.bris.ac.uk", "irix.bris.ac.uk", "ns3.ja.net"], "expiration_date": ["2016-01-01T00:00:00"], "creation_date": ["2003-11-07T00:00:00"], "raw": ["\nDomain:\n\tbristol.ac.uk\n\nRegistered For:\n\tUniversity of Bristol\n\nDomain Owner:\n\tUniversity of Bristol\n\nRegistered By:\n\tJisc Collections and Janet Limited\n\nServers:\n\tncs.bris.ac.uk\t137.222.10.36\n\tirix.bris.ac.uk\t\n\tns3.ja.net\t\n\nRegistrant Address:\n\tUnited Kingdom\n\nRenewal date:\n\tFriday 1st Jan 2016\n\nEntry updated:\n\tSunday 1st December 2013\n\nEntry created:\n\tFriday 7th November 2003\n\n\n"], "registrar": ["Jisc Collections and Janet Limited"]} \ No newline at end of file diff --git a/test/target_normalized/imperial.ac.uk b/test/target_normalized/imperial.ac.uk new file mode 100644 index 0000000..682f01b --- /dev/null +++ b/test/target_normalized/imperial.ac.uk @@ -0,0 +1 @@ +{"updated_date": ["2014-02-06T00:00:00"], "contacts": {"admin": null, "tech": null, "registrant": {"city": "Imperial College~Exhibition Road~London", "fax": "+44 20 7594 6958", "name": "Imperial College Hostmaster", "phone": "+44 20 7594 6965", "street": "ICT Division\nMechanical Engineering Building", "country": "United Kingdom", "postalcode": "SW7 2BX", "organization": "Imperial College of Science, Technology and Medicine", "email": "hostmaster@imperial.ac.uk"}, "billing": null}, "nameservers": ["ns0.ic.ac.uk", "ns1.ic.ac.uk", "ns2.ic.ac.uk", "authdns1.csx.cam.ac.uk"], "expiration_date": ["2015-04-14T00:00:00"], "creation_date": ["2003-11-07T00:00:00"], "raw": ["\nDomain:\n\timperial.ac.uk\n\nRegistered For:\n\tImperial College London\n\nDomain Owner:\n\tImperial College of Science, Technology and Medicine\n\nRegistered By:\n\tImperial College of Science, Technology and Medicine\n\nServers:\n\tns0.ic.ac.uk\t\n\tns1.ic.ac.uk\t\n\tns2.ic.ac.uk\t\n\tauthdns1.csx.cam.ac.uk\t\n\nRegistrant Contact:\n\tImperial College Hostmaster\n\nRegistrant Address:\n\tICT Division\n\tMechanical Engineering Building\n\tImperial College~Exhibition Road~London\n\tSW7 2BX\n\tUnited Kingdom\n\t+44 20 7594 6965 (Phone)\n\t+44 20 7594 6958 (FAX)\n\thostmaster@imperial.ac.uk\n\nRenewal date:\n\tTuesday 14th Apr 2015\n\nEntry updated:\n\tThursday 6th February 2014\n\nEntry created:\n\tFriday 7th November 2003\n\n\n"], "registrar": ["Imperial College of Science, Technology and Medicine"]} \ No newline at end of file diff --git a/test/target_normalized/nic.ru b/test/target_normalized/nic.ru index 512bbfe..ac14124 100644 --- a/test/target_normalized/nic.ru +++ b/test/target_normalized/nic.ru @@ -1 +1 @@ -{"status": ["Registered, Delegated, Verified"], "updated_date": ["2013-11-20T08:41:39"], "contacts": {"admin": null, "tech": null, "registrant": {"organization": "Jsc 'ru-center'"}, "billing": null}, "nameservers": ["ns4-cloud.nic.ru", "ns4-cloud.nic.ru. 195.253.65.2, 2a01:5b0:5::2", "ns5.nic.ru", "ns5.nic.ru. 31.177.67.100, 2a02:2090:e800:9000:31:177:67:100", "ns6.nic.ru", "ns6.nic.ru. 31.177.74.100, 2a02:2090:ec00:9040:31:177:74:100", "ns7.nic.ru", "ns7.nic.ru. 31.177.71.100, 2a02:2090:ec00:9000:31:177:71:100", "ns8-cloud.nic.ru", "ns8-cloud.nic.ru. 195.253.64.10, 2a01:5b0:4::a"], "expiration_date": ["2013-12-01T00:00:00"], "creation_date": ["1997-11-28T00:00:00"], "raw": ["% By submitting a query to RIPN's Whois Service\n% you agree to abide by the following terms of use:\n% http://www.ripn.net/about/servpol.html#3.2 (in Russian) \n% http://www.ripn.net/about/en/servpol.html#3.2 (in English).\n\ndomain: NIC.RU\nnserver: ns4-cloud.nic.ru. 195.253.65.2, 2a01:5b0:5::2\nnserver: ns5.nic.ru. 31.177.67.100, 2a02:2090:e800:9000:31:177:67:100\nnserver: ns6.nic.ru. 31.177.74.100, 2a02:2090:ec00:9040:31:177:74:100\nnserver: ns7.nic.ru. 31.177.71.100, 2a02:2090:ec00:9000:31:177:71:100\nnserver: ns8-cloud.nic.ru. 195.253.64.10, 2a01:5b0:4::a\nstate: REGISTERED, DELEGATED, VERIFIED\norg: JSC 'RU-CENTER'\nregistrar: RU-CENTER-REG-RIPN\nadmin-contact: https://www.nic.ru/whois\ncreated: 1997.11.28\npaid-till: 2013.12.01\nfree-date: 2014.01.01\nsource: TCI\n\nLast updated on 2013.11.20 08:41:39 MSK\n\n"], "registrar": ["Ru-center-reg-ripn"]} \ No newline at end of file +{"status": ["Registered, Delegated, Verified"], "updated_date": ["2013-11-20T08:41:39"], "contacts": {"admin": null, "tech": null, "registrant": {"organization": "Jsc 'ru-center'"}, "billing": null}, "nameservers": ["ns4-cloud.nic.ru", "ns5.nic.ru", "ns6.nic.ru", "ns7.nic.ru", "ns8-cloud.nic.ru"], "expiration_date": ["2013-12-01T00:00:00"], "creation_date": ["1997-11-28T00:00:00"], "raw": ["% By submitting a query to RIPN's Whois Service\n% you agree to abide by the following terms of use:\n% http://www.ripn.net/about/servpol.html#3.2 (in Russian) \n% http://www.ripn.net/about/en/servpol.html#3.2 (in English).\n\ndomain: NIC.RU\nnserver: ns4-cloud.nic.ru. 195.253.65.2, 2a01:5b0:5::2\nnserver: ns5.nic.ru. 31.177.67.100, 2a02:2090:e800:9000:31:177:67:100\nnserver: ns6.nic.ru. 31.177.74.100, 2a02:2090:ec00:9040:31:177:74:100\nnserver: ns7.nic.ru. 31.177.71.100, 2a02:2090:ec00:9000:31:177:71:100\nnserver: ns8-cloud.nic.ru. 195.253.64.10, 2a01:5b0:4::a\nstate: REGISTERED, DELEGATED, VERIFIED\norg: JSC 'RU-CENTER'\nregistrar: RU-CENTER-REG-RIPN\nadmin-contact: https://www.nic.ru/whois\ncreated: 1997.11.28\npaid-till: 2013.12.01\nfree-date: 2014.01.01\nsource: TCI\n\nLast updated on 2013.11.20 08:41:39 MSK\n\n"], "registrar": ["Ru-center-reg-ripn"]} \ No newline at end of file diff --git a/test/target_normalized/prq.se b/test/target_normalized/prq.se index 45c697a..8ee2bfc 100644 --- a/test/target_normalized/prq.se +++ b/test/target_normalized/prq.se @@ -1 +1 @@ -{"status": ["Active", "ok"], "updated_date": ["2012-11-03T00:00:00"], "contacts": {"admin": null, "tech": null, "registrant": {"handle": "perper9352-00001"}, "billing": null}, "nameservers": ["ns.prq.se", "ns.prq.se 193.104.214.194", "ns2.prq.se", "ns2.prq.se 88.80.30.194"], "expiration_date": ["2015-06-14T00:00:00"], "creation_date": ["2004-06-14T00:00:00"], "raw": ["# Copyright (c) 1997- .SE (The Internet Infrastructure Foundation).\n# All rights reserved.\n\n# The information obtained through searches, or otherwise, is protected\n# by the Swedish Copyright Act (1960:729) and international conventions.\n# It is also subject to database protection according to the Swedish\n# Copyright Act.\n\n# Any use of this material to target advertising or\n# similar activities is forbidden and will be prosecuted.\n# If any of the information below is transferred to a third\n# party, it must be done in its entirety. This server must\n# not be used as a backend for a search engine.\n\n# Result of search for registered domain names under\n# the .SE top level domain.\n\n# The data is in the UTF-8 character set and the result is\n# printed with eight bits.\n\nstate: active\ndomain: prq.se\nholder: perper9352-00001\nadmin-c: -\ntech-c: -\nbilling-c: -\ncreated: 2004-06-14\nmodified: 2012-11-03\nexpires: 2015-06-14\ntransferred: 2012-08-09\nnserver: ns.prq.se 193.104.214.194\nnserver: ns2.prq.se 88.80.30.194\ndnssec: unsigned delegation\nstatus: ok\nregistrar: AEB Komm\n\n"], "registrar": ["AEB Komm"]} \ No newline at end of file +{"status": ["Active", "ok"], "updated_date": ["2012-11-03T00:00:00"], "contacts": {"admin": null, "tech": null, "registrant": {"handle": "perper9352-00001"}, "billing": null}, "nameservers": ["ns.prq.se", "ns2.prq.se"], "expiration_date": ["2015-06-14T00:00:00"], "creation_date": ["2004-06-14T00:00:00"], "raw": ["# Copyright (c) 1997- .SE (The Internet Infrastructure Foundation).\n# All rights reserved.\n\n# The information obtained through searches, or otherwise, is protected\n# by the Swedish Copyright Act (1960:729) and international conventions.\n# It is also subject to database protection according to the Swedish\n# Copyright Act.\n\n# Any use of this material to target advertising or\n# similar activities is forbidden and will be prosecuted.\n# If any of the information below is transferred to a third\n# party, it must be done in its entirety. This server must\n# not be used as a backend for a search engine.\n\n# Result of search for registered domain names under\n# the .SE top level domain.\n\n# The data is in the UTF-8 character set and the result is\n# printed with eight bits.\n\nstate: active\ndomain: prq.se\nholder: perper9352-00001\nadmin-c: -\ntech-c: -\nbilling-c: -\ncreated: 2004-06-14\nmodified: 2012-11-03\nexpires: 2015-06-14\ntransferred: 2012-08-09\nnserver: ns.prq.se 193.104.214.194\nnserver: ns2.prq.se 88.80.30.194\ndnssec: unsigned delegation\nstatus: ok\nregistrar: AEB Komm\n\n"], "registrar": ["AEB Komm"]} \ No newline at end of file diff --git a/test/target_normalized/warwick.ac.uk b/test/target_normalized/warwick.ac.uk new file mode 100644 index 0000000..e41aa9f --- /dev/null +++ b/test/target_normalized/warwick.ac.uk @@ -0,0 +1 @@ +{"updated_date": ["2014-02-23T00:00:00"], "contacts": {"admin": null, "tech": null, "registrant": {"city": "Coventry", "fax": "+44 24 7652 3267", "name": "Patrick Green", "phone": "+44 24 7657 4257", "street": "IT Services\nGibbet Hill Road", "country": "United Kingdom", "postalcode": "CV4 7AL", "organization": "University of Warwick", "email": "p.green@warwick.ac.uk"}, "billing": null}, "nameservers": ["extdns1.warwick.ac.uk", "extdns2.warwick.ac.uk"], "expiration_date": ["2016-03-23T00:00:00"], "creation_date": ["2003-11-10T00:00:00"], "raw": ["\nDomain:\n\twarwick.ac.uk\n\nRegistered For:\n\tUniversity of Warwick\n\nDomain Owner:\n\tUniversity of Warwick\n\nRegistered By:\n\tJisc Collections and Janet Limited\n\nServers:\n\textdns1.warwick.ac.uk\t137.205.84.17\n\textdns2.warwick.ac.uk\t137.205.84.18\n\nRegistrant Contact:\n\tPatrick Green\n\nRegistrant Address:\n\tIT Services\n\tGibbet Hill Road\n\tCoventry\n\tCV4 7AL\n\tUnited Kingdom\n\t+44 24 7657 4257 (Phone)\n\t+44 24 7652 3267 (FAX)\n\tP.Green@warwick.ac.uk\n\nRenewal date:\n\tWednesday 23rd Mar 2016\n\nEntry updated:\n\tSunday 23rd February 2014\n\nEntry created:\n\tMonday 10th November 2003\n\n\n"], "registrar": ["Jisc Collections and Janet Limited"]} \ No newline at end of file