diff --git a/README.md b/README.md index 629179d..1fe676d 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,9 @@ If any of those apply, don't hesitate to file an issue! The goal is 100% coverag ## Contributing -Feel free to fork and submit pull requests! If you change any parsing or normalization logic, ensure to run the full test suite before opening a pull request. Instructions for that are below. +Feel free to fork and submit pull requests (to the `develop` branch)! If you change any parsing or normalization logic, ensure to run the full test suite before opening a pull request. Instructions for that are below. + +Please note that this project uses tabs for indentation. All commands are relative to the root directory of the repository. diff --git a/doc/contribute.html b/doc/contribute.html index 9ba390e..eb29f51 100644 --- a/doc/contribute.html +++ b/doc/contribute.html @@ -22,20 +22,44 @@ margin-bottom: 32px; } - .example + .example , .section { padding: 5px 6px; font-weight: bold; + margin-top: 11px; + } + + .example + { font-size: 15px; background-color: #E6E6E6; - margin-top: 11px; + } + + .section + { + background-color: #E8E8E8; + } + + .section > .title + { + font-size: 16px; } - .example > .children + .example > .children, .section > .children { padding-top: 11px; padding-left: 10px; } + + .section > .children + { + font-size: 95%; + } + + .section > .children > div.text:first-child, .section > .children > dl:first-child + { + margin-top: 0px; + } .example > .children > h7 { diff --git a/doc/index.html b/doc/index.html index f90b7c6..38f44db 100644 --- a/doc/index.html +++ b/doc/index.html @@ -22,20 +22,44 @@ margin-bottom: 32px; } - .example + .example , .section { padding: 5px 6px; font-weight: bold; + margin-top: 11px; + } + + .example + { font-size: 15px; background-color: #E6E6E6; - margin-top: 11px; + } + + .section + { + background-color: #E8E8E8; + } + + .section > .title + { + font-size: 16px; } - .example > .children + .example > .children, .section > .children { padding-top: 11px; padding-left: 10px; } + + .section > .children + { + font-size: 95%; + } + + .section > .children > div.text:first-child, .section > .children > dl:first-child + { + margin-top: 0px; + } .example > .children > h7 { diff --git a/doc/install.html b/doc/install.html index 8f7b6eb..1a5b5ad 100644 --- a/doc/install.html +++ b/doc/install.html @@ -22,20 +22,44 @@ margin-bottom: 32px; } - .example + .example , .section { padding: 5px 6px; font-weight: bold; + margin-top: 11px; + } + + .example + { font-size: 15px; background-color: #E6E6E6; - margin-top: 11px; + } + + .section + { + background-color: #E8E8E8; + } + + .section > .title + { + font-size: 16px; } - .example > .children + .example > .children, .section > .children { padding-top: 11px; padding-left: 10px; } + + .section > .children + { + font-size: 95%; + } + + .section > .children > div.text:first-child, .section > .children > dl:first-child + { + margin-top: 0px; + } .example > .children > h7 { @@ -156,6 +180,6 @@ -

Installing pythonwhois

<< back to index
To install pythonwhois, you need to have pip installed. It's available on most distributions in a package named python-pip.
The pythonwhois package includes the pwhois tool.

Installing it from scratch

Code:
pip install pythonwhois

Updating from a previous version

Make sure to read the upgrade notes before updating to a new major pythonwhois version!
Code:
pip install --upgrade pythonwhois
+

Installing pythonwhois

<< back to index
To install pythonwhois, you need to have pip installed. It's available on most distributions in a package named python-pip.
The pythonwhois package includes the pwhois tool.

Installing it from scratch

Code:
pip install pythonwhois
If you are using Python 2.6 and get an ImportError about OrderedDict, also do the following:
Code:
pip install ordereddict

Updating from a previous version

Make sure to read the upgrade notes before updating to a new major pythonwhois version!
Code:
pip install --upgrade pythonwhois
diff --git a/doc/troubleshoot.html b/doc/troubleshoot.html index f901b4d..f75b187 100644 --- a/doc/troubleshoot.html +++ b/doc/troubleshoot.html @@ -22,20 +22,44 @@ margin-bottom: 32px; } - .example + .example , .section { padding: 5px 6px; font-weight: bold; + margin-top: 11px; + } + + .example + { font-size: 15px; background-color: #E6E6E6; - margin-top: 11px; + } + + .section + { + background-color: #E8E8E8; + } + + .section > .title + { + font-size: 16px; } - .example > .children + .example > .children, .section > .children { padding-top: 11px; padding-left: 10px; } + + .section > .children + { + font-size: 95%; + } + + .section > .children > div.text:first-child, .section > .children > dl:first-child + { + margin-top: 0px; + } .example > .children > h7 { diff --git a/doc/upgrade.html b/doc/upgrade.html index ed533a8..80d1558 100644 --- a/doc/upgrade.html +++ b/doc/upgrade.html @@ -22,20 +22,44 @@ margin-bottom: 32px; } - .example + .example , .section { padding: 5px 6px; font-weight: bold; + margin-top: 11px; + } + + .example + { font-size: 15px; background-color: #E6E6E6; - margin-top: 11px; + } + + .section + { + background-color: #E8E8E8; + } + + .section > .title + { + font-size: 16px; } - .example > .children + .example > .children, .section > .children { padding-top: 11px; padding-left: 10px; } + + .section > .children + { + font-size: 95%; + } + + .section > .children > div.text:first-child, .section > .children > dl:first-child + { + margin-top: 0px; + } .example > .children > h7 { diff --git a/doc/usage.html b/doc/usage.html index 4026d99..13889a2 100644 --- a/doc/usage.html +++ b/doc/usage.html @@ -22,20 +22,44 @@ margin-bottom: 32px; } - .example + .example , .section { padding: 5px 6px; font-weight: bold; + margin-top: 11px; + } + + .example + { font-size: 15px; background-color: #E6E6E6; - margin-top: 11px; + } + + .section + { + background-color: #E8E8E8; + } + + .section > .title + { + font-size: 16px; } - .example > .children + .example > .children, .section > .children { padding-top: 11px; padding-left: 10px; } + + .section > .children + { + font-size: 95%; + } + + .section > .children > div.text:first-child, .section > .children > dl:first-child + { + margin-top: 0px; + } .example > .children > h7 { @@ -156,7 +180,7 @@ -

Using pythonwhois

<< back to index
This is a quick usage guide; pythonwhois is pretty simple.

Table of contents

Normalization

Before you start, it's important to understand the normalization functionality in pythonwhois. Since some WHOIS servers return data in all-uppercase or all-lowercase, and some registrants simply use the incorrect case themselves, reading WHOIS data can be a bit unpleasant.
pythonwhois attempts to solve this problem by optionally 'normalizing' WHOIS data. Depending on the kind of field, the parser will try to create a readable and consistent version of the value. The pwhois command-line utility uses normalization by default; when using the Python module it's disabled by default.
Normalization isn't perfect, and you shouldn't rely on it for technical purposes. It's intended for increasing human readability only. If you work with a lot of WHOIS data, it's recommended to turn off normalization or do your own post-processing.

From the commandline

pwhois [--raw] [--json] [-f PATH] DOMAIN
pwhois is the WHOIS tool that is included with pythonwhois. It's really just a script that you can run from your terminal, and that gives you nicely formatted WHOIS output. Normalization is turned on in pwhois by default, so it will try to make the output more readable (by fixing capitalization and such).
Example: Using pwhois
Code:
sh$ pwhois cryto.net
Output:
Status            : clientTransferProhibited
+		

Using pythonwhois

This is a quick usage guide; pythonwhois is pretty simple.

Table of contents

Normalization

Before you start, it's important to understand the normalization functionality in pythonwhois. Since some WHOIS servers return data in all-uppercase or all-lowercase, and some registrants simply use the incorrect case themselves, reading WHOIS data can be a bit unpleasant.
pythonwhois attempts to solve this problem by optionally 'normalizing' WHOIS data. Depending on the kind of field, the parser will try to create a readable and consistent version of the value. The pwhois command-line utility uses normalization by default; when using the Python module it's disabled by default.
Normalization isn't perfect, and you shouldn't rely on it for technical purposes. It's intended for increasing human readability only. If you work with a lot of WHOIS data, it's recommended to turn off normalization or do your own post-processing.

From the commandline

From your Python application

To start using pythonwhois, use import pythonwhois.
pythonwhois.get_whois(domain[, normalized=[]])
Retrieves and parses WHOIS data for a specified domain. Raises pythonwhois.shared.WhoisException if no root server for the TLD could be found.

Arguments

domain
The domain to WHOIS.
normalized
Optional. What data to normalize. By default, no data will be normalized. You can specify either a list of keys to normalize (see also the result reference below), an empty list (to turn off normalization), or True (to turn on normalization for all supported fields).

Returns

A nested structured object, consisting of dicts and lists. The only key that is always present is contacts, but the keys inside the dict that it contains may not be.
id
The Domain ID.
status
A list of current statuses of the domain at the registrar. May contain any string value.
creation_date
A list of datetime.datetime objects representing the creation date(s) of the domain.
expiration_date
A list of datetime.datetime objects representing the expiration date(s) of the domain.
updated_date
A list of datetime.datetime objects representing the update date(s) of the domain. Note that what an 'update date' entails, differs between WHOIS servers. For some, it means the last renewal data. For others, it means the last registrant info update. For yet others, it means the last update of their WHOIS database as a whole. This key is unlikely to be useful, unless you're trying to plot WHOIS data changes over time.
registrar
A list of registrar names. May contain any string value.
whois_server
A list of WHOIS servers refered to. This is unlikely to be a useful list.
nameservers
A list of nameservers for the domain, as indicated by the WHOIS server.
emails
A list of e-mail address for the domain. This list does not include e-mail addresses from registrant data, only e-mail addresses from other places in the WHOIS data such as abuse report instructions.
contacts
A dict containing contacts for the domain, each also a dict. Fields for these contacts are listed further down. If a specific type of contact was not listed for the domain, the key for it will still exist, but it will contain None.
registrant
The registrant or domain holder.
tech
The technical contact for the domain. May be either the registrar, or a party related to the registrant.
admin
The administrative contact for the domain.
billing
The billing contact for the domain.

Contact fields

These are the fields that any contact dict may contain. If certain information for a contact was not found, the corresponding key will be absent.
Important: Note that any of these fields may consist of multiple lines, although the address field is the only one that is likely to consist of multiple lines.
handle
The NIC handle for the contact.
name
The full name of the contact.
organization
The organization or company that the contact belongs to.
street
The street address of the contact (or organization).
postalcode
The postal code of the contact (or organization). This may or may not include a country prefix.
city
The city of the contact (or organization).
state
The state, province, or region of the contact (or organization). The actual values for this field vary widely.
country
The country of the contact (or organization).
email
The e-mail address of the contact (or organization).
phone
The phone number of the contact (or organization), including extension where applicable.
fax
The fax number of the contact (or organization), including extension where applicable.

When you need more control...

+[...]
There are several optional arguments that you can pass to pwhois to make it behave differently.
--raw
When you use this flag, pwhois will not attempt to parse the WHOIS data; it'll just follow redirects and output the raw data, delimited by double dashes (--).
--json
This flag will make pwhois output JSON instead of human-readable output. While not recommended, you can use this if you need parsed data in a non-Python application.
-f PATH
This will make pwhois read and parse WHOIS data from a specified file, instead of actually contacting a WHOIS server. Useful if you get your WHOIS data elsewhere.
Important: Note that when using -f PATH, pwhois will still expect a domain to be specified! What you enter here doesn't really matter, you can also just specify a single dot . for the domain.

From your Python application

To start using pythonwhois, use import pythonwhois.
pythonwhois.get_whois(domain[, normalized=[]])
Retrieves and parses WHOIS data for a specified domain. Raises pythonwhois.shared.WhoisException if no root server for the TLD could be found.

Arguments

domain
The domain to WHOIS.
normalized
Optional. What data to normalize. By default, no data will be normalized. You can specify either a list of keys to normalize (see also the result reference below), an empty list (to turn off normalization), or True (to turn on normalization for all supported fields).

Returns

A nested structured object, consisting of dicts and lists. The only key that is always present is contacts, but the keys inside the dict that it contains may not be.
id
The Domain ID.
status
A list of current statuses of the domain at the registrar. May contain any string value.
creation_date
A list of datetime.datetime objects representing the creation date(s) of the domain.
expiration_date
A list of datetime.datetime objects representing the expiration date(s) of the domain.
updated_date
A list of datetime.datetime objects representing the update date(s) of the domain. Note that what an 'update date' entails, differs between WHOIS servers. For some, it means the last renewal data. For others, it means the last registrant info update. For yet others, it means the last update of their WHOIS database as a whole. This key is unlikely to be useful, unless you're trying to plot WHOIS data changes over time.
registrar
A list of registrar names. May contain any string value.
whois_server
A list of WHOIS servers refered to. This is unlikely to be a useful list.
nameservers
A list of nameservers for the domain, as indicated by the WHOIS server.
emails
A list of e-mail address for the domain. This list does not include e-mail addresses from registrant data, only e-mail addresses from other places in the WHOIS data such as abuse report instructions.
contacts
A dict containing contacts for the domain, each also a dict. Fields for these contacts are listed further down. If a specific type of contact was not listed for the domain, the key for it will still exist, but it will contain None.
registrant
The registrant or domain holder.
tech
The technical contact for the domain. May be either the registrar, or a party related to the registrant.
admin
The administrative contact for the domain.
billing
The billing contact for the domain.

Contact fields

These are the fields that any contact dict may contain. If certain information for a contact was not found, the corresponding key will be absent.
Important: Note that any of these fields may consist of multiple lines, although the address field is the only one that is likely to consist of multiple lines.
handle
The NIC handle for the contact.
name
The full name of the contact.
organization
The organization or company that the contact belongs to.
street
The street address of the contact (or organization).
postalcode
The postal code of the contact (or organization). This may or may not include a country prefix.
city
The city of the contact (or organization).
state
The state, province, or region of the contact (or organization). The actual values for this field vary widely.
country
The country of the contact (or organization).
email
The e-mail address of the contact (or organization).
phone
The phone number of the contact (or organization), including extension where applicable.
fax
The fax number of the contact (or organization), including extension where applicable.

When you need more control...

pythonwhois.net.get_whois_raw(domain[, server="", rfc3490=True])
Retrieves the raw WHOIS data for the specified domain, and returns it as a list of responses (one element for each WHOIS server queried). This method will keep following redirects, until it ends up at the right server (and all responses it picks up in the meantime, will be included). Raises pythonwhois.shared.WhoisException if no root server for the TLD could be found.
domain
The domain name to query for.
server
Optional. The WHOIS server to query. When not specified, it will default to the appropriate WHOIS server for the TLD.
rfc3490
Optional. If set to True a given domain will be encoded through the toASCII method as documented in RFC3490 before its submission to the whois service. If the domain isn't given in unicode, the method will handle the decoding by itself.
pythonwhois.net.get_root_server(domain)
Looks up the appropriate root server for a TLD, and returns it as a string. Raises pythonwhois.shared.WhoisException if no root server for the TLD could be found.
domain
The domain whose TLD you want to know the root WHOIS server for.
pythonwhois.parse.parse_raw_whois(raw_data[, normalized])
Parses the specified raw WHOIS data. It's useful to call this method manually if you receive your WHOIS data from elsewhere, and don't need the retrieval capabilities of pythonwhois. Returns an object like pythonwhois.get_whois does.
raw_data
A list of raw WHOIS responses to parse. This is the kind of list that pythonwhois.net.get_whois_raw outputs.
normalized
Optional. Like for pythonwhois.get_whois. Empty list or omitted to normalize nothing, True to normalize all supported fields, a list of keys if you only want certain keys to be normalized.
diff --git a/doc/usage.zpy b/doc/usage.zpy index 2817b4e..6e671d0 100644 --- a/doc/usage.zpy +++ b/doc/usage.zpy @@ -160,7 +160,7 @@ To start using pythonwhois, use `import pythonwhois`. ## When you need more control... -^ pythonwhois.net.get_whois_raw(**domain**[, **server=""**]) +^ pythonwhois.net.get_whois_raw(**domain**[, **server=""**, **rfc3490=True**]) Retrieves the raw WHOIS data for the specified domain, and returns it as a list of responses (one element for each WHOIS server queried). This method will keep following redirects, until it ends up at the right server (and all responses it picks up in the meantime, will be included). Raises `pythonwhois.shared.WhoisException` if no root server for the TLD could be found. @@ -170,6 +170,10 @@ To start using pythonwhois, use `import pythonwhois`. server:: **Optional.** The WHOIS server to query. When not specified, it will default to the appropriate WHOIS server for the TLD. + rfc3490:: + **Optional.** If set to `True` a given domain will be encoded through the **toASCII** method as documented in RFC3490 before its submission to the whois service. If the domain isn't given in unicode, the method will handle the decoding by itself. + + ^ pythonwhois.net.get_root_server(**domain**) Looks up the appropriate root server for a TLD, and returns it as a string. Raises `pythonwhois.shared.WhoisException` if no root server for the TLD could be found. diff --git a/pythonwhois/net.py b/pythonwhois/net.py index 3021beb..4393b0b 100644 --- a/pythonwhois/net.py +++ b/pythonwhois/net.py @@ -1,7 +1,12 @@ import socket, re +from codecs import encode, decode from . import shared -def get_whois_raw(domain, server="", previous=[]): +def get_whois_raw(domain, server="", previous=[], rfc3490=True): + + if rfc3490: + domain = encode( domain if type(domain) is unicode else decode(domain, "utf8"), "idna" ) + if len(previous) == 0: # Root query target_server = get_root_server(domain) @@ -9,6 +14,8 @@ def get_whois_raw(domain, server="", previous=[]): target_server = server if domain.endswith(".jp") and target_server == "whois.jprs.jp": request_domain = "%s/e" % domain # Suppress Japanese output + elif domain.endswith(".de") and ( target_server == "whois.denic.de" or target_server == "de.whois-servers.net" ): + request_domain = "-T dn,ace %s" % domain # regional specific stuff elif target_server == "whois.verisign-grs.com": request_domain = "=%s" % domain # Avoid partial matches else: diff --git a/pythonwhois/parse.py b/pythonwhois/parse.py index b3d5168..6b12745 100644 --- a/pythonwhois/parse.py +++ b/pythonwhois/parse.py @@ -65,7 +65,7 @@ grammar = { 'Domain Last Updated Date\s?[.]*:\s?(?P.+)', 'Record last updated\s?[.]*:\s?(?P.+)', 'Modified\s?[.]*:\s?(?P.+)', - 'changed:\s*(?P.+)', + '(C|c)hanged:\s*(?P.+)', 'Last Update\s?[.]*:\s?(?P.+)', 'Last updated on (?P.+) [a-z]{3,4}', 'Last updated:\s*(?P.+)', @@ -93,21 +93,22 @@ grammar = { 'NS [0-9]+\s*:\s*(?P.+)', '(?[a-z0-9-]+\.d?ns[0-9]*\.([a-z0-9-]+\.)+[a-z0-9]+)', '(?([a-z0-9-]+\.)+[a-z0-9]+)(\s+([0-9]{1,3}\.){3}[0-9]{1,3})', - '(?d?ns\.([a-z0-9-]+\.)+[a-z0-9]+)'], + '(?d?ns\.([a-z0-9-]+\.)+[a-z0-9]+)', + 'Nserver:\s*(?P.+)'], 'emails': ['(?P[\w.-]+@[\w.-]+\.[\w]{2,6})', # Really need to fix this, much longer TLDs now exist... '(?P[\w.-]+\sAT\s[\w.-]+\sDOT\s[\w]{2,6})'] }, "_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}))?', + '(\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})', + '(\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]{2})[./-]?(?P[0-9]{2})(\s|T|/)((?P[0-9]{1,2})[:.](?P[0-9]{1,2})[:.](?P[0-9]{1,2}))', '(?P[0-9]{4})[./-](?P[0-9]{1,2})[./-](?P[0-9]{1,2})', '(?P[0-9]{1,2})[./ -](?P[0-9]{1,2})[./ -](?P[0-9]{4}|[0-9]{2})', '(?PJan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (?P[0-9]{1,2}),? (?P[0-9]{4})', - '(?P[0-9]{1,2})-(?PJanuary|February|March|April|May|June|July|August|September|October|November|December)-(?P[0-9]{4})' + '(?P[0-9]{1,2})-(?PJanuary|February|March|April|May|June|July|August|September|October|November|December)-(?P[0-9]{4})', ), "_months": { 'jan': 1, @@ -503,6 +504,7 @@ def parse_registrants(data): "Technical contact:\n(?: (?P.+)\n)? (?P.+)\n (?P.+)\n (?P.+)\n (?P.+), (?P.+) (?P.+) (?P.+)\n Phone: (?P.*)\n Fax: (?P.*)\n", # Fabulous.com "Admin Contact Information :[ ]*\n[ ]+(?P.*)\n[ ]+(?P.*)\n[ ]+(?P.*)\n[ ]+(?P.*)\n[ ]+(?P.*)\n[ ]+(?P.*)\n[ ]+(?P.*)\n[ ]+(?P.*)\n[ ]+(?P.*)\n\n", # GAL Communication " Technical contact:\n (?P.+)\n (?P.*)\n (?P.+)\n (?P.+) (?P\S+),[ ]+(?P.+)\n (?P.+)\n (?P.+)\n (?P.*)\n (?P.*)", # .am + "\[Zone-C\]\nType: (?P.+)\nName: (?P.+)\n(Organisation: (?P.+)\n){0,1}(Address: (?P.+)\n){1}(Address: (?P.+)\n){0,1}(Address: (?P.+)\n){0,1}(Address: (?P.+)\n){0,1}PostalCode: (?P.+)\nCity: (?P.+)\nCountryCode: (?P[A-Za-z]{2})\nPhone: (?P.+)\nFax: (?P.+)\nEmail: (?P.+)\n(Remarks: (?P.+)\n){0,1}Changed: (?P.+)", # DeNIC ] admin_contact_regexes = [ @@ -522,6 +524,7 @@ def parse_registrants(data): "Administrative contact:\n(?: (?P.+)\n)? (?P.+)\n (?P.+)\n (?P.+)\n (?P.+), (?P.+) (?P.+) (?P.+)\n Phone: (?P.*)\n Fax: (?P.*)\n", # Fabulous.com "Tech Contact Information :[ ]*\n[ ]+(?P.*)\n[ ]+(?P.*)\n[ ]+(?P.*)\n[ ]+(?P.*)\n[ ]+(?P.*)\n[ ]+(?P.*)\n[ ]+(?P.*)\n[ ]+(?P.*)\n[ ]+(?P.*)\n\n", # GAL Communication " Administrative contact:\n (?P.+)\n (?P.*)\n (?P.+)\n (?P.+) (?P\S+),[ ]+(?P.+)\n (?P.+)\n (?P.+)\n (?P.*)\n (?P.*)", # .am + "\[Tech-C\]\nType: (?P.+)\nName: (?P.+)\n(Organisation: (?P.+)\n){0,1}(Address: (?P.+)\n){1}(Address: (?P.+)\n){0,1}(Address: (?P.+)\n){0,1}(Address: (?P.+)\n){0,1}PostalCode: (?P.+)\nCity: (?P.+)\nCountryCode: (?P[A-Za-z]{2})\nPhone: (?P.+)\nFax: (?P.+)\nEmail: (?P.+)\n(Remarks: (?P.+)\n){0,1}Changed: (?P.+)", # DeNIC ] billing_contact_regexes = [ diff --git a/setup.py b/setup.py index d9b46bf..1c478fb 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ from setuptools import setup setup(name='pythonwhois', - version='2.1.0', + version='2.1.1', 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', diff --git a/test/data/alliancefrançaise.nu b/test/data/alliancefrançaise.nu new file mode 100644 index 0000000..b88f365 --- /dev/null +++ b/test/data/alliancefrançaise.nu @@ -0,0 +1,33 @@ +# 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 .nu top level domain. +# The data is in the UTF-8 character set and the result is +# printed with eight bits. +state: active +domain: xn--alliancefranaise-npb.nu (alliancefrançaise.nu) +holder: qi9c3zbvhr +admin-c: qi9c3zbvhr +tech-c: qi9c3zbvhr +billing-c: qi9c3zbvhr +created: 2010-03-02 +modified: 2014-01-24 +expires: 2021-06-02 +nserver: ns01.hostcontrol.com +nserver: ns02.hostcontrol.com +dnssec: unsigned delegation +status: ok +registrar: Worldnames, Inc. + diff --git a/test/data/bäckerei.de b/test/data/bäckerei.de new file mode 100644 index 0000000..9a81feb --- /dev/null +++ b/test/data/bäckerei.de @@ -0,0 +1,67 @@ +% Copyright (c) 2010 by DENIC +% Version: 2.0 +% +% Restricted rights. +% +% Terms and Conditions of Use +% +% The data in this record is provided by DENIC for informational purposes only. +% DENIC does not guarantee its accuracy and cannot, under any circumstances, +% be held liable in case the stored information would prove to be wrong, +% incomplete or not accurate in any sense. +% +% All the domain data that is visible in the whois service is protected by law. +% It is not permitted to use it for any purpose other than technical or +% administrative requirements associated with the operation of the Internet. +% It is explicitly forbidden to extract, copy and/or use or re-utilise in any +% form and by any means (electronically or not) the whole or a quantitatively +% or qualitatively substantial part of the contents of the whois database +% without prior and explicit written permission by DENIC. +% It is prohibited, in particular, to use it for transmission of unsolicited +% and/or commercial and/or advertising by phone, fax, e-mail or for any similar +% purposes. +% +% By maintaining the connection you assure that you have a legitimate interest +% in the data and that you will only use it for the stated purposes. You are +% aware that DENIC maintains the right to initiate legal proceedings against +% you in the event of any breach of this assurance and to bar you from using +% its whois service. +% +% The DENIC whois service on port 43 never discloses any information concerning +% the domain holder/administrative contact. Information concerning the domain +% holder/administrative contact can be obtained through use of our web-based +% whois service available at the DENIC website: +% http://www.denic.de/en/domains/whois-service/web-whois.html +% + +Domain: bäckerei.de +Domain-Ace: xn--bckerei-5wa.de +Nserver: ns1.parkingcrew.net +Nserver: ns2.parkingcrew.net +Status: connect +Changed: 2013-04-03T00:14:26+02:00 + +[Tech-C] +Type: PERSON +Name: Mechelke Jens +Address: Heidberger Strasse 1a +PostalCode: 28865 +City: Lilienthal +CountryCode: DE +Phone: +49.4298939487 +Fax: +49.4298939488 +Email: jens@mechelke.de +Changed: 2008-05-27T16:56:58+02:00 + +[Zone-C] +Type: PERSON +Name: Mechelke Jens +Address: Heidberger Strasse 1a +PostalCode: 28865 +City: Lilienthal +CountryCode: DE +Phone: +49.4298939487 +Fax: +49.4298939488 +Email: jens@mechelke.de +Changed: 2008-05-27T16:56:58+02:00 + diff --git a/test/data/test.de b/test/data/test.de new file mode 100644 index 0000000..24ba15d --- /dev/null +++ b/test/data/test.de @@ -0,0 +1,69 @@ +% Copyright (c) 2010 by DENIC +% Version: 2.0 +% +% Restricted rights. +% +% Terms and Conditions of Use +% +% The data in this record is provided by DENIC for informational purposes only. +% DENIC does not guarantee its accuracy and cannot, under any circumstances, +% be held liable in case the stored information would prove to be wrong, +% incomplete or not accurate in any sense. +% +% All the domain data that is visible in the whois service is protected by law. +% It is not permitted to use it for any purpose other than technical or +% administrative requirements associated with the operation of the Internet. +% It is explicitly forbidden to extract, copy and/or use or re-utilise in any +% form and by any means (electronically or not) the whole or a quantitatively +% or qualitatively substantial part of the contents of the whois database +% without prior and explicit written permission by DENIC. +% It is prohibited, in particular, to use it for transmission of unsolicited +% and/or commercial and/or advertising by phone, fax, e-mail or for any similar +% purposes. +% +% By maintaining the connection you assure that you have a legitimate interest +% in the data and that you will only use it for the stated purposes. You are +% aware that DENIC maintains the right to initiate legal proceedings against +% you in the event of any breach of this assurance and to bar you from using +% its whois service. +% +% The DENIC whois service on port 43 never discloses any information concerning +% the domain holder/administrative contact. Information concerning the domain +% holder/administrative contact can be obtained through use of our web-based +% whois service available at the DENIC website: +% http://www.denic.de/en/domains/whois-service/web-whois.html +% + +Domain: test.de +Nserver: dns.iwelt-ag.net +Nserver: dns2.iwelt-ag.net +Nserver: dns3.iwelt-ag.de +Status: connect +Changed: 2013-04-10T11:11:41+02:00 + +[Tech-C] +Type: PERSON +Name: Christian Zantop +Organisation: Stiftung Warentest +Address: Luetzowplatz 11-13 +PostalCode: 10785 +City: Berlin +CountryCode: DE +Phone: +49.3026312604 +Fax: +49.3026312342 +Email: webmaster@stiftung-warentest.de +Changed: 2013-03-19T14:16:18+01:00 + +[Zone-C] +Type: ROLE +Name: Domainservice +Organisation: iWelt AG +Address: Mainparkring 4 +PostalCode: 97246 +City: Eibelstadt +CountryCode: DE +Phone: +49.9303982860 +Fax: +49.9303982879 +Email: support@iwelt.de +Changed: 2013-08-05T11:43:45+02:00 + diff --git a/test/domains.txt b/test/domains.txt index 8263889..8db0525 100644 --- a/test/domains.txt +++ b/test/domains.txt @@ -43,3 +43,4 @@ tpc.int keybase.io whois.us freebnc.net +test.de diff --git a/test/target_default/alliancefrançaise.nu b/test/target_default/alliancefrançaise.nu new file mode 100644 index 0000000..2e7869e --- /dev/null +++ b/test/target_default/alliancefrançaise.nu @@ -0,0 +1 @@ +{"status": ["active", "ok"], "updated_date": ["2014-01-24T00:00:00"], "contacts": {"admin": {"handle": "qi9c3zbvhr"}, "tech": {"handle": "qi9c3zbvhr"}, "registrant": {"handle": "qi9c3zbvhr"}, "billing": {"handle": "qi9c3zbvhr"}}, "nameservers": ["ns01.hostcontrol.com", "ns02.hostcontrol.com"], "expiration_date": ["2021-06-02T00:00:00"], "creation_date": ["2010-03-02T00:00:00"], "raw": ["# Copyright (c) 1997- .SE (The Internet Infrastructure Foundation). \n# All rights reserved. \n\n# The information obtained through searches, or otherwise, is protected \n# by the Swedish Copyright Act (1960:729) and international conventions. \n# It is also subject to database protection according to the Swedish \n# Copyright Act. \n\n# Any use of this material to target advertising or \n# similar activities is forbidden and will be prosecuted. \n# If any of the information below is transferred to a third \n# party, it must be done in its entirety. This server must \n# not be used as a backend for a search engine. \n\n# Result of search for registered domain names under \n# the .nu top level domain. \n# The data is in the UTF-8 character set and the result is \n# printed with eight bits.\nstate: active\ndomain: xn--alliancefranaise-npb.nu (alliancefran\u00e7aise.nu)\nholder: qi9c3zbvhr\nadmin-c: qi9c3zbvhr\ntech-c: qi9c3zbvhr\nbilling-c: qi9c3zbvhr\ncreated: 2010-03-02\nmodified: 2014-01-24\nexpires: 2021-06-02\nnserver: ns01.hostcontrol.com\nnserver: ns02.hostcontrol.com\ndnssec: unsigned delegation\nstatus: ok\nregistrar: Worldnames, Inc.\n\n"], "registrar": ["Worldnames, Inc."]} \ No newline at end of file diff --git a/test/target_default/bäckerei.de b/test/target_default/bäckerei.de new file mode 100644 index 0000000..dda5536 --- /dev/null +++ b/test/target_default/bäckerei.de @@ -0,0 +1 @@ +{"status": ["connect"], "updated_date": ["2013-04-03T00:14:26", "2008-05-27T16:56:58"], "contacts": {"admin": {"city": "Lilienthal", "fax": "+49.4298939488", "name": "Mechelke Jens", "country": "DE", "changed": "2008-05-27T16:56:58+02:00", "phone": "+49.4298939487", "street": "Heidberger Strasse 1a", "postalcode": "28865", "type": "PERSON", "email": "jens@mechelke.de"}, "tech": {"city": "Lilienthal", "fax": "+49.4298939488", "name": "Mechelke Jens", "country": "DE", "changed": "2008-05-27T16:56:58+02:00", "phone": "+49.4298939487", "street": "Heidberger Strasse 1a", "postalcode": "28865", "type": "PERSON", "email": "jens@mechelke.de"}, "registrant": null, "billing": null}, "nameservers": ["ns1.parkingcrew.net", "ns2.parkingcrew.net"], "raw": ["% Copyright (c) 2010 by DENIC\n% Version: 2.0\n% \n% Restricted rights.\n% \n% Terms and Conditions of Use\n% \n% The data in this record is provided by DENIC for informational purposes only.\n% DENIC does not guarantee its accuracy and cannot, under any circumstances,\n% be held liable in case the stored information would prove to be wrong,\n% incomplete or not accurate in any sense.\n% \n% All the domain data that is visible in the whois service is protected by law.\n% It is not permitted to use it for any purpose other than technical or\n% administrative requirements associated with the operation of the Internet.\n% It is explicitly forbidden to extract, copy and/or use or re-utilise in any\n% form and by any means (electronically or not) the whole or a quantitatively\n% or qualitatively substantial part of the contents of the whois database\n% without prior and explicit written permission by DENIC.\n% It is prohibited, in particular, to use it for transmission of unsolicited\n% and/or commercial and/or advertising by phone, fax, e-mail or for any similar\n% purposes.\n% \n% By maintaining the connection you assure that you have a legitimate interest\n% in the data and that you will only use it for the stated purposes. You are\n% aware that DENIC maintains the right to initiate legal proceedings against\n% you in the event of any breach of this assurance and to bar you from using\n% its whois service.\n% \n% The DENIC whois service on port 43 never discloses any information concerning\n% the domain holder/administrative contact. Information concerning the domain\n% holder/administrative contact can be obtained through use of our web-based\n% whois service available at the DENIC website:\n% http://www.denic.de/en/domains/whois-service/web-whois.html\n% \n\nDomain: b\u00e4ckerei.de\nDomain-Ace: xn--bckerei-5wa.de\nNserver: ns1.parkingcrew.net\nNserver: ns2.parkingcrew.net\nStatus: connect\nChanged: 2013-04-03T00:14:26+02:00\n\n[Tech-C]\nType: PERSON\nName: Mechelke Jens\nAddress: Heidberger Strasse 1a\nPostalCode: 28865\nCity: Lilienthal\nCountryCode: DE\nPhone: +49.4298939487\nFax: +49.4298939488\nEmail: jens@mechelke.de\nChanged: 2008-05-27T16:56:58+02:00\n\n[Zone-C]\nType: PERSON\nName: Mechelke Jens\nAddress: Heidberger Strasse 1a\nPostalCode: 28865\nCity: Lilienthal\nCountryCode: DE\nPhone: +49.4298939487\nFax: +49.4298939488\nEmail: jens@mechelke.de\nChanged: 2008-05-27T16:56:58+02:00\n\n"]} \ No newline at end of file diff --git a/test/target_default/nic.ru b/test/target_default/nic.ru index 139f96d..939733e 100644 --- a/test/target_default/nic.ru +++ b/test/target_default/nic.ru @@ -1 +1 @@ -{"status": ["REGISTERED, DELEGATED, VERIFIED"], "updated_date": ["2013-11-20T08:41:39"], "contacts": {"admin": null, "tech": null, "registrant": {"organization": "JSC 'RU-CENTER'"}, "billing": null}, "nameservers": ["ns4-cloud.nic.ru", "ns5.nic.ru", "ns6.nic.ru", "ns7.nic.ru", "ns8-cloud.nic.ru"], "expiration_date": ["2013-12-01T00:00:00"], "creation_date": ["1997-11-28T00:00:00"], "raw": ["% By submitting a query to RIPN's Whois Service\n% you agree to abide by the following terms of use:\n% http://www.ripn.net/about/servpol.html#3.2 (in Russian) \n% http://www.ripn.net/about/en/servpol.html#3.2 (in English).\n\ndomain: NIC.RU\nnserver: ns4-cloud.nic.ru. 195.253.65.2, 2a01:5b0:5::2\nnserver: ns5.nic.ru. 31.177.67.100, 2a02:2090:e800:9000:31:177:67:100\nnserver: ns6.nic.ru. 31.177.74.100, 2a02:2090:ec00:9040:31:177:74:100\nnserver: ns7.nic.ru. 31.177.71.100, 2a02:2090:ec00:9000:31:177:71:100\nnserver: ns8-cloud.nic.ru. 195.253.64.10, 2a01:5b0:4::a\nstate: REGISTERED, DELEGATED, VERIFIED\norg: JSC 'RU-CENTER'\nregistrar: RU-CENTER-REG-RIPN\nadmin-contact: https://www.nic.ru/whois\ncreated: 1997.11.28\npaid-till: 2013.12.01\nfree-date: 2014.01.01\nsource: TCI\n\nLast updated on 2013.11.20 08:41:39 MSK\n\n"], "registrar": ["RU-CENTER-REG-RIPN"]} \ No newline at end of file +{"status": ["REGISTERED, DELEGATED, VERIFIED"], "updated_date": ["2013-11-20T08:41:39"], "contacts": {"admin": null, "tech": null, "registrant": {"organization": "JSC 'RU-CENTER'"}, "billing": null}, "nameservers": ["ns4-cloud.nic.ru", "ns4-cloud.nic.ru. 195.253.65.2, 2a01:5b0:5::2", "ns5.nic.ru", "ns5.nic.ru. 31.177.67.100, 2a02:2090:e800:9000:31:177:67:100", "ns6.nic.ru", "ns6.nic.ru. 31.177.74.100, 2a02:2090:ec00:9040:31:177:74:100", "ns7.nic.ru", "ns7.nic.ru. 31.177.71.100, 2a02:2090:ec00:9000:31:177:71:100", "ns8-cloud.nic.ru", "ns8-cloud.nic.ru. 195.253.64.10, 2a01:5b0:4::a"], "expiration_date": ["2013-12-01T00:00:00"], "creation_date": ["1997-11-28T00:00:00"], "raw": ["% By submitting a query to RIPN's Whois Service\n% you agree to abide by the following terms of use:\n% http://www.ripn.net/about/servpol.html#3.2 (in Russian) \n% http://www.ripn.net/about/en/servpol.html#3.2 (in English).\n\ndomain: NIC.RU\nnserver: ns4-cloud.nic.ru. 195.253.65.2, 2a01:5b0:5::2\nnserver: ns5.nic.ru. 31.177.67.100, 2a02:2090:e800:9000:31:177:67:100\nnserver: ns6.nic.ru. 31.177.74.100, 2a02:2090:ec00:9040:31:177:74:100\nnserver: ns7.nic.ru. 31.177.71.100, 2a02:2090:ec00:9000:31:177:71:100\nnserver: ns8-cloud.nic.ru. 195.253.64.10, 2a01:5b0:4::a\nstate: REGISTERED, DELEGATED, VERIFIED\norg: JSC 'RU-CENTER'\nregistrar: RU-CENTER-REG-RIPN\nadmin-contact: https://www.nic.ru/whois\ncreated: 1997.11.28\npaid-till: 2013.12.01\nfree-date: 2014.01.01\nsource: TCI\n\nLast updated on 2013.11.20 08:41:39 MSK\n\n"], "registrar": ["RU-CENTER-REG-RIPN"]} \ No newline at end of file diff --git a/test/target_default/prq.se b/test/target_default/prq.se index fe7caf7..6f2c835 100644 --- a/test/target_default/prq.se +++ b/test/target_default/prq.se @@ -1 +1 @@ -{"status": ["active", "ok"], "updated_date": ["2012-11-03T00:00:00"], "contacts": {"admin": null, "tech": null, "registrant": {"handle": "perper9352-00001"}, "billing": null}, "nameservers": ["ns.prq.se", "ns2.prq.se"], "expiration_date": ["2015-06-14T00:00:00"], "creation_date": ["2004-06-14T00:00:00"], "raw": ["# Copyright (c) 1997- .SE (The Internet Infrastructure Foundation).\n# All rights reserved.\n\n# The information obtained through searches, or otherwise, is protected\n# by the Swedish Copyright Act (1960:729) and international conventions.\n# It is also subject to database protection according to the Swedish\n# Copyright Act.\n\n# Any use of this material to target advertising or\n# similar activities is forbidden and will be prosecuted.\n# If any of the information below is transferred to a third\n# party, it must be done in its entirety. This server must\n# not be used as a backend for a search engine.\n\n# Result of search for registered domain names under\n# the .SE top level domain.\n\n# The data is in the UTF-8 character set and the result is\n# printed with eight bits.\n\nstate: active\ndomain: prq.se\nholder: perper9352-00001\nadmin-c: -\ntech-c: -\nbilling-c: -\ncreated: 2004-06-14\nmodified: 2012-11-03\nexpires: 2015-06-14\ntransferred: 2012-08-09\nnserver: ns.prq.se 193.104.214.194\nnserver: ns2.prq.se 88.80.30.194\ndnssec: unsigned delegation\nstatus: ok\nregistrar: AEB Komm\n\n"], "registrar": ["AEB Komm"]} \ No newline at end of file +{"status": ["active", "ok"], "updated_date": ["2012-11-03T00:00:00"], "contacts": {"admin": null, "tech": null, "registrant": {"handle": "perper9352-00001"}, "billing": null}, "nameservers": ["ns.prq.se", "ns.prq.se 193.104.214.194", "ns2.prq.se", "ns2.prq.se 88.80.30.194"], "expiration_date": ["2015-06-14T00:00:00"], "creation_date": ["2004-06-14T00:00:00"], "raw": ["# Copyright (c) 1997- .SE (The Internet Infrastructure Foundation).\n# All rights reserved.\n\n# The information obtained through searches, or otherwise, is protected\n# by the Swedish Copyright Act (1960:729) and international conventions.\n# It is also subject to database protection according to the Swedish\n# Copyright Act.\n\n# Any use of this material to target advertising or\n# similar activities is forbidden and will be prosecuted.\n# If any of the information below is transferred to a third\n# party, it must be done in its entirety. This server must\n# not be used as a backend for a search engine.\n\n# Result of search for registered domain names under\n# the .SE top level domain.\n\n# The data is in the UTF-8 character set and the result is\n# printed with eight bits.\n\nstate: active\ndomain: prq.se\nholder: perper9352-00001\nadmin-c: -\ntech-c: -\nbilling-c: -\ncreated: 2004-06-14\nmodified: 2012-11-03\nexpires: 2015-06-14\ntransferred: 2012-08-09\nnserver: ns.prq.se 193.104.214.194\nnserver: ns2.prq.se 88.80.30.194\ndnssec: unsigned delegation\nstatus: ok\nregistrar: AEB Komm\n\n"], "registrar": ["AEB Komm"]} \ No newline at end of file diff --git a/test/target_default/test.de b/test/target_default/test.de new file mode 100644 index 0000000..1c5a30b --- /dev/null +++ b/test/target_default/test.de @@ -0,0 +1 @@ +{"status": ["connect"], "updated_date": ["2013-04-10T11:11:41", "2013-03-19T14:16:18", "2013-08-05T11:43:45"], "contacts": {"admin": {"city": "Berlin", "fax": "+49.3026312342", "name": "Christian Zantop", "country": "DE", "changed": "2013-03-19T14:16:18+01:00", "phone": "+49.3026312604", "street": "Luetzowplatz 11-13", "postalcode": "10785", "organization": "Stiftung Warentest", "type": "PERSON", "email": "webmaster@stiftung-warentest.de"}, "tech": {"city": "Eibelstadt", "fax": "+49.9303982879", "name": "Domainservice", "country": "DE", "changed": "2013-08-05T11:43:45+02:00", "phone": "+49.9303982860", "street": "Mainparkring 4", "postalcode": "97246", "organization": "iWelt AG", "type": "ROLE", "email": "support@iwelt.de"}, "registrant": null, "billing": null}, "nameservers": ["dns.iwelt-ag.net", "dns2.iwelt-ag.net", "dns3.iwelt-ag.de"], "raw": ["% Copyright (c) 2010 by DENIC\n% Version: 2.0\n% \n% Restricted rights.\n% \n% Terms and Conditions of Use\n% \n% The data in this record is provided by DENIC for informational purposes only.\n% DENIC does not guarantee its accuracy and cannot, under any circumstances,\n% be held liable in case the stored information would prove to be wrong,\n% incomplete or not accurate in any sense.\n% \n% All the domain data that is visible in the whois service is protected by law.\n% It is not permitted to use it for any purpose other than technical or\n% administrative requirements associated with the operation of the Internet.\n% It is explicitly forbidden to extract, copy and/or use or re-utilise in any\n% form and by any means (electronically or not) the whole or a quantitatively\n% or qualitatively substantial part of the contents of the whois database\n% without prior and explicit written permission by DENIC.\n% It is prohibited, in particular, to use it for transmission of unsolicited\n% and/or commercial and/or advertising by phone, fax, e-mail or for any similar\n% purposes.\n% \n% By maintaining the connection you assure that you have a legitimate interest\n% in the data and that you will only use it for the stated purposes. You are\n% aware that DENIC maintains the right to initiate legal proceedings against\n% you in the event of any breach of this assurance and to bar you from using\n% its whois service.\n% \n% The DENIC whois service on port 43 never discloses any information concerning\n% the domain holder/administrative contact. Information concerning the domain\n% holder/administrative contact can be obtained through use of our web-based\n% whois service available at the DENIC website:\n% http://www.denic.de/en/domains/whois-service/web-whois.html\n% \n\nDomain: test.de\nNserver: dns.iwelt-ag.net\nNserver: dns2.iwelt-ag.net\nNserver: dns3.iwelt-ag.de\nStatus: connect\nChanged: 2013-04-10T11:11:41+02:00\n\n[Tech-C]\nType: PERSON\nName: Christian Zantop\nOrganisation: Stiftung Warentest\nAddress: Luetzowplatz 11-13\nPostalCode: 10785\nCity: Berlin\nCountryCode: DE\nPhone: +49.3026312604\nFax: +49.3026312342\nEmail: webmaster@stiftung-warentest.de\nChanged: 2013-03-19T14:16:18+01:00\n\n[Zone-C]\nType: ROLE\nName: Domainservice\nOrganisation: iWelt AG\nAddress: Mainparkring 4\nPostalCode: 97246\nCity: Eibelstadt\nCountryCode: DE\nPhone: +49.9303982860\nFax: +49.9303982879\nEmail: support@iwelt.de\nChanged: 2013-08-05T11:43:45+02:00\n\n"]} \ No newline at end of file diff --git a/test/target_normalized/alliancefrançaise.nu b/test/target_normalized/alliancefrançaise.nu new file mode 100644 index 0000000..c88d6cd --- /dev/null +++ b/test/target_normalized/alliancefrançaise.nu @@ -0,0 +1 @@ +{"status": ["Active", "ok"], "updated_date": ["2014-01-24T00:00:00"], "contacts": {"admin": {"handle": "qi9c3zbvhr"}, "tech": {"handle": "qi9c3zbvhr"}, "registrant": {"handle": "qi9c3zbvhr"}, "billing": {"handle": "qi9c3zbvhr"}}, "nameservers": ["ns01.hostcontrol.com", "ns02.hostcontrol.com"], "expiration_date": ["2021-06-02T00:00:00"], "creation_date": ["2010-03-02T00:00:00"], "raw": ["# Copyright (c) 1997- .SE (The Internet Infrastructure Foundation). \n# All rights reserved. \n\n# The information obtained through searches, or otherwise, is protected \n# by the Swedish Copyright Act (1960:729) and international conventions. \n# It is also subject to database protection according to the Swedish \n# Copyright Act. \n\n# Any use of this material to target advertising or \n# similar activities is forbidden and will be prosecuted. \n# If any of the information below is transferred to a third \n# party, it must be done in its entirety. This server must \n# not be used as a backend for a search engine. \n\n# Result of search for registered domain names under \n# the .nu top level domain. \n# The data is in the UTF-8 character set and the result is \n# printed with eight bits.\nstate: active\ndomain: xn--alliancefranaise-npb.nu (alliancefran\u00e7aise.nu)\nholder: qi9c3zbvhr\nadmin-c: qi9c3zbvhr\ntech-c: qi9c3zbvhr\nbilling-c: qi9c3zbvhr\ncreated: 2010-03-02\nmodified: 2014-01-24\nexpires: 2021-06-02\nnserver: ns01.hostcontrol.com\nnserver: ns02.hostcontrol.com\ndnssec: unsigned delegation\nstatus: ok\nregistrar: Worldnames, Inc.\n\n"], "registrar": ["Worldnames, Inc."]} \ No newline at end of file diff --git a/test/target_normalized/bäckerei.de b/test/target_normalized/bäckerei.de new file mode 100644 index 0000000..63f4cff --- /dev/null +++ b/test/target_normalized/bäckerei.de @@ -0,0 +1 @@ +{"status": ["Connect"], "updated_date": ["2013-04-03T00:14:26", "2008-05-27T16:56:58"], "contacts": {"admin": {"city": "Lilienthal", "fax": "+49.4298939488", "name": "Mechelke Jens", "country": "DE", "changed": "2008-05-27T16:56:58+02:00", "phone": "+49.4298939487", "street": "Heidberger Strasse 1a", "postalcode": "28865", "type": "PERSON", "email": "jens@mechelke.de"}, "tech": {"city": "Lilienthal", "fax": "+49.4298939488", "name": "Mechelke Jens", "country": "DE", "changed": "2008-05-27T16:56:58+02:00", "phone": "+49.4298939487", "street": "Heidberger Strasse 1a", "postalcode": "28865", "type": "PERSON", "email": "jens@mechelke.de"}, "registrant": null, "billing": null}, "nameservers": ["ns1.parkingcrew.net", "ns2.parkingcrew.net"], "raw": ["% Copyright (c) 2010 by DENIC\n% Version: 2.0\n% \n% Restricted rights.\n% \n% Terms and Conditions of Use\n% \n% The data in this record is provided by DENIC for informational purposes only.\n% DENIC does not guarantee its accuracy and cannot, under any circumstances,\n% be held liable in case the stored information would prove to be wrong,\n% incomplete or not accurate in any sense.\n% \n% All the domain data that is visible in the whois service is protected by law.\n% It is not permitted to use it for any purpose other than technical or\n% administrative requirements associated with the operation of the Internet.\n% It is explicitly forbidden to extract, copy and/or use or re-utilise in any\n% form and by any means (electronically or not) the whole or a quantitatively\n% or qualitatively substantial part of the contents of the whois database\n% without prior and explicit written permission by DENIC.\n% It is prohibited, in particular, to use it for transmission of unsolicited\n% and/or commercial and/or advertising by phone, fax, e-mail or for any similar\n% purposes.\n% \n% By maintaining the connection you assure that you have a legitimate interest\n% in the data and that you will only use it for the stated purposes. You are\n% aware that DENIC maintains the right to initiate legal proceedings against\n% you in the event of any breach of this assurance and to bar you from using\n% its whois service.\n% \n% The DENIC whois service on port 43 never discloses any information concerning\n% the domain holder/administrative contact. Information concerning the domain\n% holder/administrative contact can be obtained through use of our web-based\n% whois service available at the DENIC website:\n% http://www.denic.de/en/domains/whois-service/web-whois.html\n% \n\nDomain: b\u00e4ckerei.de\nDomain-Ace: xn--bckerei-5wa.de\nNserver: ns1.parkingcrew.net\nNserver: ns2.parkingcrew.net\nStatus: connect\nChanged: 2013-04-03T00:14:26+02:00\n\n[Tech-C]\nType: PERSON\nName: Mechelke Jens\nAddress: Heidberger Strasse 1a\nPostalCode: 28865\nCity: Lilienthal\nCountryCode: DE\nPhone: +49.4298939487\nFax: +49.4298939488\nEmail: jens@mechelke.de\nChanged: 2008-05-27T16:56:58+02:00\n\n[Zone-C]\nType: PERSON\nName: Mechelke Jens\nAddress: Heidberger Strasse 1a\nPostalCode: 28865\nCity: Lilienthal\nCountryCode: DE\nPhone: +49.4298939487\nFax: +49.4298939488\nEmail: jens@mechelke.de\nChanged: 2008-05-27T16:56:58+02:00\n\n"]} \ No newline at end of file diff --git a/test/target_normalized/nic.ru b/test/target_normalized/nic.ru index ac14124..512bbfe 100644 --- a/test/target_normalized/nic.ru +++ b/test/target_normalized/nic.ru @@ -1 +1 @@ -{"status": ["Registered, Delegated, Verified"], "updated_date": ["2013-11-20T08:41:39"], "contacts": {"admin": null, "tech": null, "registrant": {"organization": "Jsc 'ru-center'"}, "billing": null}, "nameservers": ["ns4-cloud.nic.ru", "ns5.nic.ru", "ns6.nic.ru", "ns7.nic.ru", "ns8-cloud.nic.ru"], "expiration_date": ["2013-12-01T00:00:00"], "creation_date": ["1997-11-28T00:00:00"], "raw": ["% By submitting a query to RIPN's Whois Service\n% you agree to abide by the following terms of use:\n% http://www.ripn.net/about/servpol.html#3.2 (in Russian) \n% http://www.ripn.net/about/en/servpol.html#3.2 (in English).\n\ndomain: NIC.RU\nnserver: ns4-cloud.nic.ru. 195.253.65.2, 2a01:5b0:5::2\nnserver: ns5.nic.ru. 31.177.67.100, 2a02:2090:e800:9000:31:177:67:100\nnserver: ns6.nic.ru. 31.177.74.100, 2a02:2090:ec00:9040:31:177:74:100\nnserver: ns7.nic.ru. 31.177.71.100, 2a02:2090:ec00:9000:31:177:71:100\nnserver: ns8-cloud.nic.ru. 195.253.64.10, 2a01:5b0:4::a\nstate: REGISTERED, DELEGATED, VERIFIED\norg: JSC 'RU-CENTER'\nregistrar: RU-CENTER-REG-RIPN\nadmin-contact: https://www.nic.ru/whois\ncreated: 1997.11.28\npaid-till: 2013.12.01\nfree-date: 2014.01.01\nsource: TCI\n\nLast updated on 2013.11.20 08:41:39 MSK\n\n"], "registrar": ["Ru-center-reg-ripn"]} \ No newline at end of file +{"status": ["Registered, Delegated, Verified"], "updated_date": ["2013-11-20T08:41:39"], "contacts": {"admin": null, "tech": null, "registrant": {"organization": "Jsc 'ru-center'"}, "billing": null}, "nameservers": ["ns4-cloud.nic.ru", "ns4-cloud.nic.ru. 195.253.65.2, 2a01:5b0:5::2", "ns5.nic.ru", "ns5.nic.ru. 31.177.67.100, 2a02:2090:e800:9000:31:177:67:100", "ns6.nic.ru", "ns6.nic.ru. 31.177.74.100, 2a02:2090:ec00:9040:31:177:74:100", "ns7.nic.ru", "ns7.nic.ru. 31.177.71.100, 2a02:2090:ec00:9000:31:177:71:100", "ns8-cloud.nic.ru", "ns8-cloud.nic.ru. 195.253.64.10, 2a01:5b0:4::a"], "expiration_date": ["2013-12-01T00:00:00"], "creation_date": ["1997-11-28T00:00:00"], "raw": ["% By submitting a query to RIPN's Whois Service\n% you agree to abide by the following terms of use:\n% http://www.ripn.net/about/servpol.html#3.2 (in Russian) \n% http://www.ripn.net/about/en/servpol.html#3.2 (in English).\n\ndomain: NIC.RU\nnserver: ns4-cloud.nic.ru. 195.253.65.2, 2a01:5b0:5::2\nnserver: ns5.nic.ru. 31.177.67.100, 2a02:2090:e800:9000:31:177:67:100\nnserver: ns6.nic.ru. 31.177.74.100, 2a02:2090:ec00:9040:31:177:74:100\nnserver: ns7.nic.ru. 31.177.71.100, 2a02:2090:ec00:9000:31:177:71:100\nnserver: ns8-cloud.nic.ru. 195.253.64.10, 2a01:5b0:4::a\nstate: REGISTERED, DELEGATED, VERIFIED\norg: JSC 'RU-CENTER'\nregistrar: RU-CENTER-REG-RIPN\nadmin-contact: https://www.nic.ru/whois\ncreated: 1997.11.28\npaid-till: 2013.12.01\nfree-date: 2014.01.01\nsource: TCI\n\nLast updated on 2013.11.20 08:41:39 MSK\n\n"], "registrar": ["Ru-center-reg-ripn"]} \ No newline at end of file diff --git a/test/target_normalized/prq.se b/test/target_normalized/prq.se index 8ee2bfc..45c697a 100644 --- a/test/target_normalized/prq.se +++ b/test/target_normalized/prq.se @@ -1 +1 @@ -{"status": ["Active", "ok"], "updated_date": ["2012-11-03T00:00:00"], "contacts": {"admin": null, "tech": null, "registrant": {"handle": "perper9352-00001"}, "billing": null}, "nameservers": ["ns.prq.se", "ns2.prq.se"], "expiration_date": ["2015-06-14T00:00:00"], "creation_date": ["2004-06-14T00:00:00"], "raw": ["# Copyright (c) 1997- .SE (The Internet Infrastructure Foundation).\n# All rights reserved.\n\n# The information obtained through searches, or otherwise, is protected\n# by the Swedish Copyright Act (1960:729) and international conventions.\n# It is also subject to database protection according to the Swedish\n# Copyright Act.\n\n# Any use of this material to target advertising or\n# similar activities is forbidden and will be prosecuted.\n# If any of the information below is transferred to a third\n# party, it must be done in its entirety. This server must\n# not be used as a backend for a search engine.\n\n# Result of search for registered domain names under\n# the .SE top level domain.\n\n# The data is in the UTF-8 character set and the result is\n# printed with eight bits.\n\nstate: active\ndomain: prq.se\nholder: perper9352-00001\nadmin-c: -\ntech-c: -\nbilling-c: -\ncreated: 2004-06-14\nmodified: 2012-11-03\nexpires: 2015-06-14\ntransferred: 2012-08-09\nnserver: ns.prq.se 193.104.214.194\nnserver: ns2.prq.se 88.80.30.194\ndnssec: unsigned delegation\nstatus: ok\nregistrar: AEB Komm\n\n"], "registrar": ["AEB Komm"]} \ No newline at end of file +{"status": ["Active", "ok"], "updated_date": ["2012-11-03T00:00:00"], "contacts": {"admin": null, "tech": null, "registrant": {"handle": "perper9352-00001"}, "billing": null}, "nameservers": ["ns.prq.se", "ns.prq.se 193.104.214.194", "ns2.prq.se", "ns2.prq.se 88.80.30.194"], "expiration_date": ["2015-06-14T00:00:00"], "creation_date": ["2004-06-14T00:00:00"], "raw": ["# Copyright (c) 1997- .SE (The Internet Infrastructure Foundation).\n# All rights reserved.\n\n# The information obtained through searches, or otherwise, is protected\n# by the Swedish Copyright Act (1960:729) and international conventions.\n# It is also subject to database protection according to the Swedish\n# Copyright Act.\n\n# Any use of this material to target advertising or\n# similar activities is forbidden and will be prosecuted.\n# If any of the information below is transferred to a third\n# party, it must be done in its entirety. This server must\n# not be used as a backend for a search engine.\n\n# Result of search for registered domain names under\n# the .SE top level domain.\n\n# The data is in the UTF-8 character set and the result is\n# printed with eight bits.\n\nstate: active\ndomain: prq.se\nholder: perper9352-00001\nadmin-c: -\ntech-c: -\nbilling-c: -\ncreated: 2004-06-14\nmodified: 2012-11-03\nexpires: 2015-06-14\ntransferred: 2012-08-09\nnserver: ns.prq.se 193.104.214.194\nnserver: ns2.prq.se 88.80.30.194\ndnssec: unsigned delegation\nstatus: ok\nregistrar: AEB Komm\n\n"], "registrar": ["AEB Komm"]} \ No newline at end of file diff --git a/test/target_normalized/test.de b/test/target_normalized/test.de new file mode 100644 index 0000000..3d76fe0 --- /dev/null +++ b/test/target_normalized/test.de @@ -0,0 +1 @@ +{"status": ["Connect"], "updated_date": ["2013-04-10T11:11:41", "2013-03-19T14:16:18", "2013-08-05T11:43:45"], "contacts": {"admin": {"city": "Berlin", "fax": "+49.3026312342", "name": "Christian Zantop", "country": "DE", "changed": "2013-03-19T14:16:18+01:00", "phone": "+49.3026312604", "street": "Luetzowplatz 11-13", "postalcode": "10785", "organization": "Stiftung Warentest", "type": "PERSON", "email": "webmaster@stiftung-warentest.de"}, "tech": {"city": "Eibelstadt", "fax": "+49.9303982879", "name": "Domainservice", "country": "DE", "changed": "2013-08-05T11:43:45+02:00", "phone": "+49.9303982860", "street": "Mainparkring 4", "postalcode": "97246", "organization": "iWelt AG", "type": "ROLE", "email": "support@iwelt.de"}, "registrant": null, "billing": null}, "nameservers": ["dns.iwelt-ag.net", "dns2.iwelt-ag.net", "dns3.iwelt-ag.de"], "raw": ["% Copyright (c) 2010 by DENIC\n% Version: 2.0\n% \n% Restricted rights.\n% \n% Terms and Conditions of Use\n% \n% The data in this record is provided by DENIC for informational purposes only.\n% DENIC does not guarantee its accuracy and cannot, under any circumstances,\n% be held liable in case the stored information would prove to be wrong,\n% incomplete or not accurate in any sense.\n% \n% All the domain data that is visible in the whois service is protected by law.\n% It is not permitted to use it for any purpose other than technical or\n% administrative requirements associated with the operation of the Internet.\n% It is explicitly forbidden to extract, copy and/or use or re-utilise in any\n% form and by any means (electronically or not) the whole or a quantitatively\n% or qualitatively substantial part of the contents of the whois database\n% without prior and explicit written permission by DENIC.\n% It is prohibited, in particular, to use it for transmission of unsolicited\n% and/or commercial and/or advertising by phone, fax, e-mail or for any similar\n% purposes.\n% \n% By maintaining the connection you assure that you have a legitimate interest\n% in the data and that you will only use it for the stated purposes. You are\n% aware that DENIC maintains the right to initiate legal proceedings against\n% you in the event of any breach of this assurance and to bar you from using\n% its whois service.\n% \n% The DENIC whois service on port 43 never discloses any information concerning\n% the domain holder/administrative contact. Information concerning the domain\n% holder/administrative contact can be obtained through use of our web-based\n% whois service available at the DENIC website:\n% http://www.denic.de/en/domains/whois-service/web-whois.html\n% \n\nDomain: test.de\nNserver: dns.iwelt-ag.net\nNserver: dns2.iwelt-ag.net\nNserver: dns3.iwelt-ag.de\nStatus: connect\nChanged: 2013-04-10T11:11:41+02:00\n\n[Tech-C]\nType: PERSON\nName: Christian Zantop\nOrganisation: Stiftung Warentest\nAddress: Luetzowplatz 11-13\nPostalCode: 10785\nCity: Berlin\nCountryCode: DE\nPhone: +49.3026312604\nFax: +49.3026312342\nEmail: webmaster@stiftung-warentest.de\nChanged: 2013-03-19T14:16:18+01:00\n\n[Zone-C]\nType: ROLE\nName: Domainservice\nOrganisation: iWelt AG\nAddress: Mainparkring 4\nPostalCode: 97246\nCity: Eibelstadt\nCountryCode: DE\nPhone: +49.9303982860\nFax: +49.9303982879\nEmail: support@iwelt.de\nChanged: 2013-08-05T11:43:45+02:00\n\n"]} \ No newline at end of file