From a6828733f06698c554fa332f5d8d3b8107c8ec58 Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Wed, 20 Nov 2013 12:08:35 +0100 Subject: [PATCH] Remove jwhois dependency, separate retrieval and parsing logic, implement registrant parsing for several registries, fix some other regexes, add test data --- pwhois | 87 ++++++ pythonwhois/__init__.py | 314 +-------------------- pythonwhois/net.py | 40 +++ pythonwhois/parse.py | 427 +++++++++++++++++++++++++++++ pythonwhois/shared.py | 2 + setup.py | 7 +- test.py | 20 -- test/data/2x4.ru | 20 ++ test/data/about.museum | 92 +++++++ test/data/anonne.ws | 99 +++++++ test/data/anonnews.org | 87 ++++++ test/data/aridns.net.au | 32 +++ test/data/cryto.net | 95 +++++++ test/data/donuts.co | 104 +++++++ test/data/edis.at | 65 +++++ test/data/encyclopediadramatica.es | Bin 0 -> 2168 bytes test/data/f63.net | 141 ++++++++++ test/data/huskeh.net | 152 ++++++++++ test/data/keybase.io | 18 ++ test/data/lowendbox.com | 122 +++++++++ test/data/nic.ru | 22 ++ test/data/nsa.gov | 10 + test/data/ovh.fr | 103 +++++++ test/data/prq.se | 36 +++ test/data/quadranet.com | 117 ++++++++ test/data/singularity.fr | 94 +++++++ test/data/swisscom.ch | 34 +++ test/data/whois.us | 97 +++++++ test/data/zem.org.uk | 48 ++++ test/domains.txt | 45 +++ 30 files changed, 2197 insertions(+), 333 deletions(-) create mode 100755 pwhois create mode 100644 pythonwhois/net.py create mode 100644 pythonwhois/parse.py create mode 100644 pythonwhois/shared.py delete mode 100644 test.py create mode 100644 test/data/2x4.ru create mode 100644 test/data/about.museum create mode 100644 test/data/anonne.ws create mode 100644 test/data/anonnews.org create mode 100644 test/data/aridns.net.au create mode 100644 test/data/cryto.net create mode 100644 test/data/donuts.co create mode 100644 test/data/edis.at create mode 100644 test/data/encyclopediadramatica.es create mode 100644 test/data/f63.net create mode 100644 test/data/huskeh.net create mode 100644 test/data/keybase.io create mode 100644 test/data/lowendbox.com create mode 100644 test/data/nic.ru create mode 100644 test/data/nsa.gov create mode 100644 test/data/ovh.fr create mode 100644 test/data/prq.se create mode 100644 test/data/quadranet.com create mode 100644 test/data/singularity.fr create mode 100644 test/data/swisscom.ch create mode 100644 test/data/whois.us create mode 100644 test/data/zem.org.uk create mode 100644 test/domains.txt diff --git a/pwhois b/pwhois new file mode 100755 index 0000000..1f3c077 --- /dev/null +++ b/pwhois @@ -0,0 +1,87 @@ +#!/usr/bin/env python2 + +import argparse, pythonwhois +from collections import OrderedDict + +parser = argparse.ArgumentParser(description="Retrieves and parses WHOIS data for a domain name.") +parser.add_argument("-r", "--raw", action="store_true", help="Outputs raw WHOIS data and doesn't attempt to parse it. Segments are separated by a double-dash (--).") +parser.add_argument("-f", "--file", action="store", help="Loads and parses raw double-dash-delimited WHOIS data from a specified file, instead of contacting a WHOIS server.", default=None) +parser.add_argument("domain", nargs=1) +args = parser.parse_args() + +if args.file is None: + data = pythonwhois.net.get_whois_raw(args.domain[0]) +else: + with open(args.file, "r") as f: + data = f.read().split("\n--\n") + +if args.raw == True: + print "\n--\n".join(data) +else: + parsed = pythonwhois.parse.parse_raw_whois(data) + data_map = OrderedDict({}) + + # This defines the fields shown in the output + data_map["status"] = ("Status", 1) + data_map["registrar"] = ("Registrar", 1) + data_map["creation_date"] = ("Registration date", 1) + data_map["expiration_date"] = ("Expiration date", 1) + data_map["updated_date"] = ("Last update", 1) + data_map["name_servers"] = ("Name server", "+") + data_map["emails"] = ("E-mail address", "+") + + widest_label = 0 + for key, value in data_map.iteritems(): + if len(value[0]) > widest_label: + widest_label = len(value[0]) + + for key, value in data_map.iteritems(): + if key in parsed and parsed[key] is not None: + label = value[0] + (" " * (widest_label - len(value[0]))) + " :" + if value[1] == 1: + print "%s %s" % (label, parsed[key][0]) + elif value[1] == "+": + for item in parsed[key]: + print "%s %s" % (label, item) + + if parsed["contacts"] is not None: + # This defines the contacts shown in the output + contacts_map = OrderedDict({}) + contacts_map["registrant"] ="Registrant" + contacts_map["tech"] = "Technical Contact" + contacts_map["admin"] = "Administrative Contact" + contacts_map["billing"] = "Billing Contact" + + # This defines the contact data shown in the output + data_map = OrderedDict({}) + data_map["handle"] ="NIC handle" + data_map["name"] ="Name" + data_map["organization"] = "Organization" + data_map["street"] = "Street address" + data_map["postalcode"] = "Postal code" + data_map["city"] = "City" + data_map["state"] = "State / Province" + data_map["country"] = "Country" + data_map["email"] = "E-mail address" + data_map["phone"] = "Phone number" + data_map["fax"] = "Fax number" + data_map["changedate"] = "Last changed" + + for contact in contacts_map: + if parsed["contacts"][contact] is not None: + contact_data = parsed["contacts"][contact] + + print "\n" + contacts_map[contact] + + for key, value in data_map.iteritems(): + if len(value) > widest_label: + widest_label = len(value) + + for key, value in data_map.iteritems(): + if key in contact_data and contact_data[key] is not None: + label = " " + value + (" " * (widest_label - len(value))) + " :" + actual_data = str(contact_data[key]) + if "\n" in actual_data: # Indent multi-line values properly + lines = actual_data.split("\n") + actual_data = "\n".join([lines[0]] + [(" " * (widest_label + 7)) + line for line in lines[1:]]) + print "%s %s" % (label, actual_data) diff --git a/pythonwhois/__init__.py b/pythonwhois/__init__.py index d851319..3ff71e4 100644 --- a/pythonwhois/__init__.py +++ b/pythonwhois/__init__.py @@ -1,311 +1,5 @@ -#!/usr/bin/python +from . import net, parse -import re, subprocess, datetime - -grammar = { - "_default": { - 'domain_name': 'Domain Name:\s?(?P.+)', - 'registrar': 'Registrar:\s?(?P.+)', - 'whois_server': 'Whois Server:\s?(?P.+)', - 'referral_url': 'Referral URL:\s?(?P.+)', - 'updated_date': 'Updated Date:\s?(?P.+)', - 'creation_date': 'Creation Date:\s?(?P.+)', - 'expiration_date': 'Expiration Date:\s?(?P.+)', - 'name_servers': 'Name Server:\s?(?P.+)', - 'status': 'Status:\s?(?P.+)' - }, - "_fallback": { - 'status': ['state:\s*(?P.+)'], - 'creation_date': ['Created on:\s?(?P.+)', - 'Created on\s?[.]*:\s?(?P.+)\.', - 'Date Registered\s?[.]*:\s?(?P.+)', - 'Domain Created\s?[.]*:\s?(?P.+)', - 'Domain registered\s?[.]*:\s?(?P.+)', - 'Domain record activated\s?[.]*:\s*?(?P.+)', - 'Record created on\s?[.]*:?\s*?(?P.+)', - 'Record created\s?[.]*:?\s*?(?P.+)', - 'Created\s?[.]*:?\s*?(?P.+)', - 'Registered on\s?[.]*:?\s*?(?P.+)', - 'Registered\s?[.]*:?\s*?(?P.+)', - 'Domain Create Date\s?[.]*:?\s*?(?P.+)', - 'Domain Registration Date\s?[.]*:?\s*?(?P.+)'], - 'expiration_date': ['Expires on:\s?(?P.+)', - 'Expires on\s?[.]*:\s?(?P.+)\.', - 'Expiry Date\s?[.]*:\s?(?P.+)', - 'Domain Currently Expires\s?[.]*:\s?(?P.+)', - 'Record will expire on\s?[.]*:\s?(?P.+)', - 'Domain expires\s?[.]*:\s*?(?P.+)', - 'Record expires on\s?[.]*:?\s*?(?P.+)', - 'Record expires\s?[.]*:?\s*?(?P.+)', - 'Expires\s?[.]*:?\s*?(?P.+)', - 'Expire Date\s?[.]*:?\s*?(?P.+)', - 'Expired\s?[.]*:?\s*?(?P.+)', - 'Domain Expiration Date\s?[.]*:?\s*?(?P.+)', - 'paid-till:\s*(?P.+)'], - 'updated_date': ['Database last updated on\s?[.]*:?\s*?(?P.+)\s[a-z]+\.?', - 'Record last updated on\s?[.]*:?\s?(?P.+)\.', - 'Domain record last updated\s?[.]*:\s*?(?P.+)', - 'Domain Last Updated\s?[.]*:\s*?(?P.+)', - 'Last updated on:\s?(?P.+)', - 'Date Modified\s?[.]*:\s?(?P.+)', - 'Last Modified\s?[.]*:\s?(?P.+)', - 'Domain Last Updated Date\s?[.]*:\s?(?P.+)', - 'Record last updated\s?[.]*:\s?(?P.+)', - 'Modified\s?[.]*:\s?(?P.+)', - 'Last Update\s?[.]*:\s?(?P.+)', - 'Last update of whois database:\s?[a-z]{3}, (?P.+) [a-z]{3}'], - 'registrar': ['Registered through:\s?(?P.+)', - 'Registrar Name:\s?(?P.+)', - 'Record maintained by:\s?(?P.+)', - 'Registration Service Provided By:\s?(?P.+)', - 'Registrar of Record:\s?(?P.+)', - 'Registrar:\s?(?P.+)', - '\tName:\t\s(?P.+)'], - 'whois_server': ['Registrar Whois:\s?(?P.+)'], - 'name_servers': ['(?P[a-z]*d?ns[0-9]+([a-z]{3})?\.([a-z0-9-]+\.)+[a-z0-9]+)', - '(?P[a-z0-9-]+\.d?ns[0-9]*\.([a-z0-9-]+\.)+[a-z0-9]+)', - '(?P([a-z0-9-]+\.)+[a-z0-9]+)(\s+([0-9]{1,3}\.){3}[0-9]{1,3})', - 'nserver:\s*(?P[^[\s]+)', - 'DNS[0-9]+:\s*(?P.+)', - 'ns[0-9]+:\s*(?P.+)', - '[^a-z0-9.-](?Pd?ns\.([a-z0-9-]+\.)+[a-z0-9]+)'], - 'emails': ['(?P[\w.-]+@[\w.-]+\.[\w]{2,4})', - '(?P[\w.-]+\sAT\s[\w.-]+\sDOT\s[\w]{2,4})'] - }, - "_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})', - '(?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})', - '(?P[0-9]{4})(?P[0-9]{2})(?P[0-9]{2})\s((?P[0-9]{1,2})[:.](?P[0-9]{1,2})[:.](?P[0-9]{1,2}))' - ), - "_months": { - 'jan': 1, - 'january': 1, - 'feb': 2, - 'february': 2, - 'mar': 3, - 'march': 3, - 'apr': 4, - 'april': 4, - 'may': 5, - 'jun': 6, - 'june': 6, - 'jul': 7, - 'july': 7, - 'aug': 8, - 'august': 8, - 'sep': 9, - 'sept': 9, - 'september': 9, - 'oct': 10, - 'october': 10, - 'nov': 11, - 'november': 11, - 'dec': 12, - 'december': 12 - }, - ".*\.ru$": { - 'domain_name': 'domain:\s*(?P.+)', - 'registrar': 'registrar:\s*(?P.+)', - 'creation_date': 'created:\s*(?P.+)', - 'expiration_date': 'paid-till:\s*(?P.+)', - 'name_servers': 'nserver:\s*(?P.+)', - 'status': 'state:\s*(?P.+)', - 'updated_date': 'Last updated on (?P.+) [a-z]{3}' - }, - ".*\.ee$": { - 'domain_name': 'domain:\s*(?P.+)', - 'registrar': 'registrar:\s*(?P.+)', - 'creation_date': 'registered:\s*(?P.+)', - 'expiration_date': 'expire:\s*(?P.+)', - 'name_servers': 'nserver:\s*(?P.+)', - 'status': 'state:\s*(?P.+)' - }, - ".*\.si$": { - 'domain_name': 'domain:\s*(?P.+)', - 'registrar': 'registrar:\s*(?P.+)', - 'creation_date': 'created:\s*(?P.+)', - 'expiration_date': 'expire:\s*(?P.+)', - 'name_servers': 'nameserver:\s*(?P.+)', - 'status': 'status:\s*(?P.+)' - }, - ".*\.at$": { - 'domain_name': 'domain:\s*(?P.+)', - 'name_servers': 'nserver:\s*(?P.+)', - 'status': 'state:\s*(?P.+)', - 'updated_date': 'changed:\s*(?P.+)' - } -} - -def unicodedammit(input_string): - if isinstance(input_string, str): - return input_string.decode('utf-8') - else: - return input_string - -def whois(domain): - global grammar - ruleset = None - - for regex, rules in grammar.iteritems(): - if regex.startswith("_") == False and re.match(regex, domain): - ruleset = rules - - if ruleset is None: - ruleset = grammar['_default'] - - data = {} - - try: - encoded_domain = unicodedammit(domain).encode('idna') - except UnicodeError, e: - encoded_domain = domain - - ping = subprocess.Popen(["jwhois", "-i", encoded_domain], stdout = subprocess.PIPE, stderr = subprocess.PIPE) - out, error = ping.communicate() - - for line in out.splitlines(): - for rule_key, rule_regex in ruleset.iteritems(): - result = re.search(rule_regex, line, re.IGNORECASE) - - if result is not None: - val = result.group("val").strip() - if val != "": - try: - data[rule_key].append(val) - except KeyError, e: - data[rule_key] = [val] - - # Run through fallback detection to gather missing info - for rule_key, rule_regexes in grammar['_fallback'].iteritems(): - if data.has_key(rule_key) == False: - for line in out.splitlines(): - for regex in rule_regexes: - result = re.search(regex, line, re.IGNORECASE) - - if result is not None: - val = result.group("val").strip() - if val != "": - try: - data[rule_key].append(val) - except KeyError, e: - data[rule_key] = [val] - - # Fill all missing values with None - if data.has_key(rule_key) == False: - data[rule_key] = None - - # Parse dates - if data['expiration_date'] is not None: - data['expiration_date'] = remove_duplicates(data['expiration_date']) - data['expiration_date'] = parse_dates(data['expiration_date']) - - if data['creation_date'] is not None: - data['creation_date'] = remove_duplicates(data['creation_date']) - data['creation_date'] = parse_dates(data['creation_date']) - - if data['updated_date'] is not None: - data['updated_date'] = remove_duplicates(data['updated_date']) - data['updated_date'] = parse_dates(data['updated_date']) - - if data['name_servers'] is not None: - data['name_servers'] = remove_duplicates(data['name_servers']) - - if data['emails'] is not None: - data['emails'] = remove_duplicates(data['emails']) - - if data['registrar'] is not None: - data['registrar'] = remove_duplicates(data['registrar']) - - return out, data - -def parse_dates(dates): - global grammar - parsed_dates = [] - - for date in dates: - for rule in grammar['_dateformats']: - result = re.match(rule, date, re.IGNORECASE) - - if result is not None: - try: - # These are always numeric. If they fail, there is no valid date present. - year = int(result.group("year")) - day = int(result.group("day")) - - # Detect and correct shorthand year notation - if year < 60: - year += 2000 - elif year < 100: - year += 1900 - - # This will require some more guesswork - some WHOIS servers present the name of the month - try: - month = int(result.group("month")) - except ValueError, e: - # Apparently not a number. Look up the corresponding number. - try: - month = grammar['_months'][result.group("month").lower()] - except KeyError, e: - # Unknown month name, default to 0 - month = 0 - - try: - hour = int(result.group("hour")) - except IndexError, e: - hour = 0 - except TypeError, e: - hour = 0 - - try: - minute = int(result.group("minute")) - except IndexError, e: - minute = 0 - except TypeError, e: - minute = 0 - - try: - second = int(result.group("second")) - except IndexError, e: - second = 0 - except TypeError, e: - second = 0 - - break - except ValueError, e: - # Something went horribly wrong, maybe there is no valid date present? - year = 0 - month = 0 - day = 0 - hour = 0 - minute = 0 - second = 0 - print e.message - try: - if year > 0: - try: - parsed_dates.append(datetime.datetime(year, month, day, hour, minute, second)) - except ValueError, e: - # We might have gotten the day and month the wrong way around, let's try it the other way around - # If you're not using an ISO-standard date format, you're an evil registrar! - parsed_dates.append(datetime.datetime(year, day, month, hour, minute, second)) - except UnboundLocalError, e: - pass - - if len(parsed_dates) > 0: - return parsed_dates - else: - return None - -def remove_duplicates(data): - cleaned_list = [] - - for entry in data: - if entry not in cleaned_list: - cleaned_list.append(entry) - - return cleaned_list +def get_whois(domain): + raw_data = net.get_whois_raw(domain) + return parse.parse_raw_whois(raw_data) diff --git a/pythonwhois/net.py b/pythonwhois/net.py new file mode 100644 index 0000000..9d31aba --- /dev/null +++ b/pythonwhois/net.py @@ -0,0 +1,40 @@ +import socket, re +from . import shared + +def get_whois_raw(domain, server="", previous=[]): + if len(previous) == 0: + # Root query + target_server = get_root_server(domain) + else: + target_server = server + response = whois_request(domain, target_server) + new_list = [response] + previous + for line in [x.strip() for x in response.splitlines()]: + match = re.match("(refer|whois server|referral url|whois server|registrar whois):\s*([^\s]+)", line, re.IGNORECASE) + if match is not None: + referal_server = match.group(2) + if referal_server != server: + # Referal to another WHOIS server... + return get_whois_raw(domain, referal_server, new_list) + return new_list + +def get_root_server(domain): + data = whois_request(domain, "whois.iana.org") + for line in [x.strip() for x in data.splitlines()]: + match = re.match("refer:\s*([^\s]+)", line) + if match is None: + continue + return match.group(1) + raise shared.WhoisException("No root WHOIS server found for TLD.") + +def whois_request(domain, server, port=43): + sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + sock.connect((server, port)) + sock.send("%s\r\n" % domain) + buff = "" + while True: + data = sock.recv(1024) + if len(data) == 0: + break + buff += data + return buff diff --git a/pythonwhois/parse.py b/pythonwhois/parse.py new file mode 100644 index 0000000..a631811 --- /dev/null +++ b/pythonwhois/parse.py @@ -0,0 +1,427 @@ +import re, datetime + +grammar = { + "_data": { + 'status': ['Status\s*:\s?(?P.+)', + 'state:\s*(?P.+)'], + 'creation_date': ['Creation Date:\s?(?P.+)', + 'Created on:\s?(?P.+)', + 'Created on\s?[.]*:\s?(?P.+)\.', + 'Date Registered\s?[.]*:\s?(?P.+)', + 'Domain Created\s?[.]*:\s?(?P.+)', + 'Domain registered\s?[.]*:\s?(?P.+)', + 'Domain record activated\s?[.]*:\s*?(?P.+)', + 'Record created on\s?[.]*:?\s*?(?P.+)', + 'Record created\s?[.]*:?\s*?(?P.+)', + 'Created\s?[.]*:?\s*?(?P.+)', + 'Registered on\s?[.]*:?\s*?(?P.+)', + 'Registered\s?[.]*:?\s*?(?P.+)', + 'Domain Create Date\s?[.]*:?\s*?(?P.+)', + 'Domain Registration Date\s?[.]*:?\s*?(?P.+)', + 'created:\s*(?P.+)', + 'registered:\s*(?P.+)'], + 'expiration_date': ['Expiration Date:\s?(?P.+)', + 'Expires on:\s?(?P.+)', + 'Expires on\s?[.]*:\s?(?P.+)\.', + 'Expiry Date\s?[.]*:\s?(?P.+)', + 'Expiry\s*:\s?(?P.+)', + 'Domain Currently Expires\s?[.]*:\s?(?P.+)', + 'Record will expire on\s?[.]*:\s?(?P.+)', + 'Domain expires\s?[.]*:\s*?(?P.+)', + 'Record expires on\s?[.]*:?\s*?(?P.+)', + 'Record expires\s?[.]*:?\s*?(?P.+)', + 'Expires\s?[.]*:?\s*?(?P.+)', + 'Expire Date\s?[.]*:?\s*?(?P.+)', + 'Expired\s?[.]*:?\s*?(?P.+)', + 'Domain Expiration Date\s?[.]*:?\s*?(?P.+)', + 'paid-till:\s*(?P.+)', + 'expire:\s*(?P.+)'], + 'updated_date': ['Updated Date:\s?(?P.+)', + #'Database last updated on\s?[.]*:?\s*?(?P.+)\s[a-z]+\.?', + 'Record last updated on\s?[.]*:?\s?(?P.+)\.', + 'Domain record last updated\s?[.]*:\s*?(?P.+)', + 'Domain Last Updated\s?[.]*:\s*?(?P.+)', + 'Last updated on:\s?(?P.+)', + 'Date Modified\s?[.]*:\s?(?P.+)', + 'Last Modified\s?[.]*:\s?(?P.+)', + 'Domain Last Updated Date\s?[.]*:\s?(?P.+)', + 'Record last updated\s?[.]*:\s?(?P.+)', + 'Modified\s?[.]*:\s?(?P.+)', + 'changed:\s*(?P.+)', + 'Last Update\s?[.]*:\s?(?P.+)', + 'Last updated on (?P.+) [a-z]{3}', + 'Last update of whois database:\s?[a-z]{3}, (?P.+) [a-z]{3}'], + 'registrar': ['registrar:\s*(?P.+)', + 'Registrar:\s*(?P.+)', + 'Registered through:\s?(?P.+)', + 'Registrar Name:\s?(?P.+)', + 'Record maintained by:\s?(?P.+)', + 'Registration Service Provided By:\s?(?P.+)', + 'Registrar of Record:\s?(?P.+)', + '\tName:\t\s(?P.+)'], + 'whois_server': ['Whois Server:\s?(?P.+)', + 'Registrar Whois:\s?(?P.+)'], + 'name_servers': ['Name Server:\s?(?P.+)', + '(?P[a-z]*d?ns[0-9]+([a-z]{3})?\.([a-z0-9-]+\.)+[a-z0-9]+)', + 'nameserver:\s*(?P.+)', + 'nserver:\s*(?P[^[\s]+)', + 'DNS[0-9]+:\s*(?P.+)', + 'ns[0-9]+:\s*(?P.+)', + 'NS [0-9]+\s*:\s*(?P.+)', + '(?P[a-z0-9-]+\.d?ns[0-9]*\.([a-z0-9-]+\.)+[a-z0-9]+)', + '(?P([a-z0-9-]+\.)+[a-z0-9]+)(\s+([0-9]{1,3}\.){3}[0-9]{1,3})', + '[^a-z0-9.-](?Pd?ns\.([a-z0-9-]+\.)+[a-z0-9]+)'], + 'emails': ['(?P[\w.-]+@[\w.-]+\.[\w]{2,4})', + '(?P[\w.-]+\sAT\s[\w.-]+\sDOT\s[\w]{2,4})'] + }, + "_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})', + '(?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})', + '(?P[0-9]{4})(?P[0-9]{2})(?P[0-9]{2})\s((?P[0-9]{1,2})[:.](?P[0-9]{1,2})[:.](?P[0-9]{1,2}))' + ), + "_months": { + 'jan': 1, + 'january': 1, + 'feb': 2, + 'february': 2, + 'mar': 3, + 'march': 3, + 'apr': 4, + 'april': 4, + 'may': 5, + 'jun': 6, + 'june': 6, + 'jul': 7, + 'july': 7, + 'aug': 8, + 'august': 8, + 'sep': 9, + 'sept': 9, + 'september': 9, + 'oct': 10, + 'october': 10, + 'nov': 11, + 'november': 11, + 'dec': 12, + 'december': 12 + } +} + +def parse_raw_whois(raw_data): + data = {} + + raw_data = [segment.replace("\r", "") for segment in raw_data] # Carriage returns are the devil + + for segment in raw_data: + for rule_key, rule_regexes in grammar['_data'].iteritems(): + if data.has_key(rule_key) == False: + for line in segment.splitlines(): + for regex in rule_regexes: + result = re.search(regex, line, re.IGNORECASE) + + if result is not None: + val = result.group("val").strip() + if val != "": + try: + data[rule_key].append(val) + except KeyError, e: + data[rule_key] = [val] + + # Fill all missing values with None + for rule_key, rule_regexes in grammar['_data'].iteritems(): + if data.has_key(rule_key) == False: + data[rule_key] = None + + data["contacts"] = parse_registrants(raw_data) + + # Parse dates + if data['expiration_date'] is not None: + data['expiration_date'] = remove_duplicates(data['expiration_date']) + data['expiration_date'] = parse_dates(data['expiration_date']) + + if data['creation_date'] is not None: + data['creation_date'] = remove_duplicates(data['creation_date']) + data['creation_date'] = parse_dates(data['creation_date']) + + if data['updated_date'] is not None: + data['updated_date'] = remove_duplicates(data['updated_date']) + data['updated_date'] = parse_dates(data['updated_date']) + + if data['name_servers'] is not None: + data['name_servers'] = remove_duplicates([ns.rstrip(".") for ns in data['name_servers']]) + + if data['emails'] is not None: + data['emails'] = remove_duplicates(data['emails']) + + if data['registrar'] is not None: + data['registrar'] = remove_duplicates(data['registrar']) + + # Remove e-mail addresses if they are already listed for any of the contacts + known_emails = [] + for contact in ("registrant", "tech", "admin", "billing"): + if data["contacts"][contact] is not None: + try: + known_emails.append(data["contacts"][contact]["email"]) + except KeyError, e: + pass # No e-mail recorded for this contact... + if data['emails'] is not None: + data['emails'] = [email for email in data["emails"] if email not in known_emails] + + data["raw"] = raw_data + + return data + +def parse_dates(dates): + global grammar + parsed_dates = [] + + for date in dates: + for rule in grammar['_dateformats']: + result = re.match(rule, date, re.IGNORECASE) + + if result is not None: + try: + # These are always numeric. If they fail, there is no valid date present. + year = int(result.group("year")) + day = int(result.group("day")) + + # Detect and correct shorthand year notation + if year < 60: + year += 2000 + elif year < 100: + year += 1900 + + # This will require some more guesswork - some WHOIS servers present the name of the month + try: + month = int(result.group("month")) + except ValueError, e: + # Apparently not a number. Look up the corresponding number. + try: + month = grammar['_months'][result.group("month").lower()] + except KeyError, e: + # Unknown month name, default to 0 + month = 0 + + try: + hour = int(result.group("hour")) + except IndexError, e: + hour = 0 + except TypeError, e: + hour = 0 + + try: + minute = int(result.group("minute")) + except IndexError, e: + minute = 0 + except TypeError, e: + minute = 0 + + try: + second = int(result.group("second")) + except IndexError, e: + second = 0 + except TypeError, e: + second = 0 + + break + except ValueError, e: + # Something went horribly wrong, maybe there is no valid date present? + year = 0 + month = 0 + day = 0 + hour = 0 + minute = 0 + second = 0 + print e.message + try: + if year > 0: + try: + parsed_dates.append(datetime.datetime(year, month, day, hour, minute, second)) + except ValueError, e: + # We might have gotten the day and month the wrong way around, let's try it the other way around + # If you're not using an ISO-standard date format, you're an evil registrar! + parsed_dates.append(datetime.datetime(year, day, month, hour, minute, second)) + except UnboundLocalError, e: + pass + + if len(parsed_dates) > 0: + return parsed_dates + else: + return None + +def remove_duplicates(data): + cleaned_list = [] + + for entry in data: + if entry not in cleaned_list: + cleaned_list.append(entry) + + return cleaned_list + +def parse_registrants(data): + registrant = None + tech_contact = None + billing_contact = None + admin_contact = None + + registrant_regexes = [ + "Registrant:\n (?P.+)\n (?P.+)\n(?: (?P.*)\n)?(?: (?P.*)\n)? (?P.+), (?P.+)\n (?P.+)\n (?P.+)\n (?P.+)\n\n", # OVH + "Registrant ID:(?P.+)\nRegistrant Name:(?P.*)\nRegistrant Organization:(?P.*)\nRegistrant Street1:(?P.*)\nRegistrant Street2:(?P.*)\nRegistrant Street3:(?P.*)\nRegistrant City:(?P.*)\nRegistrant State/Province:(?P.*)\nRegistrant Postal Code:(?P.*)\nRegistrant Country:(?P.*)\nRegistrant Phone:(?P.*)\nRegistrant Phone Ext.:(?P.*)\nRegistrant FAX:(?P.*)\nRegistrant FAX Ext.:(?P.*)\nRegistrant Email:(?P.*)", # Public Interest Registry (.org) + "Registrant ID:\s*(?P.+)\nRegistrant Name:\s*(?P.+)\nRegistrant Organization:\s*(?P.*)\nRegistrant Address1:\s*(?P.+)\nRegistrant Address2:\s*(?P.*)\nRegistrant City:\s*(?P.+)\nRegistrant State/Province:\s*(?P.+)\nRegistrant Postal Code:\s*(?P.+)\nRegistrant Country:\s*(?P.+)\nRegistrant Country Code:\s*(?P.+)\nRegistrant Phone Number:\s*(?P.+)\nRegistrant Email:\s*(?P.+)\n", # .CO Internet + "Registrant Contact: (?P.+)\nRegistrant Organization: (?P.+)\nRegistrant Name: (?P.+)\nRegistrant Street: (?P.+)\nRegistrant City: (?P.+)\nRegistrant Postal Code: (?P.+)\nRegistrant State: (?P.+)\nRegistrant Country: (?P.+)\nRegistrant Phone: (?P.*)\nRegistrant Phone Ext: (?P.*)\nRegistrant Fax: (?P.*)\nRegistrant Fax Ext: (?P.*)\nRegistrant Email: (?P.*)\n", # Key-Systems GmbH + "Registrant Name: (?P.+)\nRegistrant Organization: (?P.*)\nRegistrant Street: (?P.+)\n(?:Registrant Street: (?P.+)\n)?Registrant City: (?P.+)\nRegistrant State\/Province: (?P.+)\nRegistrant Postal Code: (?P.+)\nRegistrant Country: (?P.+)\n(?:Registrant Phone: (?P.+)\n)?(?:Registrant Phone Ext: (?P.*)\n)?(?:Registrant Fax: (?P.+)\n)?(?:Registrant Fax Ext: (?P.*)\n)?(?:Registrant Email: (?P.+)\n)?", # WildWestDomains, GoDaddy, Namecheap + "Registrant\n (?P.+)\n Email:(?P.+)\n (?P.+)\n(?: (?P.+)\n)? (?P.+) (?P.+)\n (?P.+)\n Tel: (?P.+)\n\n", # internet.bs + "Holder of domain name:\n(?P[\S\s]+)\n(?P.+)\n(?P[A-Z0-9-]+)\s+(?P.+)\n(?P.+)\nContractual Language", # nic.ch + "\n\n(?:Owner)?\s+: (?P.*)\n(?:\s+: (?P.*)\n)?\s+: (?P.*)\n\s+: (?P.*)\n\s+: (?P.*)\n\s+: (?P.*)\n", # nic.io + "person:\s+(?P.+)", # nic.ru (person) + "org:\s+(?P.+)", # nic.ru (organization) + ] + + tech_contact_regexes = [ + "Technical Contact:\n (?P.+)\n (?P.+)\n(?: (?P.*)\n)?(?: (?P.*)\n)? (?P.+), (?P.+)\n (?P.+)\n (?P.+)\n (?P.+)\n\n", # OVH + "Tech ID:(?P.+)\nTech Name:(?P.*)\nTech Organization:(?P.*)\nTech Street1:(?P.*)\nTech Street2:(?P.*)\nTech Street3:(?P.*)\nTech City:(?P.*)\nTech State/Province:(?P.*)\nTech Postal Code:(?P.*)\nTech Country:(?P.*)\nTech Phone:(?P.*)\nTech Phone Ext.:(?P.*)\nTech FAX:(?P.*)\nTech FAX Ext.:(?P.*)\nTech Email:(?P.*)", # Public Interest Registry (.org) + "Technical Contact ID:\s*(?P.+)\nTechnical Contact Name:\s*(?P.+)\nTechnical Contact Organization:\s*(?P.*)\nTechnical Contact Address1:\s*(?P.+)\nTechnical Contact Address2:\s*(?P.*)\nTechnical Contact City:\s*(?P.+)\nTechnical Contact State/Province:\s*(?P.+)\nTechnical Contact Postal Code:\s*(?P.+)\nTechnical Contact Country:\s*(?P.+)\nTechnical Contact Country Code:\s*(?P.+)\nTechnical Contact Phone Number:\s*(?P.+)\nTechnical Contact Email:\s*(?P.+)\n", # .CO Internet + "Tech Contact: (?P.+)\nTech Organization: (?P.+)\nTech Name: (?P.+)\nTech Street: (?P.+)\nTech City: (?P.+)\nTech Postal Code: (?P.+)\nTech State: (?P.+)\nTech Country: (?P.+)\nTech Phone: (?P.*)\nTech Phone Ext: (?P.*)\nTech Fax: (?P.*)\nTech Fax Ext: (?P.*)\nTech Email: (?P.*)\n", # Key-Systems GmbH + "Tech Name: (?P.+)\nTech Organization: (?P.*)\nTech Street: (?P.+)\n(?:Tech Street: (?P.+)\n)?Tech City: (?P.+)\nTech State\/Province: (?P.+)\nTech Postal Code: (?P.+)\nTech Country: (?P.+)\n(?:Tech Phone: (?P.+)\n)?(?:Tech Phone Ext: (?P.*)\n)?(?:Tech Fax: (?P.+)\n)?(?:Tech Fax Ext: (?P.*)\n)?(?:Tech Email: (?P.+)\n)?", # WildWestDomains, GoDaddy, Namecheap + "Technical Contact\n (?P.+)\n Email:(?P.+)\n (?P.+)\n(?: (?P.+)\n)? (?P.+) (?P.+)\n (?P.+)\n Tel: (?P.+)\n\n", # internet.bs + "Technical contact:\n(?P[\S\s]+)\n(?P.+)\n(?P[A-Z0-9-]+)\s+(?P.+)\n(?P.+)\n\n" # nic.ch + ] + + admin_contact_regexes = [ + "Administrative Contact:\n (?P.+)\n (?P.+)\n(?: (?P.*)\n)?(?: (?P.*)\n)? (?P.+), (?P.+)\n (?P.+)\n (?P.+)\n (?P.+)\n\n", # OVH + "Admin ID:(?P.+)\nAdmin Name:(?P.*)\nAdmin Organization:(?P.*)\nAdmin Street1:(?P.*)\nAdmin Street2:(?P.*)\nAdmin Street3:(?P.*)\nAdmin City:(?P.*)\nAdmin State/Province:(?P.*)\nAdmin Postal Code:(?P.*)\nAdmin Country:(?P.*)\nAdmin Phone:(?P.*)\nAdmin Phone Ext.:(?P.*)\nAdmin FAX:(?P.*)\nAdmin FAX Ext.:(?P.*)\nAdmin Email:(?P.*)", # Public Interest Registry (.org) + "Administrative Contact ID:\s*(?P.+)\nAdministrative Contact Name:\s*(?P.+)\nAdministrative Contact Organization:\s*(?P.*)\nAdministrative Contact Address1:\s*(?P.+)\nAdministrative Contact Address2:\s*(?P.*)\nAdministrative Contact City:\s*(?P.+)\nAdministrative Contact State/Province:\s*(?P.+)\nAdministrative Contact Postal Code:\s*(?P.+)\nAdministrative Contact Country:\s*(?P.+)\nAdministrative Contact Country Code:\s*(?P.+)\nAdministrative Contact Phone Number:\s*(?P.+)\nAdministrative Contact Email:\s*(?P.+)\n", # .CO Internet + "Admin Contact: (?P.+)\nAdmin Organization: (?P.+)\nAdmin Name: (?P.+)\nAdmin Street: (?P.+)\nAdmin City: (?P.+)\nAdmin State: (?P.+)\nAdmin Postal Code: (?P.+)\nAdmin Country: (?P.+)\nAdmin Phone: (?P.*)\nAdmin Phone Ext: (?P.*)\nAdmin Fax: (?P.*)\nAdmin Fax Ext: (?P.*)\nAdmin Email: (?P.*)\n", # Key-Systems GmbH + "Admin Name: (?P.+)\nAdmin Organization: (?P.*)\nAdmin Street: (?P.+)\n(?:Admin Street: (?P.+)\n)?Admin City: (?P.+)\nAdmin State\/Province: (?P.+)\nAdmin Postal Code: (?P.+)\nAdmin Country: (?P.+)\n(?:Admin Phone: (?P.+)\n)?(?:Admin Phone Ext: (?P.*)\n)?(?:Admin Fax: (?P.+)\n)?(?:Admin Fax Ext: (?P.*)\n)?(?:Admin Email: (?P.+)\n)?", # WildWestDomains, GoDaddy, Namecheap + "Administrative Contact\n (?P.+)\n Email:(?P.+)\n (?P.+)\n(?: (?P.+)\n)? (?P.+) (?P.+)\n (?P.+)\n Tel: (?P.+)\n\n", # internet.bs + ] + + billing_contact_regexes = [ + "Billing Contact ID:\s*(?P.+)\nBilling Contact Name:\s*(?P.+)\nBilling Contact Organization:\s*(?P.*)\nBilling Contact Address1:\s*(?P.+)\nBilling Contact Address2:\s*(?P.*)\nBilling Contact City:\s*(?P.+)\nBilling Contact State/Province:\s*(?P.+)\nBilling Contact Postal Code:\s*(?P.+)\nBilling Contact Country:\s*(?P.+)\nBilling Contact Country Code:\s*(?P.+)\nBilling Contact Phone Number:\s*(?P.+)\nBilling Contact Email:\s*(?P.+)\n", # .CO Internet + "Billing Contact: (?P.+)\nBilling Organization: (?P.+)\nBilling Name: (?P.+)\nBilling Street: (?P.+)\nBilling City: (?P.+)\nBilling Postal Code: (?P.+)\nBilling State: (?P.+)\nBilling Country: (?P.+)\nBilling Phone: (?P.*)\nBilling Phone Ext: (?P.*)\nBilling Fax: (?P.*)\nBilling Fax Ext: (?P.*)\nBilling Email: (?P.*)\n", # Key-Systems GmbH + "Billing Contact:\n (?P.+)\n (?P.+)\n(?: (?P.*)\n)?(?: (?P.*)\n)? (?P.+), (?P.+)\n (?P.+)\n (?P.+)\n (?P.+)\n\n", # OVH + ] + + # Some registries use NIC handle references instead of directly listing contacts... + + nic_contact_regexes = [ + "personname:\s*(?P.+)\norganization:\s*(?P.+)\nstreet address:\s*(?P.+)\npostal code:\s*(?P.+)\ncity:\s*(?P.+)\ncountry:\s*(?P.+)\nphone:\s*(?P.+)\nfax-no:\s*(?P.+)\ne-mail:\s*(?P.+)\nnic-hdl:\s*(?P.+)\nchanged:\s*(?P.+)", # nic.at + "nic-hdl:\s*(?P.+)\ntype:\s*(?P.+)\ncontact:\s*(?P.+)\n(?:.+\n)*?(?:address:\s*(?P.+)\naddress:\s*(?P.+)\naddress:\s*(?P.+)\naddress:\s*(?P.+)\n)?(?:phone:\s*(?P.+)\n)?(?:fax-no:\s*(?P.+)\n)?(?:.+\n)*?(?:e-mail:\s*(?P.+)\n)?(?:.+\n)*?changed:\s*(?P[0-9]{2}\/[0-9]{2}\/[0-9]{4}).*\n", # AFNIC madness without country field + "nic-hdl:\s*(?P.+)\ntype:\s*(?P.+)\ncontact:\s*(?P.+)\n(?:.+\n)*?(?:address:\s*(?P.+)\n)?(?:address:\s*(?P.+)\n)?(?:address:\s*(?P.+)\n)?(?:phone:\s*(?P.+)\n)?(?:fax-no:\s*(?P.+)\n)?(?:.+\n)*?(?:e-mail:\s*(?P.+)\n)?(?:.+\n)*?changed:\s*(?P[0-9]{2}\/[0-9]{2}\/[0-9]{4}).*\n", # AFNIC madness any country -at all- + "nic-hdl:\s*(?P.+)\ntype:\s*(?P.+)\ncontact:\s*(?P.+)\n(?:.+\n)*?(?:address:\s*(?P.+)\n)?(?:address:\s*(?P.+)\n)?(?:address:\s*(?P.+)\n)?(?:address:\s*(?P.+)\n)?country:\s*(?P.+)\n(?:phone:\s*(?P.+)\n)?(?:fax-no:\s*(?P.+)\n)?(?:.+\n)*?(?:e-mail:\s*(?P.+)\n)?(?:.+\n)*?changed:\s*(?P[0-9]{2}\/[0-9]{2}\/[0-9]{4}).*\n", # AFNIC madness with country field + + ] + + nic_contact_references = { + "registrant": [ + "registrant:\s*(?P.+)", # nic.at + "holder-c:\s*(?P.+)", # AFNIC + ], + "tech": [ + "tech-c:\s*(?P.+)", # nic.at, AFNIC + ], + "admin": [ + "admin-c:\s*(?P.+)", # nic.at, AFNIC + ], + } + + for regex in registrant_regexes: + for segment in data: + match = re.search(regex, segment) + if match is not None: + registrant = match.groupdict() + break + + for regex in tech_contact_regexes: + for segment in data: + match = re.search(regex, segment) + if match is not None: + tech_contact = match.groupdict() + break + + for regex in admin_contact_regexes: + for segment in data: + match = re.search(regex, segment) + if match is not None: + admin_contact = match.groupdict() + break + + for regex in billing_contact_regexes: + for segment in data: + match = re.search(regex, segment) + if match is not None: + billing_contact = match.groupdict() + break + + # Find NIC handle contact definitions + handle_contacts = [] + for regex in nic_contact_regexes: + for segment in data: + matches = re.finditer(regex, segment) + for match in matches: + handle_contacts.append(match.groupdict()) + + # Find NIC handle references and process them + for category in nic_contact_references: + for regex in nic_contact_references[category]: + for segment in data: + match = re.search(regex, segment) + if match is not None: + data_reference = match.groupdict() + for contact in handle_contacts: + if contact["handle"] == data_reference["handle"]: + data_reference.update(contact) + if category == "registrant": + registrant = data_reference + elif category == "tech": + tech_contact = data_reference + elif category == "billing": + billing_contact = data_reference + elif category == "admin": + admin_contact = data_reference + break + + # Post-processing + for obj in (registrant, tech_contact, billing_contact, admin_contact): + if obj is not None: + for key in obj.keys(): + #obj[key] = obj[key].strip("\r") + if obj[key] is None or obj[key] == "": + del obj[key] + if "phone_ext" in obj: + if "phone" in obj: + obj["phone"] += "ext. %s" % obj["phone_ext"] + del obj["phone_ext"] + if "street1" in obj: + street_items = [] + i = 1 + while True: + try: + street_items.append(obj["street%d" % i]) + del obj["street%d" % i] + except KeyError, e: + break + i += 1 + obj["street"] = "\n".join(street_items) + if 'changedate' in obj: + obj['changedate'] = parse_dates([obj['changedate']])[0] + if 'street' in obj and "\n" in obj["street"] and 'postalcode' not in obj: + # Deal with certain mad WHOIS servers that don't properly delimit address data... (yes, AFNIC, looking at you) + lines = [x.strip() for x in obj["street"].splitlines()] + if " " in lines[-1]: + postal_code, city = lines[-1].split(" ", 1) + obj["postalcode"] = postal_code + obj["city"] = city + obj["street"] = "\n".join(lines[:-1]) + + return { + "registrant": registrant, + "tech": tech_contact, + "admin": admin_contact, + "billing": billing_contact, + } diff --git a/pythonwhois/shared.py b/pythonwhois/shared.py new file mode 100644 index 0000000..0075da3 --- /dev/null +++ b/pythonwhois/shared.py @@ -0,0 +1,2 @@ +class WhoisException(Exception): + pass diff --git a/setup.py b/setup.py index 4613129..3496815 100644 --- a/setup.py +++ b/setup.py @@ -1,11 +1,12 @@ from setuptools import setup setup(name='pythonwhois', - version='1.2.2', - description='Module for retrieving and parsing the WHOIS data for a domain. Supports most domains. Requires jwhois to be installed.', + version='2.0.0', + description='Module for retrieving and parsing the WHOIS data for a domain. Supports most domains. No dependencies.', author='Sven Slootweg', author_email='pythonwhois@cryto.net', url='http://cryto.net/pythonwhois', packages=['pythonwhois'], - provides=['pythonwhois'] + provides=['pythonwhois'], + scripts=["pwhois"] ) diff --git a/test.py b/test.py deleted file mode 100644 index 1640167..0000000 --- a/test.py +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/python -import sys, pythonwhois - -testlist = open("testlist.txt").readlines() - -#for line in testlist: -# result = pythonwhois.whois(line) -# -# if result['updated_date'] is None: -# print "WHOIS for %s does not contain an update date?" % line - -#result = pythonwhois.whois("google.com") -raw, result = pythonwhois.whois(sys.argv[1]) -print raw -print result - -#print "Creation date: ", -#print result['creation_date'] -#print "Expiration date: ", -#print result['expiration_date'] diff --git a/test/data/2x4.ru b/test/data/2x4.ru new file mode 100644 index 0000000..fb9a9fc --- /dev/null +++ b/test/data/2x4.ru @@ -0,0 +1,20 @@ +% By submitting a query to RIPN's Whois Service +% you agree to abide by the following terms of use: +% http://www.ripn.net/about/servpol.html#3.2 (in Russian) +% http://www.ripn.net/about/en/servpol.html#3.2 (in English). + +domain: 2X4.RU +nserver: dns1.yandex.net. +nserver: dns2.yandex.net. +state: REGISTERED, DELEGATED, VERIFIED +person: Private Person +registrar: RU-CENTER-REG-RIPN +admin-contact: https://www.nic.ru/whois +created: 2004.06.24 +paid-till: 2014.06.24 +free-date: 2014.07.25 +source: TCI + +Last updated on 2013.11.20 08:16:36 MSK + + diff --git a/test/data/about.museum b/test/data/about.museum new file mode 100644 index 0000000..5bad65c --- /dev/null +++ b/test/data/about.museum @@ -0,0 +1,92 @@ +% Musedoma Whois Server Copyright (C) 2007 Museum Domain Management Association +% +% NOTICE: Access to Musedoma Whois information is provided to assist in +% determining the contents of an object name registration record in the +% Musedoma database. The data in this record is provided by Musedoma for +% informational purposes only, and Musedoma does not guarantee its +% accuracy. This service is intended only for query-based access. You +% agree that you will use this data only for lawful purposes and that, +% under no circumstances will you use this data to: (a) allow, enable, +% or otherwise support the transmission by e-mail, telephone or +% facsimile of unsolicited, commercial advertising or solicitations; or +% (b) enable automated, electronic processes that send queries or data +% to the systems of Musedoma or registry operators, except as reasonably +% necessary to register object names or modify existing registrations. +% All rights reserved. Musedoma reserves the right to modify these terms at +% any time. By submitting this query, you agree to abide by this policy. +% +% WARNING: THIS RESPONSE IS NOT AUTHENTIC +% +% The selected character encoding "US-ASCII" is not able to represent all +% characters in this output. Those characters that could not be represented +% have been replaced with the unaccented ASCII equivalents. Please +% resubmit your query with a suitable character encoding in order to receive +% an authentic response. +% +Domain ID: D6137686-MUSEUM +Domain Name: about.museum +Domain Name ACE: about.museum +Domain Language: +Registrar ID: CORE-904 (Musedoma) +Created On: 2005-02-04 19:32:48 GMT +Expiration Date: 2015-02-04 19:32:48 GMT +Maintainer: http://musedoma.museum +Status: ok +Registrant ID: C728-MUSEUM +Registrant Name: Cary Karp +Registrant Organization: Museum Domain Management Association +Registrant Street: Frescativaegen 40 +Registrant City: Stockholm +Registrant State/Province: +Registrant Postal Code: 104 05 +Registrant Country: SE +Registrant Phone: +Registrant Phone Ext: +Registrant Fax: +Registrant Fax Ext: +Registrant Email: ck@nic.museum +Admin ID: C728-MUSEUM +Admin Name: Cary Karp +Admin Organization: Museum Domain Management Association +Admin Street: Frescativaegen 40 +Admin City: Stockholm +Admin State/Province: +Admin Postal Code: 104 05 +Admin Country: SE +Admin Phone: +Admin Phone Ext: +Admin Fax: +Admin Fax Ext: +Admin Email: ck@nic.museum +Tech ID: C728-MUSEUM +Tech Name: Cary Karp +Tech Organization: Museum Domain Management Association +Tech Street: Frescativaegen 40 +Tech City: Stockholm +Tech State/Province: +Tech Postal Code: 104 05 +Tech Country: SE +Tech Phone: +Tech Phone Ext: +Tech Fax: +Tech Fax Ext: +Tech Email: ck@nic.museum +Billing ID: C728-MUSEUM +Billing Name: Cary Karp +Billing Organization: Museum Domain Management Association +Billing Street: Frescativaegen 40 +Billing City: Stockholm +Billing State/Province: +Billing Postal Code: 104 05 +Billing Country: SE +Billing Phone: +Billing Phone Ext: +Billing Fax: +Billing Fax Ext: +Billing Email: ck@nic.museum +Name Server: nic.frd.se +Name Server ACE: nic.frd.se +Name Server: nic.museum 130.242.24.5 +Name Server ACE: nic.museum 130.242.24.5 + + diff --git a/test/data/anonne.ws b/test/data/anonne.ws new file mode 100644 index 0000000..c1ce7f4 --- /dev/null +++ b/test/data/anonne.ws @@ -0,0 +1,99 @@ + + +Domain Name: ANONNE.WS +Creation Date: 2012-04-07 12:40:00Z +Registrar Registration Expiration Date: 2014-04-07 19:40:22Z +Registrar: ENOM, INC. +Reseller: NAMECHEAP.COM +Registrant Name: SVEN SLOOTWEG +Registrant Organization: +Registrant Street: WIJNSTRAAT 211 +Registrant City: DORDRECHT +Registrant State/Province: ZUID-HOLLAND +Registrant Postal Code: 3311BV +Registrant Country: NL +Admin Name: SVEN SLOOTWEG +Admin Organization: +Admin Street: WIJNSTRAAT 211 +Admin City: DORDRECHT +Admin State/Province: ZUID-HOLLAND +Admin Postal Code: 3311BV +Admin Country: NL +Admin Phone: +31.626519955 +Admin Phone Ext: +Admin Fax: +1.5555555555 +Admin Fax Ext: +Admin Email: JAMSOFTGAMEDEV@GMAIL.COM +Tech Name: SVEN SLOOTWEG +Tech Organization: +Tech Street: WIJNSTRAAT 211 +Tech City: DORDRECHT +Tech State/Province: ZUID-HOLLAND +Tech Postal Code: 3311BV +Tech Country: NL +Tech Phone: +31.626519955 +Tech Phone Ext: +Tech Fax: +1.5555555555 +Tech Fax Ext: +Tech Email: JAMSOFTGAMEDEV@GMAIL.COM +Name Server: NS1.HE.NET +Name Server: NS2.HE.NET +Name Server: NS3.HE.NET +Name Server: NS4.HE.NET +Name Server: NS5.HE.NET + +The data in this whois database is provided to you for information +purposes only, that is, to assist you in obtaining information about or +related to a domain name registration record. We make this information +available "as is," and do not guarantee its accuracy. By submitting a +whois query, you agree that you will use this data only for lawful +purposes and that, under no circumstances will you use this data to: (1) +enable high volume, automated, electronic processes that stress or load +this whois database system providing you this information; or (2) allow, +enable, or otherwise support the transmission of mass unsolicited, +commercial advertising or solicitations via direct mail, electronic +mail, or by telephone. The compilation, repackaging, dissemination or +other use of this data is expressly prohibited without prior written +consent from us. + +We reserve the right to modify these terms at any time. By submitting +this query, you agree to abide by these terms. +Version 6.3 4/3/2002 + +-- + + +Welcome to the .WS Whois Server + +Use of this service for any purpose other +than determining the availability of a domain +in the .WS TLD to be registered is strictly +prohibited. + + Domain Name: ANONNE.WS + + Registrant Name: Use registrar whois listed below + Registrant Email: Use registrar whois listed below + + Administrative Contact Email: Use registrar whois listed below + Administrative Contact Telephone: Use registrar whois listed below + + Registrar Name: eNom + Registrar Email: info@enom.com + Registrar Telephone: 425-974-4500 + Registrar Whois: whois.enom.com + + Domain Created: 2012-04-07 + Domain Last Updated: 2013-04-06 + Domain Currently Expires: 2014-04-07 + + Current Nameservers: + + ns1.he.net + ns2.he.net + ns3.he.net + ns4.he.net + ns5.he.net + + + diff --git a/test/data/anonnews.org b/test/data/anonnews.org new file mode 100644 index 0000000..de81e28 --- /dev/null +++ b/test/data/anonnews.org @@ -0,0 +1,87 @@ +Access to .ORG WHOIS information is provided to assist persons in +determining the contents of a domain name registration record in the +Public Interest Registry registry database. The data in this record is provided by +Public Interest Registry for informational purposes only, and Public Interest Registry does not +guarantee its accuracy. This service is intended only for query-based +access. You agree that you will use this data only for lawful purposes +and that, under no circumstances will you use this data to: (a) allow, +enable, or otherwise support the transmission by e-mail, telephone, or +facsimile of mass unsolicited, commercial advertising or solicitations +to entities other than the data recipient's own existing customers; or +(b) enable high volume, automated, electronic processes that send +queries or data to the systems of Registry Operator, a Registrar, or +Afilias except as reasonably necessary to register domain names or +modify existing registrations. All rights reserved. Public Interest Registry reserves +the right to modify these terms at any time. By submitting this query, +you agree to abide by this policy. + +Domain ID:D160909486-LROR +Domain Name:ANONNEWS.ORG +Created On:12-Dec-2010 20:31:54 UTC +Last Updated On:16-Nov-2013 12:22:49 UTC +Expiration Date:12-Dec-2014 20:31:54 UTC +Sponsoring Registrar:Internet.bs Corp. (R1601-LROR) +Status:CLIENT TRANSFER PROHIBITED +Status:RENEWPERIOD +Registrant ID:INTE381xro4k9z0m +Registrant Name:Domain Administrator +Registrant Organization:Fundacion Private Whois +Registrant Street1:Attn: anonnews.org +Registrant Street2:Aptds. 0850-00056 +Registrant Street3: +Registrant City:Panama +Registrant State/Province: +Registrant Postal Code:Zona 15 +Registrant Country:PA +Registrant Phone:+507.65995877 +Registrant Phone Ext.: +Registrant FAX: +Registrant FAX Ext.: +Registrant Email:52300fa6c2nzfacc@5225b4d0pi3627q9.privatewhois.net +Admin ID:INTErkiewm5586ze +Admin Name:Domain Administrator +Admin Organization:Fundacion Private Whois +Admin Street1:Attn: anonnews.org +Admin Street2:Aptds. 0850-00056 +Admin Street3: +Admin City:Panama +Admin State/Province: +Admin Postal Code:Zona 15 +Admin Country:PA +Admin Phone:+507.65995877 +Admin Phone Ext.: +Admin FAX: +Admin FAX Ext.: +Admin Email:52300fa7x2yb6oe6@5225b4d0pi3627q9.privatewhois.net +Tech ID:INTEl92g5h18b12w +Tech Name:Domain Administrator +Tech Organization:Fundacion Private Whois +Tech Street1:Attn: anonnews.org +Tech Street2:Aptds. 0850-00056 +Tech Street3: +Tech City:Panama +Tech State/Province: +Tech Postal Code:Zona 15 +Tech Country:PA +Tech Phone:+507.65995877 +Tech Phone Ext.: +Tech FAX: +Tech FAX Ext.: +Tech Email:52300fa6vwq931xf@5225b4d0pi3627q9.privatewhois.net +Name Server:LISA.NS.CLOUDFLARE.COM +Name Server:ED.NS.CLOUDFLARE.COM +Name Server: +Name Server: +Name Server: +Name Server: +Name Server: +Name Server: +Name Server: +Name Server: +Name Server: +Name Server: +Name Server: +DNSSEC:Unsigned + + + diff --git a/test/data/aridns.net.au b/test/data/aridns.net.au new file mode 100644 index 0000000..78dae30 --- /dev/null +++ b/test/data/aridns.net.au @@ -0,0 +1,32 @@ +Domain Name: aridns.net.au +Last Modified: 12-Jul-2013 08:26:40 UTC +Registrar ID: Melbourne IT +Registrar Name: Melbourne IT +Status: serverDeleteProhibited (Protected by .auLOCKDOWN) +Status: serverUpdateProhibited (Protected by .auLOCKDOWN) + +Registrant: AusRegistry International Pty. Ltd. +Registrant ID: ABN 16103729620 +Eligibility Type: Company + +Registrant Contact ID: 83052O1868269 +Registrant Contact Name: Domain Administrator +Registrant Contact Email: Visit whois.ausregistry.com.au for Web based WhoIs + +Tech Contact ID: 83053T1868269 +Tech Contact Name: Domain Administrator +Tech Contact Email: Visit whois.ausregistry.com.au for Web based WhoIs + +Name Server: ari.alpha.aridns.net.au +Name Server IP: 2001:dcd:1:0:0:0:0:2 +Name Server IP: 37.209.192.2 +Name Server: ari.beta.aridns.net.au +Name Server IP: 2001:dcd:2:0:0:0:0:2 +Name Server IP: 37.209.194.2 +Name Server: ari.gamma.aridns.net.au +Name Server IP: 2001:dcd:3:0:0:0:0:2 +Name Server IP: 37.209.196.2 +Name Server: ari.delta.aridns.net.au +Name Server IP: 2001:dcd:4:0:0:0:0:2 +Name Server IP: 37.209.198.2 + diff --git a/test/data/cryto.net b/test/data/cryto.net new file mode 100644 index 0000000..33bac85 --- /dev/null +++ b/test/data/cryto.net @@ -0,0 +1,95 @@ +Domain cryto.net + +Date Registered: 2010-2-14 +Expiry Date: 2014-2-14 + +DNS1: ns1.he.net +DNS2: ns2.he.net +DNS3: ns3.he.net +DNS4: ns4.he.net +DNS5: ns5.he.net + +Registrant + Sven Slootweg + Email:jamsoftgamedev@gmail.com + Wijnstraat 211 + 3311BV Dordrecht + Netherlands + Tel: +31.626519955 + +Administrative Contact + Sven Slootweg + Email:jamsoftgamedev@gmail.com + Wijnstraat 211 + 3311BV Dordrecht + Netherlands + Tel: +31.626519955 + +Technical Contact + Sven Slootweg + Email:jamsoftgamedev@gmail.com + Wijnstraat 211 + 3311BV Dordrecht + Netherlands + Tel: +31.626519955 + +Registrar: Internet.bs Corp. +Registrar's Website : http://www.internetbs.net/ + +-- + +Whois Server Version 2.0 + +Domain names in the .com and .net domains can now be registered +with many different competing registrars. Go to http://www.internic.net +for detailed information. + + Domain Name: CRYTO.NET + Registrar: INTERNET.BS CORP. + Whois Server: whois.internet.bs + Referral URL: http://www.internet.bs + Name Server: NS1.HE.NET + Name Server: NS2.HE.NET + Name Server: NS3.HE.NET + Name Server: NS4.HE.NET + Name Server: NS5.HE.NET + Status: clientTransferProhibited + Updated Date: 11-feb-2013 + Creation Date: 14-feb-2010 + Expiration Date: 14-feb-2014 + +>>> Last update of whois database: Wed, 20 Nov 2013 04:12:42 UTC <<< + +NOTICE: The expiration date displayed in this record is the date the +registrar's sponsorship of the domain name registration in the registry is +currently set to expire. This date does not necessarily reflect the expiration +date of the domain name registrant's agreement with the sponsoring +registrar. Users may consult the sponsoring registrar's Whois database to +view the registrar's reported date of expiration for this registration. + +TERMS OF USE: You are not authorized to access or query our Whois +database through the use of electronic processes that are high-volume and +automated except as reasonably necessary to register domain names or +modify existing registrations; the Data in VeriSign Global Registry +Services' ("VeriSign") Whois database is provided by VeriSign for +information purposes only, and to assist persons in obtaining information +about or related to a domain name registration record. VeriSign does not +guarantee its accuracy. By submitting a Whois query, you agree to abide +by the following terms of use: You agree that you may use this Data only +for lawful purposes and that under no circumstances will you use this Data +to: (1) allow, enable, or otherwise support the transmission of mass +unsolicited, commercial advertising or solicitations via e-mail, telephone, +or facsimile; or (2) enable high volume, automated, electronic processes +that apply to VeriSign (or its computer systems). The compilation, +repackaging, dissemination or other use of this Data is expressly +prohibited without the prior written consent of VeriSign. You agree not to +use electronic processes that are automated and high-volume to access or +query the Whois database except as reasonably necessary to register +domain names or modify existing registrations. VeriSign reserves the right +to restrict your access to the Whois database in its sole discretion to ensure +operational stability. VeriSign may restrict or terminate your access to the +Whois database for failure to abide by these terms of use. VeriSign +reserves the right to modify these terms at any time. + +The Registry database contains ONLY .COM, .NET, .EDU domains and +Registrars. diff --git a/test/data/donuts.co b/test/data/donuts.co new file mode 100644 index 0000000..31a35c2 --- /dev/null +++ b/test/data/donuts.co @@ -0,0 +1,104 @@ +Domain Name: DONUTS.CO +Domain ID: D1142814-CO +Sponsoring Registrar: GODADDY.COM, INC. +Sponsoring Registrar IANA ID: 146 +Registrar URL (registration services): www.godaddy.com +Domain Status: clientDeleteProhibited +Domain Status: clientRenewProhibited +Domain Status: clientTransferProhibited +Domain Status: clientUpdateProhibited +Registrant ID: CR86259716 +Registrant Name: Chris Cowherd +Registrant Organization: Donuts Inc. +Registrant Address1: 10500 Ne 8th St +Registrant Address2: Ste 350 +Registrant City: Bellevue +Registrant State/Province: Washington +Registrant Postal Code: 98004 +Registrant Country: United States +Registrant Country Code: US +Registrant Phone Number: +1.4252966802 +Registrant Email: it@donuts.co +Administrative Contact ID: CR86259720 +Administrative Contact Name: Chris Cowherd +Administrative Contact Organization: Donuts Inc. +Administrative Contact Address1: 10500 Ne 8th St +Administrative Contact Address2: Ste 350 +Administrative Contact City: Bellevue +Administrative Contact State/Province: Washington +Administrative Contact Postal Code: 98004 +Administrative Contact Country: United States +Administrative Contact Country Code: US +Administrative Contact Phone Number: +1.4252966802 +Administrative Contact Email: it@donuts.co +Billing Contact ID: CR86259722 +Billing Contact Name: Chris Cowherd +Billing Contact Organization: Donuts Inc. +Billing Contact Address1: 10500 Ne 8th St +Billing Contact Address2: Ste 350 +Billing Contact City: Bellevue +Billing Contact State/Province: Washington +Billing Contact Postal Code: 98004 +Billing Contact Country: United States +Billing Contact Country Code: US +Billing Contact Phone Number: +1.4252966802 +Billing Contact Email: it@donuts.co +Technical Contact ID: CR86259718 +Technical Contact Name: Chris Cowherd +Technical Contact Organization: Donuts Inc. +Technical Contact Address1: 10500 Ne 8th St +Technical Contact Address2: Ste 350 +Technical Contact City: Bellevue +Technical Contact State/Province: Washington +Technical Contact Postal Code: 98004 +Technical Contact Country: United States +Technical Contact Country Code: US +Technical Contact Phone Number: +1.4252966802 +Technical Contact Email: it@donuts.co +Name Server: NS1.DREAMHOST.COM +Name Server: NS2.DREAMHOST.COM +Name Server: NS3.DREAMHOST.COM +Created by Registrar: INTERNETX GMBH +Last Updated by Registrar: GODADDY.COM, INC. +Last Transferred Date: Sun Jan 30 16:35:56 GMT 2011 +Domain Registration Date: Tue Jul 20 18:01:35 GMT 2010 +Domain Expiration Date: Sat Jul 19 23:59:59 GMT 2014 +Domain Last Updated Date: Thu Aug 08 21:52:32 GMT 2013 + +>>>> Whois database was last updated on: Wed Nov 20 04:14:46 GMT 2013 <<<< +.CO Internet, S.A.S., the Administrator for .CO, has collected this +information for the WHOIS database through Accredited Registrars. +This information is provided to you for informational purposes only +and is designed to assist persons in determining contents of a domain +name registration record in the .CO Internet registry database. .CO +Internet makes this information available to you "as is" and does not +guarantee its accuracy. + +By submitting a WHOIS query, you agree that you will use this data +only for lawful purposes and that, under no circumstances will you +use this data: (1) to allow, enable, or otherwise support the transmission +of mass unsolicited, commercial advertising or solicitations via direct +mail, electronic mail, or by telephone; (2) in contravention of any +applicable data and privacy protection laws; or (3) to enable high volume, +automated, electronic processes that apply to the registry (or its systems). +Compilation, repackaging, dissemination, or other use of the WHOIS +database in its entirety, or of a substantial portion thereof, is not allowed +without .CO Internet's prior written permission. .CO Internet reserves the +right to modify or change these conditions at any time without prior or +subsequent notification of any kind. By executing this query, in any manner +whatsoever, you agree to abide by these terms. In some limited cases, +domains that might appear as available in whois might not actually be +available as they could be already registered and the whois not yet updated +and/or they could be part of the Restricted list. In this cases, performing a +check through your Registrar's (EPP check) will give you the actual status +of the domain. Additionally, domains currently or previously used as +extensions in 3rd level domains will not be available for registration in the +2nd level. For example, org.co,mil.co,edu.co,com.co,net.co,nom.co,arts.co, +firm.co,info.co,int.co,web.co,rec.co,co.co. + +NOTE: FAILURE TO LOCATE A RECORD IN THE WHOIS DATABASE IS NOT +INDICATIVE OF THE AVAILABILITY OF A DOMAIN NAME. + +All domain names are subject to certain additional domain name registration +rules. For details, please visit our site at www.cointernet.co . + diff --git a/test/data/edis.at b/test/data/edis.at new file mode 100644 index 0000000..8ee605b --- /dev/null +++ b/test/data/edis.at @@ -0,0 +1,65 @@ +% Copyright (c)2013 by NIC.AT (1) +% +% Restricted rights. +% +% Except for agreed Internet operational purposes, no part of this +% information may be reproduced, stored in a retrieval system, or +% transmitted, in any form or by any means, electronic, mechanical, +% recording, or otherwise, without prior permission of NIC.AT on behalf +% of itself and/or the copyright holders. Any use of this material to +% target advertising or similar activities is explicitly forbidden and +% can be prosecuted. +% +% It is furthermore strictly forbidden to use the Whois-Database in such +% a way that jeopardizes or could jeopardize the stability of the +% technical systems of NIC.AT under any circumstances. In particular, +% this includes any misuse of the Whois-Database and any use of the +% Whois-Database which disturbs its operation. +% +% Should the user violate these points, NIC.AT reserves the right to +% deactivate the Whois-Database entirely or partly for the user. +% Moreover, the user shall be held liable for any and all damage +% arising from a violation of these points. + +domain: edis.at +registrant: KG8294626-NICAT +admin-c: KG8294627-NICAT +tech-c: KG8294627-NICAT +nserver: ns1.edis.at +remarks: 91.227.204.227 +nserver: ns2.edis.at +remarks: 91.227.205.227 +nserver: ns5.edis.at +remarks: 46.17.57.5 +nserver: ns6.edis.at +remarks: 178.209.42.105 +changed: 20111024 14:51:40 +source: AT-DOM + +personname: EDIS GmbH +organization: Kleewein Gerhard +street address: Widmannstettergasse 3 +postal code: 8053 +city: Graz +country: Austria +phone: +43316827500300 +fax-no: +43316827500777 +e-mail: support@edis.at +nic-hdl: KG8294626-NICAT +changed: 20111024 14:51:40 +source: AT-DOM + +personname: EDIS GmbH +organization: Kleewein Gerhard +street address: Hauptplatz 3 +postal code: 8010 +city: Graz +country: Austria +phone: +43316827500300 +fax-no: +43316827500777 +e-mail: domreg@edis.at +nic-hdl: KG8294627-NICAT +changed: 20130809 15:17:35 +source: AT-DOM + + diff --git a/test/data/encyclopediadramatica.es b/test/data/encyclopediadramatica.es new file mode 100644 index 0000000000000000000000000000000000000000..f1609d5b503a994e281fa7ada11bbf92c4bf309b GIT binary patch literal 2168 zcmcgt&2ket5aygJze7KOv10;<>@5YmwV|L$kx-m9nvUItMw*p0p7_Rt?7kdN!q<|= zo(0bM=9y9V*WXWTaY6XK4!)Hv!6yojG$f|S5Gn7N#$Av^iQ`@@(_ReqA!d4cRlZnp zqBe9!d|F&AN~s%bIVBp!ISSq#s9|Dn8pmxpLbrEh+BV`N940g5U5JwKmYM^7fE>IQ>{t{(E5y~J`no%7*`r` zk`IJAO-_OL9I3+8;mzKNGt(ykq7^V)4)po&54ZPAJtuYttU71Kl!nx^Z!wU`Wc-1$ zbSULpaDrKfOnnrvJDTXlZ}ltf)k?CF%M56wPx_&8VnJR8!qY4dcr(dSNCv-7FfbYd zS1Dz(Ax;^jOWNW2nb?UDt)k=+z=RI;gB6_a%$M?9N!LnKBSnwbWKE0*(iwCxV+-7t zqwH0`N0chZ4BW%XNPAL=#4C9rw#LIp$^@znF=9G0eUCxaA_QHwgDX;|r5@@{%wq8f zgy|v2TS@f;*n+-&{TF`u_VvG`4QoShIt-+s;e`~uanvd&m^E_&eWLSr-eOtM7hVP^ z7&GWda0?U)B^Cc8MIX)xX@&$Eh#)NtppdivukkqJ(g`KyIL+7(F%1SRpjxWn=+(sk zy*y#&o3@4%W8B5Cm!w9ALhsB-S1;EuE-zm!_5Wr=ZwGf+)@JzTzQ(qMTIHl$4`sTV z6uJ*q7~WT&=ud~dmRIynzVHZhR9-%*Uw-1{Eb-hhYL?JsEQZ2-Ezk$e zd_k{p&(R?pJQ&$Ca;{aNQ=PIP|4{O6b==x)^J=}hzP?8KP=z*E^oA{W4M%2A{e zjcN|Yj+!s)q=F6baqcn*2ADsSS(_C`wd{{%&bgdZ`70);*!_ilGDHZW)(KsY^;leu zp|Nwp!nB1;vXP;|Wd*0C2vljsATC(w zR4#yB&VBl0y#`cXL5kHjG}u_>|GHeR$GDC=C`E@bl*`1pqz>`L0JCN@rA{mC_lWSk nvhp6A9gaM&5hO#MG+FFupCk0j!8nd9I8eNVq__Lx;@QP_8v(oK literal 0 HcmV?d00001 diff --git a/test/data/f63.net b/test/data/f63.net new file mode 100644 index 0000000..28b94d3 --- /dev/null +++ b/test/data/f63.net @@ -0,0 +1,141 @@ +; This data is provided by Orange Lemon BV +; for information purposes, and to assist persons obtaining information +; about or related to domain name registration records. +; Orange Lemon BV does not guarantee its accuracy. +; By submitting a WHOIS query, you agree that you will use this data +; only for lawful purposes and that, under no circumstances, you will +; use this data to +; 1) allow, enable, or otherwise support the transmission of mass +; unsolicited, commercial advertising or solicitations via E-mail +; (spam); or +; 2) enable high volume, automated, electronic processes that apply +; to this WHOIS server. +; These terms may be changed without prior notice. +; By submitting this query, you agree to abide by this policy. +; Please register your domains at; http://www.orangelemon.nl/ + +Domain: f63.net +Registry Domain ID: 1773437237_DOMAIN_NET-VRSN +Registrar WHOIS Server: whois.rrpproxy.net +Registrar URL: http://www.orangelemon.nl/ +Created Date: 2013-01-14T19:23:35.0Z +Updated Date: 2013-09-28T20:31:36.0Z +Registrar Registration Expiration Date: 2014-01-14T19:23:35.0Z +Registrar: Key-Systems GmbH +Registrar IANA ID: 269 +Registrar Abuse Contact Email: abuse[at]key-systems.net +Registrar Abuse Contact Phone: - (Please send an email) +Reseller: Orange Lemon BV +Domain Status: ACTIVE +Registrant Contact: P-CAT559 +Registrant Organization: Orange Lemon BV +Registrant Name: Chris Talma +Registrant Street: Cranendonck 2 +Registrant City: Eindhoven +Registrant Postal Code: 5653LA +Registrant State: NB +Registrant Country: NL +Registrant Phone: +31.408200199 +Registrant Phone Ext: +Registrant Fax: +Registrant Fax Ext: +Registrant Email: info@orangelemon.nl +Admin Contact: P-CAT559 +Admin Organization: Orange Lemon BV +Admin Name: Chris Talma +Admin Street: Cranendonck 2 +Admin City: Eindhoven +Admin State: NB +Admin Postal Code: 5653LA +Admin Country: NL +Admin Phone: +31.408200199 +Admin Phone Ext: +Admin Fax: +Admin Fax Ext: +Admin Email: info@orangelemon.nl +Tech Contact: P-CAT559 +Tech Organization: Orange Lemon BV +Tech Name: Chris Talma +Tech Street: Cranendonck 2 +Tech City: Eindhoven +Tech Postal Code: 5653LA +Tech State: NB +Tech Country: NL +Tech Phone: +31.408200199 +Tech Phone Ext: +Tech Fax: +Tech Fax Ext: +Tech Email: info@orangelemon.nl +Billing Contact: P-CAT559 +Billing Organization: Orange Lemon BV +Billing Name: Chris Talma +Billing Street: Cranendonck 2 +Billing City: Eindhoven +Billing Postal Code: 5653LA +Billing State: NB +Billing Country: NL +Billing Phone: +31.408200199 +Billing Phone Ext: +Billing Fax: +Billing Fax Ext: +Billing Email: info@orangelemon.nl +Name Server: lucy.ns.cloudflare.com +Name Server: sid.ns.cloudflare.com +DNSSEC: unsigned +URL of the ICANN WHOIS Data Problem Reporting System: http://wdprs.internic.net/ +>>> Last update of WHOIS database: 2013-11-20T04:15:32.0Z <<< + +-- + +Whois Server Version 2.0 + +Domain names in the .com and .net domains can now be registered +with many different competing registrars. Go to http://www.internic.net +for detailed information. + + Domain Name: F63.NET + Registrar: KEY-SYSTEMS GMBH + Whois Server: whois.rrpproxy.net + Referral URL: http://www.key-systems.net + Name Server: LUCY.NS.CLOUDFLARE.COM + Name Server: SID.NS.CLOUDFLARE.COM + Status: ok + Updated Date: 28-sep-2013 + Creation Date: 14-jan-2013 + Expiration Date: 14-jan-2014 + +>>> Last update of whois database: Wed, 20 Nov 2013 04:14:59 UTC <<< + +NOTICE: The expiration date displayed in this record is the date the +registrar's sponsorship of the domain name registration in the registry is +currently set to expire. This date does not necessarily reflect the expiration +date of the domain name registrant's agreement with the sponsoring +registrar. Users may consult the sponsoring registrar's Whois database to +view the registrar's reported date of expiration for this registration. + +TERMS OF USE: You are not authorized to access or query our Whois +database through the use of electronic processes that are high-volume and +automated except as reasonably necessary to register domain names or +modify existing registrations; the Data in VeriSign Global Registry +Services' ("VeriSign") Whois database is provided by VeriSign for +information purposes only, and to assist persons in obtaining information +about or related to a domain name registration record. VeriSign does not +guarantee its accuracy. By submitting a Whois query, you agree to abide +by the following terms of use: You agree that you may use this Data only +for lawful purposes and that under no circumstances will you use this Data +to: (1) allow, enable, or otherwise support the transmission of mass +unsolicited, commercial advertising or solicitations via e-mail, telephone, +or facsimile; or (2) enable high volume, automated, electronic processes +that apply to VeriSign (or its computer systems). The compilation, +repackaging, dissemination or other use of this Data is expressly +prohibited without the prior written consent of VeriSign. You agree not to +use electronic processes that are automated and high-volume to access or +query the Whois database except as reasonably necessary to register +domain names or modify existing registrations. VeriSign reserves the right +to restrict your access to the Whois database in its sole discretion to ensure +operational stability. VeriSign may restrict or terminate your access to the +Whois database for failure to abide by these terms of use. VeriSign +reserves the right to modify these terms at any time. + +The Registry database contains ONLY .COM, .NET, .EDU domains and +Registrars. diff --git a/test/data/huskeh.net b/test/data/huskeh.net new file mode 100644 index 0000000..ddd5dda --- /dev/null +++ b/test/data/huskeh.net @@ -0,0 +1,152 @@ +############################################################################### +# +# Welcome to the OVH WHOIS Server. +# +# whois server : whois.ovh.com check server : check.ovh.com +# +# The data in this Whois is at your disposal with the aim of supplying you the +# information only, that is helping you in the obtaining of the information +# about or related to a domain name registration record. OVH Sas make this +# information available "as is", and do not guarantee its accuracy. By using +# Whois, you agree that you will use these data only for legal purposes and +# that, under no circumstances will you use this data to: (1) Allow, enable, +# or otherwise support the transmission of mass unsolicited, commercial +# advertisement or roughly or requests via the individual mail (courier), +# the E-mail (SPAM), by telephone or by fax. (2) Enable high volume, automated, +# electronic processes that apply to OVH Sas (or its computer systems). +# The copy, the compilation, the re-packaging, the dissemination or the +# other use of the Whois base is expressly forbidden without the prior +# written consent of OVH. Domain ownership disputes should be settled using +# ICANN's Uniform Dispute Resolution Policy: http://www.icann.org/udrp/udrp.htm +# We reserve the right to modify these terms at any time. By submitting +# this query, you agree to abide by these terms. OVH Sas reserves the right +# to terminate your access to the OVH Sas Whois database in its sole +# discretion, including without limitation, for excessive querying of +# the Whois database or for failure to otherwise abide by this policy. +# +# L'outil du Whois est à votre disposition dans le but de vous fournir +# l'information seulement, c'est-à-dire vous aider dans l'obtention de +# l'information sur ou lié à un rapport d'enregistrement de nom de domaine. +# OVH Sas rend cette information disponible "comme est," et ne garanti pas +# son exactitude. En utilisant notre outil Whois, vous reconnaissez que vous +# emploierez ces données seulement pour des buts légaux et ne pas utiliser cet +# outil dans les buts suivant: (1) la transmission de publicité non sollicitée, +# commerciale massive ou en gros ou des sollicitations via courrier individuel, +# le courrier électronique (c'est-à-dire SPAM), par téléphone ou par fax. (2) +# l'utilisation d'un grand volume, automatisé des processus électroniques qui +# soulignent ou chargent ce système de base de données Whois vous fournissant +# cette information. La copie de tout ou partie, la compilation, le +# re-emballage, la dissémination ou d'autre utilisation de la base Whois sont +# expressément interdits sans consentement écrit antérieur de OVH. Un désaccord +# sur la possession d'un nom de domaine peut être résolu en suivant la Uniform +# Dispute Resolution Policy de l'ICANN: http://www.icann.org/udrp/udrp.htm +# Nous nous réservons le droit de modifier ces termes à tout moment. En +# soumettant une requête au Whois vous consentez à vous soumettre à ces termes. + +# local time : Wednesday, 20-Nov-2013 09:27:14 CET +# gmt time : Wednesday, 20-Nov-2013 08:27:14 GMT +# last modify : Saturday, 12-Oct-2013 12:38:49 CEST +# request from : 192.168.244.150:25929 + +Domain name: huskeh.net + +Registrant: + Poulton Sam + huskeh.net, office #5075960 + c/o OwO, BP80157 + 59053, Roubaix Cedex 1 + FR + +33.899498765 + 0vdudcszg7joly3irb2u@e.o-w-o.info + +Administrative Contact: + Poulton Sam + huskeh.net, office #5075960 + c/o OwO, BP80157 + 59053, Roubaix Cedex 1 + FR + +33.899498765 + mtv1ufny8x589jxnfcsx@c.o-w-o.info + +Technical Contact: + Poulton Sam + huskeh.net, office #5075960 + c/o OwO, BP80157 + 59053, Roubaix Cedex 1 + FR + +33.899498765 + mtv1ufny8x589jxnfcsx@c.o-w-o.info + +Billing Contact: + Poulton Sam + huskeh.net, office #5075960 + c/o OwO, BP80157 + 59053, Roubaix Cedex 1 + FR + +33.899498765 + mtv1ufny8x589jxnfcsx@c.o-w-o.info + +Registrar of Record: OVH. +Record last updated on 2013-09-18. +Record expires on 2014-09-29. +Record created on 2009-09-29. + +############################################################################### +# powered by GNU/Linux + + +-- + +Whois Server Version 2.0 + +Domain names in the .com and .net domains can now be registered +with many different competing registrars. Go to http://www.internic.net +for detailed information. + + Domain Name: HUSKEH.NET + Registrar: OVH + Whois Server: whois.ovh.com + Referral URL: http://www.ovh.com + Name Server: NS1.SLPHOSTS.CO.UK + Name Server: NS2.SLPHOSTS.CO.UK + Status: clientDeleteProhibited + Status: clientTransferProhibited + Updated Date: 18-sep-2013 + Creation Date: 29-sep-2009 + Expiration Date: 29-sep-2014 + +>>> Last update of whois database: Wed, 20 Nov 2013 08:26:33 UTC <<< + +NOTICE: The expiration date displayed in this record is the date the +registrar's sponsorship of the domain name registration in the registry is +currently set to expire. This date does not necessarily reflect the expiration +date of the domain name registrant's agreement with the sponsoring +registrar. Users may consult the sponsoring registrar's Whois database to +view the registrar's reported date of expiration for this registration. + +TERMS OF USE: You are not authorized to access or query our Whois +database through the use of electronic processes that are high-volume and +automated except as reasonably necessary to register domain names or +modify existing registrations; the Data in VeriSign Global Registry +Services' ("VeriSign") Whois database is provided by VeriSign for +information purposes only, and to assist persons in obtaining information +about or related to a domain name registration record. VeriSign does not +guarantee its accuracy. By submitting a Whois query, you agree to abide +by the following terms of use: You agree that you may use this Data only +for lawful purposes and that under no circumstances will you use this Data +to: (1) allow, enable, or otherwise support the transmission of mass +unsolicited, commercial advertising or solicitations via e-mail, telephone, +or facsimile; or (2) enable high volume, automated, electronic processes +that apply to VeriSign (or its computer systems). The compilation, +repackaging, dissemination or other use of this Data is expressly +prohibited without the prior written consent of VeriSign. You agree not to +use electronic processes that are automated and high-volume to access or +query the Whois database except as reasonably necessary to register +domain names or modify existing registrations. VeriSign reserves the right +to restrict your access to the Whois database in its sole discretion to ensure +operational stability. VeriSign may restrict or terminate your access to the +Whois database for failure to abide by these terms of use. VeriSign +reserves the right to modify these terms at any time. + +The Registry database contains ONLY .COM, .NET, .EDU domains and +Registrars. diff --git a/test/data/keybase.io b/test/data/keybase.io new file mode 100644 index 0000000..575d183 --- /dev/null +++ b/test/data/keybase.io @@ -0,0 +1,18 @@ + +Domain : keybase.io +Status : Live +Expiry : 2014-09-06 + +NS 1 : ns-1016.awsdns-63.net +NS 2 : ns-1722.awsdns-23.co.uk +NS 3 : ns-1095.awsdns-08.org +NS 4 : ns-337.awsdns-42.com + +Owner : Krohn, Maxwell + : CrashMix.org + : 902 Broadway, 4th Floor + : New York + : NY + : United States + + diff --git a/test/data/lowendbox.com b/test/data/lowendbox.com new file mode 100644 index 0000000..0fc53cb --- /dev/null +++ b/test/data/lowendbox.com @@ -0,0 +1,122 @@ +Domain Name: LOWENDBOX.COM +Registrar URL: http://www.godaddy.com +Updated Date: 2012-12-20 00:18:28 +Creation Date: 2008-02-01 00:39:38 +Registrar Expiration Date: 2015-02-01 00:39:38 +Registrar: GoDaddy.com, LLC +Registrant Name: Registration Private +Registrant Organization: Domains By Proxy, LLC +Registrant Street: DomainsByProxy.com +Registrant Street: 14747 N Northsight Blvd Suite 111, PMB 309 +Registrant City: Scottsdale +Registrant State/Province: Arizona +Registrant Postal Code: 85260 +Registrant Country: United States +Admin Name: Registration Private +Admin Organization: Domains By Proxy, LLC +Admin Street: DomainsByProxy.com +Admin Street: 14747 N Northsight Blvd Suite 111, PMB 309 +Admin City: Scottsdale +Admin State/Province: Arizona +Admin Postal Code: 85260 +Admin Country: United States +Admin Phone: (480) 624-2599 +Admin Fax: (480) 624-2598 +Admin Email: LOWENDBOX.COM@domainsbyproxy.com +Tech Name: Registration Private +Tech Organization: Domains By Proxy, LLC +Tech Street: DomainsByProxy.com +Tech Street: 14747 N Northsight Blvd Suite 111, PMB 309 +Tech City: Scottsdale +Tech State/Province: Arizona +Tech Postal Code: 85260 +Tech Country: United States +Tech Phone: (480) 624-2599 +Tech Fax: (480) 624-2598 +Tech Email: LOWENDBOX.COM@domainsbyproxy.com +Name Server: RUTH.NS.CLOUDFLARE.COM +Name Server: KEN.NS.CLOUDFLARE.COM + +**************************************************** +See Business Registration Listing +**************************************************** +Copy and paste the link below to view additional details: +http://who.godaddy.com/whoischeck.aspx?domain=LOWENDBOX.COM + +The data contained in GoDaddy.com, LLC's WhoIs database, +while believed by the company to be reliable, is provided "as is" +with no guarantee or warranties regarding its accuracy. This +information is provided for the sole purpose of assisting you +in obtaining information about domain name registration records. +Any use of this data for any other purpose is expressly forbidden without the prior written +permission of GoDaddy.com, LLC. By submitting an inquiry, +you agree to these terms of usage and limitations of warranty. In particular, +you agree not to use this data to allow, enable, or otherwise make possible, +dissemination or collection of this data, in part or in its entirety, for any +purpose, such as the transmission of unsolicited advertising and +and solicitations of any kind, including spam. You further agree +not to use this data to enable high volume, automated or robotic electronic +processes designed to collect or compile this data for any purpose, +including mining this data for your own personal or commercial purposes. + +Please note: the registrant of the domain name is specified +in the "registrant" section. In most cases, GoDaddy.com, LLC +is not the registrant of domain names listed in this database. + +-- + +Whois Server Version 2.0 + +Domain names in the .com and .net domains can now be registered +with many different competing registrars. Go to http://www.internic.net +for detailed information. + + Domain Name: LOWENDBOX.COM + Registrar: GODADDY.COM, LLC + Whois Server: whois.godaddy.com + Referral URL: http://registrar.godaddy.com + Name Server: KEN.NS.CLOUDFLARE.COM + Name Server: RUTH.NS.CLOUDFLARE.COM + Status: clientDeleteProhibited + Status: clientRenewProhibited + Status: clientTransferProhibited + Status: clientUpdateProhibited + Updated Date: 20-dec-2012 + Creation Date: 01-feb-2008 + Expiration Date: 01-feb-2015 + +>>> Last update of whois database: Wed, 20 Nov 2013 10:14:17 UTC <<< + +NOTICE: The expiration date displayed in this record is the date the +registrar's sponsorship of the domain name registration in the registry is +currently set to expire. This date does not necessarily reflect the expiration +date of the domain name registrant's agreement with the sponsoring +registrar. Users may consult the sponsoring registrar's Whois database to +view the registrar's reported date of expiration for this registration. + +TERMS OF USE: You are not authorized to access or query our Whois +database through the use of electronic processes that are high-volume and +automated except as reasonably necessary to register domain names or +modify existing registrations; the Data in VeriSign Global Registry +Services' ("VeriSign") Whois database is provided by VeriSign for +information purposes only, and to assist persons in obtaining information +about or related to a domain name registration record. VeriSign does not +guarantee its accuracy. By submitting a Whois query, you agree to abide +by the following terms of use: You agree that you may use this Data only +for lawful purposes and that under no circumstances will you use this Data +to: (1) allow, enable, or otherwise support the transmission of mass +unsolicited, commercial advertising or solicitations via e-mail, telephone, +or facsimile; or (2) enable high volume, automated, electronic processes +that apply to VeriSign (or its computer systems). The compilation, +repackaging, dissemination or other use of this Data is expressly +prohibited without the prior written consent of VeriSign. You agree not to +use electronic processes that are automated and high-volume to access or +query the Whois database except as reasonably necessary to register +domain names or modify existing registrations. VeriSign reserves the right +to restrict your access to the Whois database in its sole discretion to ensure +operational stability. VeriSign may restrict or terminate your access to the +Whois database for failure to abide by these terms of use. VeriSign +reserves the right to modify these terms at any time. + +The Registry database contains ONLY .COM, .NET, .EDU domains and +Registrars. diff --git a/test/data/nic.ru b/test/data/nic.ru new file mode 100644 index 0000000..fe881c3 --- /dev/null +++ b/test/data/nic.ru @@ -0,0 +1,22 @@ +% By submitting a query to RIPN's Whois Service +% you agree to abide by the following terms of use: +% http://www.ripn.net/about/servpol.html#3.2 (in Russian) +% http://www.ripn.net/about/en/servpol.html#3.2 (in English). + +domain: NIC.RU +nserver: ns4-cloud.nic.ru. 195.253.65.2, 2a01:5b0:5::2 +nserver: ns5.nic.ru. 31.177.67.100, 2a02:2090:e800:9000:31:177:67:100 +nserver: ns6.nic.ru. 31.177.74.100, 2a02:2090:ec00:9040:31:177:74:100 +nserver: ns7.nic.ru. 31.177.71.100, 2a02:2090:ec00:9000:31:177:71:100 +nserver: ns8-cloud.nic.ru. 195.253.64.10, 2a01:5b0:4::a +state: REGISTERED, DELEGATED, VERIFIED +org: JSC 'RU-CENTER' +registrar: RU-CENTER-REG-RIPN +admin-contact: https://www.nic.ru/whois +created: 1997.11.28 +paid-till: 2013.12.01 +free-date: 2014.01.01 +source: TCI + +Last updated on 2013.11.20 08:41:39 MSK + diff --git a/test/data/nsa.gov b/test/data/nsa.gov new file mode 100644 index 0000000..42fe1b7 --- /dev/null +++ b/test/data/nsa.gov @@ -0,0 +1,10 @@ +% DOTGOV WHOIS Server ready + Domain Name: NSA.GOV + Status: ACTIVE + + +>>> Last update of whois database: 2013-11-20T04:13:55Z <<< +Please be advised that this whois server only contains information pertaining +to the .GOV domain. For information for other domains please use the whois +server at RS.INTERNIC.NET. + diff --git a/test/data/ovh.fr b/test/data/ovh.fr new file mode 100644 index 0000000..18fef3d --- /dev/null +++ b/test/data/ovh.fr @@ -0,0 +1,103 @@ +%% +%% This is the AFNIC Whois server. +%% +%% complete date format : DD/MM/YYYY +%% short date format : DD/MM +%% version : FRNIC-2.5 +%% +%% Rights restricted by copyright. +%% See http://www.afnic.fr/afnic/web/mentions-legales-whois_en +%% +%% Use '-h' option to obtain more information about this service. +%% +%% [77.162.55.23 REQUEST] >> -V Md5.0 ovh.fr +%% +%% RL Net [##########] - RL IP [#########.] +%% + +domain: ovh.fr +status: ACTIVE +hold: NO +holder-c: SO255-FRNIC +admin-c: OK62-FRNIC +tech-c: OVH5-FRNIC +zone-c: NFC1-FRNIC +nsl-id: NSL16790-FRNIC +registrar: OVH +anniversary: 12/11 +created: 12/11/1999 +last-update: 03/04/2009 +source: FRNIC + +ns-list: NSL16790-FRNIC +nserver: dns.ovh.net +nserver: dns10.ovh.net +nserver: ns.ovh.net +nserver: ns10.ovh.net +source: FRNIC + +registrar: OVH +type: Isp Option 1 +address: 2 Rue Kellermann +address: ROUBAIX +country: FR +phone: +33 8 99 70 17 61 +fax-no: +33 3 20 20 09 58 +e-mail: support@ovh.net +website: http://www.ovh.com +anonymous: NO +registered: 21/10/1999 +source: FRNIC + +nic-hdl: OVH5-FRNIC +type: ROLE +contact: OVH NET +address: OVH +address: 140, quai du Sartel +address: 59100 Roubaix +country: FR +phone: +33 8 99 70 17 61 +e-mail: tech@ovh.net +trouble: Information: http://www.ovh.fr +trouble: Questions: mailto:tech@ovh.net +trouble: Spam: mailto:abuse@ovh.net +admin-c: OK217-FRNIC +tech-c: OK217-FRNIC +notify: tech@ovh.net +registrar: OVH +changed: 11/10/2006 tech@ovh.net +anonymous: NO +obsoleted: NO +source: FRNIC + +nic-hdl: SO255-FRNIC +type: ORGANIZATION +contact: OVH SAS +address: 140, quai du sartel +address: 59100 Roubaix +country: FR +phone: +33 8 99 70 17 61 +fax-no: +33 3 20 20 09 58 +e-mail: oles@ovh.net +registrar: OVH +changed: 28/10/2013 nic@nic.fr +anonymous: NO +obsoleted: NO +eligstatus: ok +eligdate: 01/09/2011 12:03:35 +source: FRNIC + +nic-hdl: OK62-FRNIC +type: PERSON +contact: Octave Klaba +address: Sarl Ovh +address: 140, quai du Sartel +address: 59100 Roubaix +country: FR +phone: +33 3 20 20 09 57 +fax-no: +33 3 20 20 09 58 +registrar: OVH +changed: 03/04/2009 nic@nic.fr +anonymous: NO +obsoleted: NO +source: FRNIC diff --git a/test/data/prq.se b/test/data/prq.se new file mode 100644 index 0000000..faece26 --- /dev/null +++ b/test/data/prq.se @@ -0,0 +1,36 @@ +# Copyright (c) 1997- .SE (The Internet Infrastructure Foundation). +# All rights reserved. + +# The information obtained through searches, or otherwise, is protected +# by the Swedish Copyright Act (1960:729) and international conventions. +# It is also subject to database protection according to the Swedish +# Copyright Act. + +# Any use of this material to target advertising or +# similar activities is forbidden and will be prosecuted. +# If any of the information below is transferred to a third +# party, it must be done in its entirety. This server must +# not be used as a backend for a search engine. + +# Result of search for registered domain names under +# the .SE top level domain. + +# The data is in the UTF-8 character set and the result is +# printed with eight bits. + +state: active +domain: prq.se +holder: perper9352-00001 +admin-c: - +tech-c: - +billing-c: - +created: 2004-06-14 +modified: 2012-11-03 +expires: 2015-06-14 +transferred: 2012-08-09 +nserver: ns.prq.se 193.104.214.194 +nserver: ns2.prq.se 88.80.30.194 +dnssec: unsigned delegation +status: ok +registrar: AEB Komm + diff --git a/test/data/quadranet.com b/test/data/quadranet.com new file mode 100644 index 0000000..6d88269 --- /dev/null +++ b/test/data/quadranet.com @@ -0,0 +1,117 @@ +Domain Name: QUADRANET.COM +Registrar URL: http://www.wildwestdomains.com +Updated Date: 2013-06-17 23:22:11 +Creation Date: 1999-09-29 18:08:58 +Registrar Expiration Date: 2015-09-29 18:08:54 +Registrar: Wild West Domains, LLC +Reseller: Registerbuzz.com +Registrant Name: Quadra Net +Registrant Organization: QuadraNet +Registrant Street: 19528 Ventura Blvd +Registrant Street: #433 +Registrant City: Tarzana +Registrant State/Province: California +Registrant Postal Code: 91356 +Registrant Country: United States +Admin Name: Quadra Net +Admin Organization: QuadraNet +Admin Street: 19528 Ventura Blvd +Admin Street: #433 +Admin City: Tarzana +Admin State/Province: California +Admin Postal Code: 91356 +Admin Country: United States +Admin Phone: +1.2136149371 +Admin Fax: +1.2136149375 +Admin Email: noc@quadranet.com +Tech Name: Quadra Net +Tech Organization: QuadraNet +Tech Street: 19528 Ventura Blvd +Tech Street: #433 +Tech City: Tarzana +Tech State/Province: California +Tech Postal Code: 91356 +Tech Country: United States +Tech Phone: +1.2136149371 +Tech Fax: +1.2136149375 +Tech Email: noc@quadranet.com +Name Server: NS2.QUADRANET.COM +Name Server: NS1.QUADRANET.COM + +The data contained in this Registrar's Whois database, +while believed by the registrar to be reliable, is provided "as is" +with no guarantee or warranties regarding its accuracy. This information +is provided for the sole purpose of assisting you in obtaining +information about domain name registration records. Any use of +this data for any other purpose is expressly forbidden without +the prior written permission of this registrar. By submitting an +inquiry, you agree to these terms of usage and limitations of warranty. +In particular, you agree not to use this data to allow, enable, or +otherwise make possible, dissemination or collection of this data, in +part or in its entirety, for any purpose, such as the transmission of +unsolicited advertising and solicitations of any kind, including spam. +You further agree not to use this data to enable high volume, automated +or robotic electronic processes designed to collect or compile this data +for any purpose, including mining this data for your own personal or +commercial purposes. + +Please note: the owner of the domain name is specified in the "registrant" section. +In most cases, the Registrar is not the owner of domain names listed in this database. + +-- + +Whois Server Version 2.0 + +Domain names in the .com and .net domains can now be registered +with many different competing registrars. Go to http://www.internic.net +for detailed information. + + Domain Name: QUADRANET.COM + Registrar: WILD WEST DOMAINS, LLC + Whois Server: whois.wildwestdomains.com + Referral URL: http://www.wildwestdomains.com + Name Server: NS1.QUADRANET.COM + Name Server: NS2.QUADRANET.COM + Status: clientDeleteProhibited + Status: clientRenewProhibited + Status: clientTransferProhibited + Status: clientUpdateProhibited + Updated Date: 18-jun-2013 + Creation Date: 29-sep-1999 + Expiration Date: 29-sep-2015 + +>>> Last update of whois database: Wed, 20 Nov 2013 10:14:47 UTC <<< + +NOTICE: The expiration date displayed in this record is the date the +registrar's sponsorship of the domain name registration in the registry is +currently set to expire. This date does not necessarily reflect the expiration +date of the domain name registrant's agreement with the sponsoring +registrar. Users may consult the sponsoring registrar's Whois database to +view the registrar's reported date of expiration for this registration. + +TERMS OF USE: You are not authorized to access or query our Whois +database through the use of electronic processes that are high-volume and +automated except as reasonably necessary to register domain names or +modify existing registrations; the Data in VeriSign Global Registry +Services' ("VeriSign") Whois database is provided by VeriSign for +information purposes only, and to assist persons in obtaining information +about or related to a domain name registration record. VeriSign does not +guarantee its accuracy. By submitting a Whois query, you agree to abide +by the following terms of use: You agree that you may use this Data only +for lawful purposes and that under no circumstances will you use this Data +to: (1) allow, enable, or otherwise support the transmission of mass +unsolicited, commercial advertising or solicitations via e-mail, telephone, +or facsimile; or (2) enable high volume, automated, electronic processes +that apply to VeriSign (or its computer systems). The compilation, +repackaging, dissemination or other use of this Data is expressly +prohibited without the prior written consent of VeriSign. You agree not to +use electronic processes that are automated and high-volume to access or +query the Whois database except as reasonably necessary to register +domain names or modify existing registrations. VeriSign reserves the right +to restrict your access to the Whois database in its sole discretion to ensure +operational stability. VeriSign may restrict or terminate your access to the +Whois database for failure to abide by these terms of use. VeriSign +reserves the right to modify these terms at any time. + +The Registry database contains ONLY .COM, .NET, .EDU domains and +Registrars. diff --git a/test/data/singularity.fr b/test/data/singularity.fr new file mode 100644 index 0000000..2792427 --- /dev/null +++ b/test/data/singularity.fr @@ -0,0 +1,94 @@ +%% +%% This is the AFNIC Whois server. +%% +%% complete date format : DD/MM/YYYY +%% short date format : DD/MM +%% version : FRNIC-2.5 +%% +%% Rights restricted by copyright. +%% See http://www.afnic.fr/afnic/web/mentions-legales-whois_en +%% +%% Use '-h' option to obtain more information about this service. +%% +%% [77.162.55.23 REQUEST] >> singularity.fr +%% +%% RL Net [##########] - RL IP [#########.] +%% + +domain: singularity.fr +status: ACTIVE +hold: NO +holder-c: ANO00-FRNIC +admin-c: ANO00-FRNIC +tech-c: GR283-FRNIC +zone-c: NFC1-FRNIC +nsl-id: NSL29702-FRNIC +registrar: GANDI +anniversary: 01/09 +created: 04/04/2009 +last-update: 01/09/2009 +source: FRNIC + +ns-list: NSL29702-FRNIC +nserver: ns-sec.toile-libre.org +nserver: ns-pri.toile-libre.org +source: FRNIC + +registrar: GANDI +type: Isp Option 1 +address: 63-65 boulevard Massena +address: PARIS +country: FR +phone: +33 1 70 37 76 61 +fax-no: +33 1 43 73 18 51 +e-mail: support-fr@support.gandi.net +website: http://www.gandi.net +anonymous: NO +registered: 09/03/2004 +source: FRNIC + +nic-hdl: ANO00-FRNIC +type: PERSON +contact: Ano Nymous +remarks: -------------- WARNING -------------- +remarks: While the registrar knows him/her, +remarks: this person chose to restrict access +remarks: to his/her personal data. So PLEASE, +remarks: don't send emails to Ano Nymous. This +remarks: address is bogus and there is no hope +remarks: of a reply. +remarks: -------------- WARNING -------------- +registrar: GANDI +changed: 31/08/2009 anonymous@nowhere.xx.fr +anonymous: YES +obsoleted: NO +eligstatus: ok +source: FRNIC + +nic-hdl: GR283-FRNIC +type: ROLE +contact: GANDI ROLE +address: Gandi +address: 15, place de la Nation +address: 75011 Paris +country: FR +e-mail: noc@gandi.net +trouble: ------------------------------------------------- +trouble: GANDI is an ICANN accredited registrar +trouble: for more information: +trouble: Web: http://www.gandi.net +trouble: ------------------------------------------------- +trouble: - network troubles: noc@gandi.net +trouble: - SPAM: abuse@gandi.net +trouble: ------------------------------------------------- +admin-c: NL346-FRNIC +tech-c: NL346-FRNIC +tech-c: TUF1-FRNIC +notify: noc@gandi.net +registrar: GANDI +changed: 03/03/2006 noc@gandi.net +anonymous: NO +obsoleted: NO +source: FRNIC + + diff --git a/test/data/swisscom.ch b/test/data/swisscom.ch new file mode 100644 index 0000000..da183c5 --- /dev/null +++ b/test/data/swisscom.ch @@ -0,0 +1,34 @@ +whois: This information is subject to an Acceptable Use Policy. +See http://www.nic.ch/terms/aup.html + + +Domain name: +swisscom.ch + +Holder of domain name: +Swisscom AG +Karin Hug +Domain Registration +alte Tiefenaustrasse 6 +CH-3050 Bern +Switzerland +Contractual Language: English + +Technical contact: +Swisscom IT Services AG +Andreas Disteli +Ostermundigenstrasse 99 6 +CH-3050 Bern +Switzerland + +DNSSEC:N + +Name servers: +dns1.swisscom.com +dns2.swisscom.com +dns3.swisscom.com +dns6.swisscom.ch [193.222.76.52] +dns6.swisscom.ch [2a02:a90:ffff:ffff::c:1] +dns7.swisscom.ch [193.222.76.53] +dns7.swisscom.ch [2a02:a90:ffff:ffff::c:3] + diff --git a/test/data/whois.us b/test/data/whois.us new file mode 100644 index 0000000..d708538 --- /dev/null +++ b/test/data/whois.us @@ -0,0 +1,97 @@ +Domain Name: WHOIS.US +Domain ID: D675910-US +Sponsoring Registrar: REGISTRY REGISTRAR +Registrar URL (registration services): WWW.NEUSTAR.US +Domain Status: clientDeleteProhibited +Domain Status: clientTransferProhibited +Domain Status: serverDeleteProhibited +Domain Status: serverTransferProhibited +Domain Status: serverUpdateProhibited +Registrant ID: NEUSTAR7 +Registrant Name: .US Registration Policy +Registrant Address1: 46000 Center Oak Plaza +Registrant City: Sterling +Registrant State/Province: VA +Registrant Postal Code: 20166 +Registrant Country: United States +Registrant Country Code: US +Registrant Phone Number: +1.5714345728 +Registrant Email: support.us@neustar.us +Registrant Application Purpose: P5 +Registrant Nexus Category: C21 +Administrative Contact ID: NEUSTAR7 +Administrative Contact Name: .US Registration Policy +Administrative Contact Address1: 46000 Center Oak Plaza +Administrative Contact City: Sterling +Administrative Contact State/Province: VA +Administrative Contact Postal Code: 20166 +Administrative Contact Country: United States +Administrative Contact Country Code: US +Administrative Contact Phone Number: +1.5714345728 +Administrative Contact Email: support.us@neustar.us +Administrative Application Purpose: P5 +Administrative Nexus Category: C21 +Billing Contact ID: NEUSTAR7 +Billing Contact Name: .US Registration Policy +Billing Contact Address1: 46000 Center Oak Plaza +Billing Contact City: Sterling +Billing Contact State/Province: VA +Billing Contact Postal Code: 20166 +Billing Contact Country: United States +Billing Contact Country Code: US +Billing Contact Phone Number: +1.5714345728 +Billing Contact Email: support.us@neustar.us +Billing Application Purpose: P5 +Billing Nexus Category: C21 +Technical Contact ID: NEUSTAR7 +Technical Contact Name: .US Registration Policy +Technical Contact Address1: 46000 Center Oak Plaza +Technical Contact City: Sterling +Technical Contact State/Province: VA +Technical Contact Postal Code: 20166 +Technical Contact Country: United States +Technical Contact Country Code: US +Technical Contact Phone Number: +1.5714345728 +Technical Contact Email: support.us@neustar.us +Technical Application Purpose: P5 +Technical Nexus Category: C21 +Name Server: PDNS1.ULTRADNS.NET +Name Server: PDNS2.ULTRADNS.NET +Name Server: PDNS3.ULTRADNS.ORG +Name Server: PDNS4.ULTRADNS.ORG +Name Server: PDNS5.ULTRADNS.INFO +Name Server: PDNS6.ULTRADNS.CO.UK +Created by Registrar: REGISTRY REGISTRAR +Last Updated by Registrar: BATCHCSR +Domain Registration Date: Thu Apr 18 20:44:15 GMT 2002 +Domain Expiration Date: Thu Apr 17 23:59:59 GMT 2014 +Domain Last Updated Date: Sun Jun 02 01:33:47 GMT 2013 + +>>>> Whois database was last updated on: Wed Nov 20 04:08:15 GMT 2013 <<<< + +NeuStar, Inc., the Registry Administrator for .US, has collected this +information for the WHOIS database through a .US-Accredited Registrar. +This information is provided to you for informational purposes only and is +designed to assist persons in determining contents of a domain name +registration record in the NeuStar registry database. NeuStar makes this +information available to you "as is" and does not guarantee its accuracy. +By submitting a WHOIS query, you agree that you will use this data only for +lawful purposes and that, under no circumstances will you use this data: +(1) to allow, enable, or otherwise support the transmission of mass +unsolicited, commercial advertising or solicitations via direct mail, +electronic mail, or by telephone; (2) in contravention of any applicable +data and privacy protection laws; or (3) to enable high volume, automated, +electronic processes that apply to the registry (or its systems). Compilation, +repackaging, dissemination, or other use of the WHOIS database in its +entirety, or of a substantial portion thereof, is not allowed without +NeuStar's prior written permission. NeuStar reserves the right to modify or +change these conditions at any time without prior or subsequent notification +of any kind. By executing this query, in any manner whatsoever, you agree to +abide by these terms. + +NOTE: FAILURE TO LOCATE A RECORD IN THE WHOIS DATABASE IS NOT INDICATIVE +OF THE AVAILABILITY OF A DOMAIN NAME. + +All domain names are subject to certain additional domain name registration +rules. For details, please visit our site at www.whois.us. + diff --git a/test/data/zem.org.uk b/test/data/zem.org.uk new file mode 100644 index 0000000..e766aac --- /dev/null +++ b/test/data/zem.org.uk @@ -0,0 +1,48 @@ + + Domain name: + zem.org.uk + + Registrant: + Dan Foster + + Registrant type: + UK Individual + + Registrant's address: + The registrant is a non-trading individual who has opted to have their + address omitted from the WHOIS service. + + Registrar: + Webfusion Ltd t/a 123-reg [Tag = 123-REG] + URL: http://www.123-reg.co.uk + + Relevant dates: + Registered on: 15-Apr-2009 + Expiry date: 15-Apr-2015 + Last updated: 01-Feb-2013 + + Registration status: + Registered until expiry date. + + Name servers: + dns-eu1.powerdns.net + dns-eu2.powerdns.net + dns-us1.powerdns.net + dns-us2.powerdns.net + + WHOIS lookup made at 04:14:40 20-Nov-2013 + +-- +This WHOIS information is provided for free by Nominet UK the central registry +for .uk domain names. This information and the .uk WHOIS are: + + Copyright Nominet UK 1996 - 2013. + +You may not access the .uk WHOIS or use any data from it except as permitted +by the terms of use available in full at http://www.nominet.org.uk/whoisterms, which +includes restrictions on: (A) use of the data for advertising, or its +repackaging, recompilation, redistribution or reuse (B) obscuring, removing +or hiding any or all of this notice and (C) exceeding query rate or volume +limits. The data is provided on an 'as-is' basis and may lag behind the +register. Access may be withdrawn or restricted at any time. + diff --git a/test/domains.txt b/test/domains.txt new file mode 100644 index 0000000..8263889 --- /dev/null +++ b/test/domains.txt @@ -0,0 +1,45 @@ +cryto.net +redonate.net +sven-slootweg.nl +anonnews.org +lowendbox.com +vpsboard.com +google.com +eyesonanimals.com +icetwy.re +anonne.ws +paste.ee +dailydot.com +edis.at +.si? +2x4.ru +gandi? +prq.se +zandervdm.nl +crosshost.nl +is-sexy.eu +grawlix.nl +f63.net +kgb.su +chronicle.su +nic.re +ymca.int !! +ersi.se +byme.at +singularity.fr +about.museum +nsa.gov +aridns.net.au +donuts.co +kdp.pp.se +london.ac.uk +zem.org.uk +nic.technology +nic.sexy +.xxx? +encyclopediadramatica.es +swisscom.ch +tpc.int +keybase.io +whois.us +freebnc.net