Merge branch 'develop'

master
Sven Slootweg 11 years ago
commit 81c74d8e54

@ -75,6 +75,7 @@ grammar = {
'whois_server': ['Whois Server:\s?(?P<val>.+)',
'Registrar Whois:\s?(?P<val>.+)'],
'nameservers': ['Name Server:[ ]*(?P<val>[^ ]+)',
'Nameservers:[ ]*(?P<val>[^ ]+)',
'(?<![^ .])(?P<val>[a-z]*d?ns[0-9]+([a-z]{3})?\.([a-z0-9-]+\.)+[a-z0-9]+)',
'nameserver:\s*(?P<val>.+)',
'nserver:\s*(?P<val>[^[\s]+)',
@ -405,7 +406,8 @@ def parse_registrants(data):
registrant_regexes = [
" Registrant:[ ]*\n (?P<organization>.*)\n (?P<name>.*)\n (?P<street>.*)\n (?P<city>.*), (?P<state>.*) (?P<postalcode>.*)\n (?P<country>.*)\n(?: Phone: (?P<phone>.*)\n)? Email: (?P<email>.*)\n", # Corporate Domains, Inc.
"Registrant:\n (?P<name>.+)\n (?P<street1>.+)\n(?: (?P<street2>.*)\n)?(?: (?P<street3>.*)\n)? (?P<postalcode>.+), (?P<city>.+)\n (?P<country>.+)\n (?P<phone>.+)\n (?P<email>.+)\n\n", # OVH
"Registrant ID:(?P<handle>.+)\nRegistrant Name:(?P<name>.*)\n(?:Registrant Organization:(?P<organization>.*)\n)?Registrant Street1:(?P<street1>.*)\n(?:Registrant Street2:(?P<street2>.*)\n)?(?:Registrant Street3:(?P<street3>.*)\n)?Registrant City:(?P<city>.*)\nRegistrant State/Province:(?P<state>.*)\nRegistrant Postal Code:(?P<postalcode>.*)\nRegistrant Country:(?P<country>.*)\nRegistrant Phone:(?P<phone>.*)\n(?:Registrant Phone Ext.:(?P<phone_ext>.*)\n)?(?:Registrant FAX:(?P<fax>.*)\n)?(?:Registrant FAX Ext.:(?P<fax_ext>.*)\n)?Registrant Email:(?P<email>.*)", # Public Interest Registry (.org), nic.pw
"Registrant ID:(?P<handle>.+)\nRegistrant Name:(?P<name>.*)\n(?:Registrant Organization:(?P<organization>.*)\n)?Registrant Street1?:(?P<street1>.*)\n(?:Registrant Street2:(?P<street2>.*)\n)?(?:Registrant Street3:(?P<street3>.*)\n)?Registrant City:(?P<city>.*)\nRegistrant State/Province:(?P<state>.*)\nRegistrant Postal Code:(?P<postalcode>.*)\nRegistrant Country:(?P<country>.*)\nRegistrant Phone:(?P<phone>.*)\n(?:Registrant Phone Ext.:(?P<phone_ext>.*)\n)?(?:Registrant FAX:(?P<fax>.*)\n)?(?:Registrant FAX Ext.:(?P<fax_ext>.*)\n)?Registrant Email:(?P<email>.*)", # Public Interest Registry (.org), nic.pw
"Registrant ID:(?P<handle>.+)\nRegistrant Name:(?P<name>.*)\n(?:Registrant Organization:(?P<organization>.*)\n)?Registrant Address1?:(?P<street1>.*)\n(?:Registrant Address2:(?P<street2>.*)\n)?(?:Registrant Address3:(?P<street3>.*)\n)?Registrant City:(?P<city>.*)\nRegistrant State/Province:(?P<state>.*)\nRegistrant Country/Economy:(?P<country>.*)\nRegistrant Postal Code:(?P<postalcode>.*)\nRegistrant Phone:(?P<phone>.*)\n(?:Registrant Phone Ext.:(?P<phone_ext>.*)\n)?(?:Registrant FAX:(?P<fax>.*)\n)?(?:Registrant FAX Ext.:(?P<fax_ext>.*)\n)?Registrant E-mail:(?P<email>.*)", # .ME
"Registrant ID:\s*(?P<handle>.+)\nRegistrant Name:\s*(?P<name>.+)\nRegistrant Organization:\s*(?P<organization>.*)\nRegistrant Address1:\s*(?P<street1>.+)\nRegistrant Address2:\s*(?P<street2>.*)\nRegistrant City:\s*(?P<city>.+)\nRegistrant State/Province:\s*(?P<state>.+)\nRegistrant Postal Code:\s*(?P<postalcode>.+)\nRegistrant Country:\s*(?P<country>.+)\nRegistrant Country Code:\s*(?P<country_code>.+)\nRegistrant Phone Number:\s*(?P<phone>.+)\nRegistrant Email:\s*(?P<email>.+)\n", # .CO Internet
"Registrant Contact: (?P<handle>.+)\nRegistrant Organization: (?P<organization>.+)\nRegistrant Name: (?P<name>.+)\nRegistrant Street: (?P<street>.+)\nRegistrant City: (?P<city>.+)\nRegistrant Postal Code: (?P<postalcode>.+)\nRegistrant State: (?P<state>.+)\nRegistrant Country: (?P<country>.+)\nRegistrant Phone: (?P<phone>.*)\nRegistrant Phone Ext: (?P<phone_ext>.*)\nRegistrant Fax: (?P<fax>.*)\nRegistrant Fax Ext: (?P<fax_ext>.*)\nRegistrant Email: (?P<email>.*)\n", # Key-Systems GmbH
"(?:Registrant ID:[ ]*(?P<handle>.*)\n)?Registrant Name:[ ]*(?P<name>.*)\n(?:Registrant Organization:[ ]*(?P<organization>.*)\n)?Registrant Street:[ ]*(?P<street1>.+)\n(?:Registrant Street:[ ]*(?P<street2>.+)\n)?Registrant City:[ ]*(?P<city>.+)\nRegistrant State\/Province:[ ]*(?P<state>.+)\nRegistrant Postal Code:[ ]*(?P<postalcode>.+)\nRegistrant Country:[ ]*(?P<country>.+)\n(?:Registrant Phone:[ ]*(?P<phone>.*)\n)?(?:Registrant Phone Ext:[ ]*(?P<phone_ext>.*)\n)?(?:Registrant Fax:[ ]*(?P<fax>.*)\n)?(?:Registrant Fax Ext:[ ]*(?P<fax_ext>.*)\n)?(?:Registrant Email:[ ]*(?P<email>.+)\n)?", # WildWestDomains, GoDaddy, Namecheap/eNom, Ascio, Musedoma (.museum)
@ -422,6 +424,7 @@ def parse_registrants(data):
"Registrant:[ ]*(?P<organization>.+)\n[\s\S]*Eligibility Type:[ ]*(Higher Education Institution|Company|Incorporated Association|Other)\n[\s\S]*Registrant Contact ID:[ ]*(?P<handle>.+)\n[\s\S]*Registrant Contact Name:[ ]*(?P<name>.+)\n", # .au educational, company, 'incorporated association' (non-profit?), other (spotted for linux.conf.au, unsure if also for others)
" Registrant:\n (?P<name>.+)\n\n Registrant type:\n .*\n\n Registrant's address:\n The registrant .* opted to have", # Nominet (.uk) with hidden address
" Registrant:\n (?P<name>.+)\n\n Registrant type:\n .*\n\n Registrant's address:\n (?P<street1>.+)\n (?P<street2>.+)\n (?P<street3>.+)\n (?P<city>.+)\n (?P<state>.+)\n (?P<postalcode>.+)\n (?P<country>.+)", # Nominet (.uk) with visible address
"owner:\s+(?P<name>.+)", # .br
"person:\s+(?P<name>.+)", # nic.ru (person)
"org:\s+(?P<organization>.+)", # nic.ru (organization)
]
@ -429,7 +432,8 @@ def parse_registrants(data):
tech_contact_regexes = [
" Technical Contact:[ ]*\n (?P<organization>.*)\n (?P<name>.*)\n (?P<street>.*)\n (?P<city>.*), (?P<state>.*) (?P<postalcode>.*)\n (?P<country>.*)\n(?: Phone: (?P<phone>.*)\n)? Email: (?P<email>.*)\n", # Corporate Domains, Inc.
"Technical Contact:\n (?P<name>.+)\n (?P<street1>.+)\n(?: (?P<street2>.*)\n)?(?: (?P<street3>.*)\n)? (?P<postalcode>.+), (?P<city>.+)\n (?P<country>.+)\n (?P<phone>.+)\n (?P<email>.+)\n\n", # OVH
"Tech ID:(?P<handle>.+)\nTech Name:(?P<name>.*)\n(:?Tech Organization:(?P<organization>.*)\n)?Tech Street1:(?P<street1>.*)\n(?:Tech Street2:(?P<street2>.*)\n)?(?:Tech Street3:(?P<street3>.*)\n)?Tech City:(?P<city>.*)\nTech State/Province:(?P<state>.*)\nTech Postal Code:(?P<postalcode>.*)\nTech Country:(?P<country>.*)\nTech Phone:(?P<phone>.*)\n(?:Tech Phone Ext.:(?P<phone_ext>.*)\n)?(?:Tech FAX:(?P<fax>.*)\n)?(?:Tech FAX Ext.:(?P<fax_ext>.*)\n)?Tech Email:(?P<email>.*)", # Public Interest Registry (.org), nic.pw
"Tech ID:(?P<handle>.+)\nTech Name:(?P<name>.*)\n(:?Tech Organization:(?P<organization>.*)\n)?Tech Street1?:(?P<street1>.*)\n(?:Tech Street2:(?P<street2>.*)\n)?(?:Tech Street3:(?P<street3>.*)\n)?Tech City:(?P<city>.*)\nTech State/Province:(?P<state>.*)\nTech Postal Code:(?P<postalcode>.*)\nTech Country:(?P<country>.*)\nTech Phone:(?P<phone>.*)\n(?:Tech Phone Ext.:(?P<phone_ext>.*)\n)?(?:Tech FAX:(?P<fax>.*)\n)?(?:Tech FAX Ext.:(?P<fax_ext>.*)\n)?Tech Email:(?P<email>.*)", # Public Interest Registry (.org), nic.pw
"Tech ID:(?P<handle>.+)\nTech Name:(?P<name>.*)\n(?:Tech Organization:(?P<organization>.*)\n)?Tech Address1?:(?P<street1>.*)\n(?:Tech Address2:(?P<street2>.*)\n)?(?:Tech Address3:(?P<street3>.*)\n)?Tech City:(?P<city>.*)\nTech State/Province:(?P<state>.*)\nTech Country/Economy:(?P<country>.*)\nTech Postal Code:(?P<postalcode>.*)\nTech Phone:(?P<phone>.*)\n(?:Tech Phone Ext.:(?P<phone_ext>.*)\n)?(?:Tech FAX:(?P<fax>.*)\n)?(?:Tech FAX Ext.:(?P<fax_ext>.*)\n)?Tech E-mail:(?P<email>.*)", # .ME
"Technical Contact ID:\s*(?P<handle>.+)\nTechnical Contact Name:\s*(?P<name>.+)\nTechnical Contact Organization:\s*(?P<organization>.*)\nTechnical Contact Address1:\s*(?P<street1>.+)\nTechnical Contact Address2:\s*(?P<street2>.*)\nTechnical Contact City:\s*(?P<city>.+)\nTechnical Contact State/Province:\s*(?P<state>.+)\nTechnical Contact Postal Code:\s*(?P<postalcode>.+)\nTechnical Contact Country:\s*(?P<country>.+)\nTechnical Contact Country Code:\s*(?P<country_code>.+)\nTechnical Contact Phone Number:\s*(?P<phone>.+)\nTechnical Contact Email:\s*(?P<email>.+)\n", # .CO Internet
"Tech Contact: (?P<handle>.+)\nTech Organization: (?P<organization>.+)\nTech Name: (?P<name>.+)\nTech Street: (?P<street>.+)\nTech City: (?P<city>.+)\nTech Postal Code: (?P<postalcode>.+)\nTech State: (?P<state>.+)\nTech Country: (?P<country>.+)\nTech Phone: (?P<phone>.*)\nTech Phone Ext: (?P<phone_ext>.*)\nTech Fax: (?P<fax>.*)\nTech Fax Ext: (?P<fax_ext>.*)\nTech Email: (?P<email>.*)\n", # Key-Systems GmbH
"(?:Tech ID:[ ]*(?P<handle>.*)\n)?Tech[ ]*Name:[ ]*(?P<name>.*)\n(?:Tech[ ]*Organization:[ ]*(?P<organization>.*)\n)?Tech[ ]*Street:[ ]*(?P<street1>.+)\n(?:Tech[ ]*Street:[ ]*(?P<street2>.+)\n)?Tech[ ]*City:[ ]*(?P<city>.+)\nTech[ ]*State\/Province:[ ]*(?P<state>.+)\nTech[ ]*Postal[ ]*Code:[ ]*(?P<postalcode>.+)\nTech[ ]*Country:[ ]*(?P<country>.+)\n(?:Tech[ ]*Phone:[ ]*(?P<phone>.*)\n)?(?:Tech[ ]*Phone[ ]*Ext:[ ]*(?P<phone_ext>.*)\n)?(?:Tech[ ]*Fax:[ ]*(?P<fax>.*)\n)?(?:Tech[ ]*Fax[ ]*Ext:\s*?(?P<fax_ext>.*)\n)?(?:Tech[ ]*Email:[ ]*(?P<email>.+)\n)?", # WildWestDomains, GoDaddy, Namecheap/eNom, Ascio, Musedoma (.museum)
@ -445,7 +449,8 @@ def parse_registrants(data):
admin_contact_regexes = [
" Administrative Contact:[ ]*\n (?P<organization>.*)\n (?P<name>.*)\n (?P<street>.*)\n (?P<city>.*), (?P<state>.*) (?P<postalcode>.*)\n (?P<country>.*)\n(?: Phone: (?P<phone>.*)\n)? Email: (?P<email>.*)\n", # Corporate Domains, Inc.
"Administrative Contact:\n (?P<name>.+)\n (?P<street1>.+)\n(?: (?P<street2>.*)\n)?(?: (?P<street3>.*)\n)? (?P<postalcode>.+), (?P<city>.+)\n (?P<country>.+)\n (?P<phone>.+)\n (?P<email>.+)\n\n", # OVH
"Admin ID:(?P<handle>.+)\nAdmin Name:(?P<name>.*)\n(?:Admin Organization:(?P<organization>.*)\n)?Admin Street1:(?P<street1>.*)\n(?:Admin Street2:(?P<street2>.*)\n)?(?:Admin Street3:(?P<street3>.*)\n)?Admin City:(?P<city>.*)\nAdmin State/Province:(?P<state>.*)\nAdmin Postal Code:(?P<postalcode>.*)\nAdmin Country:(?P<country>.*)\nAdmin Phone:(?P<phone>.*)\n(?:Admin Phone Ext.:(?P<phone_ext>.*)\n)?(?:Admin FAX:(?P<fax>.*)\n)?(?:Admin FAX Ext.:(?P<fax_ext>.*)\n)?Admin Email:(?P<email>.*)", # Public Interest Registry (.org), nic.pw
"Admin ID:(?P<handle>.+)\nAdmin Name:(?P<name>.*)\n(?:Admin Organization:(?P<organization>.*)\n)?Admin Street1?:(?P<street1>.*)\n(?:Admin Street2:(?P<street2>.*)\n)?(?:Admin Street3:(?P<street3>.*)\n)?Admin City:(?P<city>.*)\nAdmin State/Province:(?P<state>.*)\nAdmin Postal Code:(?P<postalcode>.*)\nAdmin Country:(?P<country>.*)\nAdmin Phone:(?P<phone>.*)\n(?:Admin Phone Ext.:(?P<phone_ext>.*)\n)?(?:Admin FAX:(?P<fax>.*)\n)?(?:Admin FAX Ext.:(?P<fax_ext>.*)\n)?Admin Email:(?P<email>.*)", # Public Interest Registry (.org), nic.pw
"Admin ID:(?P<handle>.+)\nAdmin Name:(?P<name>.*)\n(?:Admin Organization:(?P<organization>.*)\n)?Admin Address1?:(?P<street1>.*)\n(?:Admin Address2:(?P<street2>.*)\n)?(?:Admin Address3:(?P<street3>.*)\n)?Admin City:(?P<city>.*)\nAdmin State/Province:(?P<state>.*)\nAdmin Country/Economy:(?P<country>.*)\nAdmin Postal Code:(?P<postalcode>.*)\nAdmin Phone:(?P<phone>.*)\n(?:Admin Phone Ext.:(?P<phone_ext>.*)\n)?(?:Admin FAX:(?P<fax>.*)\n)?(?:Admin FAX Ext.:(?P<fax_ext>.*)\n)?Admin E-mail:(?P<email>.*)", # .ME
"Administrative Contact ID:\s*(?P<handle>.+)\nAdministrative Contact Name:\s*(?P<name>.+)\nAdministrative Contact Organization:\s*(?P<organization>.*)\nAdministrative Contact Address1:\s*(?P<street1>.+)\nAdministrative Contact Address2:\s*(?P<street2>.*)\nAdministrative Contact City:\s*(?P<city>.+)\nAdministrative Contact State/Province:\s*(?P<state>.+)\nAdministrative Contact Postal Code:\s*(?P<postalcode>.+)\nAdministrative Contact Country:\s*(?P<country>.+)\nAdministrative Contact Country Code:\s*(?P<country_code>.+)\nAdministrative Contact Phone Number:\s*(?P<phone>.+)\nAdministrative Contact Email:\s*(?P<email>.+)\n", # .CO Internet
"Admin Contact: (?P<handle>.+)\nAdmin Organization: (?P<organization>.+)\nAdmin Name: (?P<name>.+)\nAdmin Street: (?P<street>.+)\nAdmin City: (?P<city>.+)\nAdmin State: (?P<state>.+)\nAdmin Postal Code: (?P<postalcode>.+)\nAdmin Country: (?P<country>.+)\nAdmin Phone: (?P<phone>.*)\nAdmin Phone Ext: (?P<phone_ext>.*)\nAdmin Fax: (?P<fax>.*)\nAdmin Fax Ext: (?P<fax_ext>.*)\nAdmin Email: (?P<email>.*)\n", # Key-Systems GmbH
"(?:Admin ID:[ ]*(?P<handle>.*)\n)?Admin[ ]*Name:[ ]*(?P<name>.*)\n(?:Admin[ ]*Organization:[ ]*(?P<organization>.*)\n)?Admin[ ]*Street:[ ]*(?P<street1>.+)\n(?:Admin[ ]*Street:[ ]*(?P<street2>.+)\n)?Admin[ ]*City:[ ]*(?P<city>.+)\nAdmin[ ]*State\/Province:[ ]*(?P<state>.+)\nAdmin[ ]*Postal[ ]*Code:[ ]*(?P<postalcode>.+)\nAdmin[ ]*Country:[ ]*(?P<country>.+)\n(?:Admin[ ]*Phone:[ ]*(?P<phone>.*)\n)?(?:Admin[ ]*Phone[ ]*Ext:[ ]*(?P<phone_ext>.*)\n)?(?:Admin[ ]*Fax:[ ]*(?P<fax>.*)\n)?(?:Admin[ ]*Fax[ ]*Ext:\s*?(?P<fax_ext>.*)\n)?(?:Admin[ ]*Email:[ ]*(?P<email>.+)\n)?", # WildWestDomains, GoDaddy, Namecheap/eNom, Ascio, Musedoma (.museum)
@ -470,7 +475,7 @@ def parse_registrants(data):
# Some registries use NIC handle references instead of directly listing contacts...
nic_contact_regexes = [
"personname:\s*(?P<name>.+)\norganization:\s*(?P<organization>.+)\nstreet address:\s*(?P<street>.+)\npostal code:\s*(?P<postalcode>.+)\ncity:\s*(?P<city>.+)\ncountry:\s*(?P<country>.+)\nphone:\s*(?P<phone>.+)\nfax-no:\s*(?P<fax>.+)\ne-mail:\s*(?P<email>.+)\nnic-hdl:\s*(?P<handle>.+)\nchanged:\s*(?P<changedate>.+)", # nic.at
"personname:\s*(?P<name>.+)\norganization:\s*(?P<organization>.+)\nstreet address:\s*(?P<street>.+)\npostal code:\s*(?P<postalcode>.+)\ncity:\s*(?P<city>.+)\ncountry:\s*(?P<country>.+)\n(?:phone:\s*(?P<phone>.+)\n)?(?:fax-no:\s*(?P<fax>.+)\n)?(?:e-mail:\s*(?P<email>.+)\n)?nic-hdl:\s*(?P<handle>.+)\nchanged:\s*(?P<changedate>.+)", # nic.at
"nic-hdl:\s*(?P<handle>.+)\ntype:\s*(?P<type>.+)\ncontact:\s*(?P<name>.+)\n(?:.+\n)*?(?:address:\s*(?P<street1>.+)\naddress:\s*(?P<street2>.+)\naddress:\s*(?P<street3>.+)\naddress:\s*(?P<country>.+)\n)?(?:phone:\s*(?P<phone>.+)\n)?(?:fax-no:\s*(?P<fax>.+)\n)?(?:.+\n)*?(?:e-mail:\s*(?P<email>.+)\n)?(?:.+\n)*?changed:\s*(?P<changedate>[0-9]{2}\/[0-9]{2}\/[0-9]{4}).*\n", # AFNIC madness without country field
"nic-hdl:\s*(?P<handle>.+)\ntype:\s*(?P<type>.+)\ncontact:\s*(?P<name>.+)\n(?:.+\n)*?(?:address:\s*(?P<street1>.+)\n)?(?:address:\s*(?P<street2>.+)\n)?(?:address:\s*(?P<street3>.+)\n)?(?:phone:\s*(?P<phone>.+)\n)?(?:fax-no:\s*(?P<fax>.+)\n)?(?:.+\n)*?(?:e-mail:\s*(?P<email>.+)\n)?(?:.+\n)*?changed:\s*(?P<changedate>[0-9]{2}\/[0-9]{2}\/[0-9]{4}).*\n", # AFNIC madness any country -at all-
"nic-hdl:\s*(?P<handle>.+)\ntype:\s*(?P<type>.+)\ncontact:\s*(?P<name>.+)\n(?:.+\n)*?(?:address:\s*(?P<street1>.+)\n)?(?:address:\s*(?P<street2>.+)\n)?(?:address:\s*(?P<street3>.+)\n)?(?:address:\s*(?P<street4>.+)\n)?country:\s*(?P<country>.+)\n(?:phone:\s*(?P<phone>.+)\n)?(?:fax-no:\s*(?P<fax>.+)\n)?(?:.+\n)*?(?:e-mail:\s*(?P<email>.+)\n)?(?:.+\n)*?changed:\s*(?P<changedate>[0-9]{2}\/[0-9]{2}\/[0-9]{4}).*\n", # AFNIC madness with country field

@ -1,7 +1,7 @@
from setuptools import setup
setup(name='pythonwhois',
version='2.0.3',
version='2.0.4',
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',

@ -11,12 +11,31 @@ OK = '\033[92m'
FAIL = '\033[91m'
ENDC = '\033[0m'
def encoded_json_dumps(obj):
try:
return json.dumps(obj, default=json_fallback)
except UnicodeDecodeError, e:
return json.dumps(recursive_encode(obj, "latin-1"), default=json_fallback)
def json_fallback(obj):
if isinstance(obj, datetime.datetime):
return obj.isoformat()
else:
return obj
def recursive_encode(obj, encoding):
for key in obj.keys():
if isinstance(obj[key], dict):
obj[key] = recursive_encode(obj[key], encoding)
elif isinstance(obj[key], list):
obj[key] = [x.decode(encoding) for x in obj[key]]
else:
try:
obj[key] = obj[key].decode(encoding)
except:
pass
return obj
def recursive_compare(obj1, obj2, chain=[]):
errors = []
chain_name = " -> ".join(chain)
@ -84,7 +103,7 @@ if args.mode[0] == "run":
for target, data, target_default, target_normalized in suites:
for normalization in (True, []):
parsed = pythonwhois.parse.parse_raw_whois(data, normalized=normalization)
parsed = json.loads(json.dumps(parsed, default=json_fallback)) # Stupid Unicode hack
parsed = json.loads(encoded_json_dumps(parsed)) # Stupid Unicode hack
if normalization == True:
target_data = json.loads(target_normalized)
@ -148,7 +167,7 @@ elif args.mode[0] == "update":
default = pythonwhois.parse.parse_raw_whois(data)
normalized = pythonwhois.parse.parse_raw_whois(data, normalized=True)
with open(os.path.join("test/target_default", target), "w") as f:
f.write(json.dumps(default, default=json_fallback))
f.write(encoded_json_dumps(default))
with open(os.path.join("test/target_normalized", target), "w") as f:
f.write(json.dumps(normalized, default=json_fallback))
f.write(encoded_json_dumps(normalized))
print "Generated target data for %s." % target

@ -0,0 +1,48 @@
% 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: byme.at
registrant: NS3437599-NICAT
admin-c: NS3437599-NICAT
tech-c: NS3437599-NICAT
nserver: ns1.xname.org
nserver: ns2.he.net
nserver: ns2.xname.org
nserver: ns4.he.net
nserver: ns6.gandi.net
changed: 20120121 04:01:40
source: AT-DOM
personname: Nicolas Sapa
organization:
street address: 3 montee de la cabrette Les terrasses des oliviers
postal code: 13800
city: istres
country: France
phone: +33628033698
e-mail: 51cc9e302f60fe7d236250606d2e627d-823195@contact.gandi.net
nic-hdl: NS3437599-NICAT
changed: 20090831 23:08:43
source: AT-DOM

@ -0,0 +1,89 @@
WHOIS TERMS & CONDITIONS: Access to .ME WHOIS information is provided to
assist persons in determining the contents of a domain name registration
record in the .ME registry database. The data in this record is provided by
.ME Registry for informational purposes only, and .ME 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,
facsimile, or other electronic processes 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,
except as reasonably necessary to register domain names or modify existing
registrations. All rights reserved. .ME Registry reserves the right to modify
these terms at any time. By submitting this query, you agree to abide by this
policy.
Domain ID:D6684477-ME
Domain Name:DEFUNCTKERNEL.ME
Domain Create Date:18-Dec-2012 00:52:32 UTC
Domain Last Updated Date:03-May-2013 20:53:09 UTC
Domain Expiration Date:18-Dec-2013 00:52:32 UTC
Last Transferred Date:
Sponsoring Registrar:Dynadot LLC R30-ME
Created by:Dynadot LLC R30-ME
Last Updated by Registrar:Dynadot LLC R30-ME
Domain Status:CLIENT TRANSFER PROHIBITED
Registrant ID:CP-157087
Registrant Name:Reg 11 c/o Dynadot Privacy
Registrant Organization:
Registrant Address:PO Box 701
Registrant Address2:
Registrant Address3:
Registrant City:San Mateo
Registrant State/Province:CA
Registrant Country/Economy:US
Registrant Postal Code:94401
Registrant Phone:+1.6505854708
Registrant Phone Ext.:
Registrant FAX:
Registrant FAX Ext.:
Registrant E-mail:privacy@dynadot.com
Admin ID:CP-157087
Admin Name:Reg 11 c/o Dynadot Privacy
Admin Organization:
Admin Address:PO Box 701
Admin Address2:
Admin Address3:
Admin City:San Mateo
Admin State/Province:CA
Admin Country/Economy:US
Admin Postal Code:94401
Admin Phone:+1.6505854708
Admin Phone Ext.:
Admin FAX:
Admin FAX Ext.:
Admin E-mail:privacy@dynadot.com
Tech ID:CP-157087
Tech Name:Reg 11 c/o Dynadot Privacy
Tech Organization:
Tech Address:PO Box 701
Tech Address2:
Tech Address3:
Tech City:San Mateo
Tech State/Province:CA
Tech Country/Economy:US
Tech Postal Code:94401
Tech Phone:+1.6505854708
Tech Phone Ext.:
Tech FAX:
Tech FAX Ext.:
Tech E-mail:privacy@dynadot.com
Nameservers:NS4.HE.NET
Nameservers:NS5.HE.NET
Nameservers:
Nameservers:
Nameservers:
Nameservers:
Nameservers:
Nameservers:
Nameservers:
Nameservers:
Nameservers:
Nameservers:
Nameservers:
DNSSEC:Unsigned

@ -0,0 +1,24 @@
% Copyright (c) Nic.br
% The use of the data below is only permitted as described in
% full by the terms of use (http://registro.br/termo/en.html),
% being prohibited its distribution, comercialization or
% reproduction, in particular, to use it for advertising or
% any similar purpose.
% 2013-11-24 15:50:16 (BRST -02:00)
% Query rate limit exceeded. Reduced information.
% Use https://registro.br/cgi-bin/avail/ for domain availability.
domain: ufpa.br
owner: Universidade Federal do Pará (19057)
% Security and mail abuse issues should also be addressed to
% cert.br, http://www.cert.br/, respectivelly to cert@cert.br
% and mail-abuse@cert.br
%
% whois.registro.br accepts only direct match queries. Types
% of queries are: domain (.br), registrant (tax ID), ticket,
% provider, contact handle (ID), CIDR block, IP and ASN.

@ -0,0 +1 @@
{"updated_date": ["2012-01-21T04:01:40", "2009-08-31T23:08:43"], "nameservers": ["ns1.xname.org", "ns2.he.net", "ns2.xname.org", "ns4.he.net", "ns6.gandi.net"], "raw": ["% Copyright (c)2013 by NIC.AT (1) \n%\n% Restricted rights.\n%\n% Except for agreed Internet operational purposes, no part of this\n% information may be reproduced, stored in a retrieval system, or\n% transmitted, in any form or by any means, electronic, mechanical,\n% recording, or otherwise, without prior permission of NIC.AT on behalf\n% of itself and/or the copyright holders. Any use of this material to\n% target advertising or similar activities is explicitly forbidden and\n% can be prosecuted.\n%\n% It is furthermore strictly forbidden to use the Whois-Database in such\n% a way that jeopardizes or could jeopardize the stability of the\n% technical systems of NIC.AT under any circumstances. In particular,\n% this includes any misuse of the Whois-Database and any use of the\n% Whois-Database which disturbs its operation.\n%\n% Should the user violate these points, NIC.AT reserves the right to\n% deactivate the Whois-Database entirely or partly for the user.\n% Moreover, the user shall be held liable for any and all damage\n% arising from a violation of these points.\n\ndomain: byme.at\nregistrant: NS3437599-NICAT\nadmin-c: NS3437599-NICAT\ntech-c: NS3437599-NICAT\nnserver: ns1.xname.org\nnserver: ns2.he.net\nnserver: ns2.xname.org\nnserver: ns4.he.net\nnserver: ns6.gandi.net\nchanged: 20120121 04:01:40\nsource: AT-DOM\n\npersonname: Nicolas Sapa\norganization: \nstreet address: 3 montee de la cabrette Les terrasses des oliviers\npostal code: 13800\ncity: istres\ncountry: France\nphone: +33628033698\ne-mail: 51cc9e302f60fe7d236250606d2e627d-823195@contact.gandi.net\nnic-hdl: NS3437599-NICAT\nchanged: 20090831 23:08:43\nsource: AT-DOM\n\n\n"], "contacts": {"admin": {"city": "istres", "handle": "NS3437599-NICAT", "name": "Nicolas Sapa", "country": "France", "phone": "+33628033698", "street": "3 montee de la cabrette Les terrasses des oliviers", "postalcode": "13800", "email": "51cc9e302f60fe7d236250606d2e627d-823195@contact.gandi.net", "changedate": "2009-08-31T23:08:43"}, "tech": {"city": "istres", "handle": "NS3437599-NICAT", "name": "Nicolas Sapa", "country": "France", "phone": "+33628033698", "street": "3 montee de la cabrette Les terrasses des oliviers", "postalcode": "13800", "email": "51cc9e302f60fe7d236250606d2e627d-823195@contact.gandi.net", "changedate": "2009-08-31T23:08:43"}, "registrant": {"city": "istres", "handle": "NS3437599-NICAT", "name": "Nicolas Sapa", "country": "France", "phone": "+33628033698", "street": "3 montee de la cabrette Les terrasses des oliviers", "postalcode": "13800", "email": "51cc9e302f60fe7d236250606d2e627d-823195@contact.gandi.net", "changedate": "2009-08-31T23:08:43"}, "billing": null}}

@ -0,0 +1 @@
{"status": ["CLIENT TRANSFER PROHIBITED"], "updated_date": ["2013-05-03T20:53:09"], "contacts": {"admin": {"city": "San Mateo", "handle": "CP-157087", "name": "Reg 11 c/o Dynadot Privacy", "state": "CA", "phone": "+1.6505854708", "street": "PO Box 701", "country": "US", "postalcode": "94401", "email": "privacy@dynadot.com"}, "tech": {"city": "San Mateo", "handle": "CP-157087", "name": "Reg 11 c/o Dynadot Privacy", "state": "CA", "phone": "+1.6505854708", "street": "PO Box 701", "country": "US", "postalcode": "94401", "email": "privacy@dynadot.com"}, "registrant": {"city": "San Mateo", "handle": "CP-157087", "name": "Reg 11 c/o Dynadot Privacy", "state": "CA", "phone": "+1.6505854708", "street": "PO Box 701", "country": "US", "postalcode": "94401", "email": "privacy@dynadot.com"}, "billing": null}, "nameservers": ["NS4.HE.NET", "NS5.HE.NET"], "expiration_date": ["2013-12-18T00:52:32"], "raw": ["WHOIS TERMS & CONDITIONS: Access to .ME WHOIS information is provided to \nassist persons in determining the contents of a domain name registration \nrecord in the .ME registry database. The data in this record is provided by \n.ME Registry for informational purposes only, and .ME Registry does not \nguarantee its accuracy. This service is intended only for query-based \naccess. You agree that you will use this data only for lawful purposes \nand that, under no circumstances will you use this data to: (a) allow, \nenable, or otherwise support the transmission by e-mail, telephone, \nfacsimile, or other electronic processes of mass unsolicited, commercial \nadvertising or solicitations to entities other than the data recipient's own \nexisting customers; or (b) enable high volume, automated, electronic \nprocesses that send queries or data to the systems of Registry Operator, \nexcept as reasonably necessary to register domain names or modify existing \nregistrations. All rights reserved. .ME Registry reserves the right to modify \nthese terms at any time. By submitting this query, you agree to abide by this \npolicy.\n\nDomain ID:D6684477-ME\nDomain Name:DEFUNCTKERNEL.ME\nDomain Create Date:18-Dec-2012 00:52:32 UTC\nDomain Last Updated Date:03-May-2013 20:53:09 UTC\nDomain Expiration Date:18-Dec-2013 00:52:32 UTC\nLast Transferred Date:\nSponsoring Registrar:Dynadot LLC R30-ME\nCreated by:Dynadot LLC R30-ME\nLast Updated by Registrar:Dynadot LLC R30-ME\nDomain Status:CLIENT TRANSFER PROHIBITED\nRegistrant ID:CP-157087\nRegistrant Name:Reg 11 c/o Dynadot Privacy\nRegistrant Organization:\nRegistrant Address:PO Box 701\nRegistrant Address2:\nRegistrant Address3:\nRegistrant City:San Mateo\nRegistrant State/Province:CA\nRegistrant Country/Economy:US\nRegistrant Postal Code:94401\nRegistrant Phone:+1.6505854708\nRegistrant Phone Ext.:\nRegistrant FAX:\nRegistrant FAX Ext.:\nRegistrant E-mail:privacy@dynadot.com\nAdmin ID:CP-157087\nAdmin Name:Reg 11 c/o Dynadot Privacy\nAdmin Organization:\nAdmin Address:PO Box 701\nAdmin Address2:\nAdmin Address3:\nAdmin City:San Mateo\nAdmin State/Province:CA\nAdmin Country/Economy:US\nAdmin Postal Code:94401\nAdmin Phone:+1.6505854708\nAdmin Phone Ext.:\nAdmin FAX:\nAdmin FAX Ext.:\nAdmin E-mail:privacy@dynadot.com\nTech ID:CP-157087\nTech Name:Reg 11 c/o Dynadot Privacy\nTech Organization:\nTech Address:PO Box 701\nTech Address2:\nTech Address3:\nTech City:San Mateo\nTech State/Province:CA\nTech Country/Economy:US\nTech Postal Code:94401\nTech Phone:+1.6505854708\nTech Phone Ext.:\nTech FAX:\nTech FAX Ext.:\nTech E-mail:privacy@dynadot.com\nNameservers:NS4.HE.NET\nNameservers:NS5.HE.NET\nNameservers: \nNameservers: \nNameservers: \nNameservers: \nNameservers: \nNameservers: \nNameservers: \nNameservers: \nNameservers: \nNameservers: \nNameservers: \nDNSSEC:Unsigned\n\n\n\n"], "registrar": ["Dynadot LLC R30-ME"], "creation_date": ["2012-12-18T00:52:32", "2012-12-18T00:52:32"], "id": ["D6684477-ME"]}

@ -0,0 +1 @@
{"raw": ["\n% Copyright (c) Nic.br\n% The use of the data below is only permitted as described in\n% full by the terms of use (http://registro.br/termo/en.html),\n% being prohibited its distribution, comercialization or\n% reproduction, in particular, to use it for advertising or\n% any similar purpose.\n% 2013-11-24 15:50:16 (BRST -02:00)\n\n% Query rate limit exceeded. Reduced information.\n% Use https://registro.br/cgi-bin/avail/ for domain availability.\n\ndomain: ufpa.br\nowner: Universidade Federal do Par\u00e1 (19057)\n\n% Security and mail abuse issues should also be addressed to\n% cert.br, http://www.cert.br/, respectivelly to cert@cert.br\n% and mail-abuse@cert.br\n%\n% whois.registro.br accepts only direct match queries. Types\n% of queries are: domain (.br), registrant (tax ID), ticket,\n% provider, contact handle (ID), CIDR block, IP and ASN.\n\n\n"], "emails": ["cert@cert.br", "mail-abuse@cert.br"], "contacts": {"admin": null, "tech": null, "registrant": {"name": "Universidade Federal do Par\u00e1 (19057)"}, "billing": null}}

@ -0,0 +1 @@
{"updated_date": ["2012-01-21T04:01:40", "2009-08-31T23:08:43"], "nameservers": ["ns1.xname.org", "ns2.he.net", "ns2.xname.org", "ns4.he.net", "ns6.gandi.net"], "raw": ["% Copyright (c)2013 by NIC.AT (1) \n%\n% Restricted rights.\n%\n% Except for agreed Internet operational purposes, no part of this\n% information may be reproduced, stored in a retrieval system, or\n% transmitted, in any form or by any means, electronic, mechanical,\n% recording, or otherwise, without prior permission of NIC.AT on behalf\n% of itself and/or the copyright holders. Any use of this material to\n% target advertising or similar activities is explicitly forbidden and\n% can be prosecuted.\n%\n% It is furthermore strictly forbidden to use the Whois-Database in such\n% a way that jeopardizes or could jeopardize the stability of the\n% technical systems of NIC.AT under any circumstances. In particular,\n% this includes any misuse of the Whois-Database and any use of the\n% Whois-Database which disturbs its operation.\n%\n% Should the user violate these points, NIC.AT reserves the right to\n% deactivate the Whois-Database entirely or partly for the user.\n% Moreover, the user shall be held liable for any and all damage\n% arising from a violation of these points.\n\ndomain: byme.at\nregistrant: NS3437599-NICAT\nadmin-c: NS3437599-NICAT\ntech-c: NS3437599-NICAT\nnserver: ns1.xname.org\nnserver: ns2.he.net\nnserver: ns2.xname.org\nnserver: ns4.he.net\nnserver: ns6.gandi.net\nchanged: 20120121 04:01:40\nsource: AT-DOM\n\npersonname: Nicolas Sapa\norganization: \nstreet address: 3 montee de la cabrette Les terrasses des oliviers\npostal code: 13800\ncity: istres\ncountry: France\nphone: +33628033698\ne-mail: 51cc9e302f60fe7d236250606d2e627d-823195@contact.gandi.net\nnic-hdl: NS3437599-NICAT\nchanged: 20090831 23:08:43\nsource: AT-DOM\n\n\n"], "contacts": {"admin": {"city": "Istres", "handle": "NS3437599-NICAT", "name": "Nicolas Sapa", "country": "France", "phone": "+33628033698", "street": "3 montee de la cabrette Les terrasses des oliviers", "postalcode": "13800", "email": "51cc9e302f60fe7d236250606d2e627d-823195@contact.gandi.net", "changedate": "2009-08-31T23:08:43"}, "tech": {"city": "Istres", "handle": "NS3437599-NICAT", "name": "Nicolas Sapa", "country": "France", "phone": "+33628033698", "street": "3 montee de la cabrette Les terrasses des oliviers", "postalcode": "13800", "email": "51cc9e302f60fe7d236250606d2e627d-823195@contact.gandi.net", "changedate": "2009-08-31T23:08:43"}, "registrant": {"city": "Istres", "handle": "NS3437599-NICAT", "name": "Nicolas Sapa", "country": "France", "phone": "+33628033698", "street": "3 montee de la cabrette Les terrasses des oliviers", "postalcode": "13800", "email": "51cc9e302f60fe7d236250606d2e627d-823195@contact.gandi.net", "changedate": "2009-08-31T23:08:43"}, "billing": null}}

@ -0,0 +1 @@
{"status": ["Client Transfer Prohibited"], "updated_date": ["2013-05-03T20:53:09"], "contacts": {"admin": {"city": "San Mateo", "handle": "CP-157087", "name": "Reg 11 c/o Dynadot Privacy", "state": "CA", "phone": "+1.6505854708", "street": "PO Box 701", "country": "US", "postalcode": "94401", "email": "privacy@dynadot.com"}, "tech": {"city": "San Mateo", "handle": "CP-157087", "name": "Reg 11 c/o Dynadot Privacy", "state": "CA", "phone": "+1.6505854708", "street": "PO Box 701", "country": "US", "postalcode": "94401", "email": "privacy@dynadot.com"}, "registrant": {"city": "San Mateo", "handle": "CP-157087", "name": "Reg 11 c/o Dynadot Privacy", "state": "CA", "phone": "+1.6505854708", "street": "PO Box 701", "country": "US", "postalcode": "94401", "email": "privacy@dynadot.com"}, "billing": null}, "nameservers": ["ns4.he.net", "ns5.he.net"], "expiration_date": ["2013-12-18T00:52:32"], "raw": ["WHOIS TERMS & CONDITIONS: Access to .ME WHOIS information is provided to \nassist persons in determining the contents of a domain name registration \nrecord in the .ME registry database. The data in this record is provided by \n.ME Registry for informational purposes only, and .ME Registry does not \nguarantee its accuracy. This service is intended only for query-based \naccess. You agree that you will use this data only for lawful purposes \nand that, under no circumstances will you use this data to: (a) allow, \nenable, or otherwise support the transmission by e-mail, telephone, \nfacsimile, or other electronic processes of mass unsolicited, commercial \nadvertising or solicitations to entities other than the data recipient's own \nexisting customers; or (b) enable high volume, automated, electronic \nprocesses that send queries or data to the systems of Registry Operator, \nexcept as reasonably necessary to register domain names or modify existing \nregistrations. All rights reserved. .ME Registry reserves the right to modify \nthese terms at any time. By submitting this query, you agree to abide by this \npolicy.\n\nDomain ID:D6684477-ME\nDomain Name:DEFUNCTKERNEL.ME\nDomain Create Date:18-Dec-2012 00:52:32 UTC\nDomain Last Updated Date:03-May-2013 20:53:09 UTC\nDomain Expiration Date:18-Dec-2013 00:52:32 UTC\nLast Transferred Date:\nSponsoring Registrar:Dynadot LLC R30-ME\nCreated by:Dynadot LLC R30-ME\nLast Updated by Registrar:Dynadot LLC R30-ME\nDomain Status:CLIENT TRANSFER PROHIBITED\nRegistrant ID:CP-157087\nRegistrant Name:Reg 11 c/o Dynadot Privacy\nRegistrant Organization:\nRegistrant Address:PO Box 701\nRegistrant Address2:\nRegistrant Address3:\nRegistrant City:San Mateo\nRegistrant State/Province:CA\nRegistrant Country/Economy:US\nRegistrant Postal Code:94401\nRegistrant Phone:+1.6505854708\nRegistrant Phone Ext.:\nRegistrant FAX:\nRegistrant FAX Ext.:\nRegistrant E-mail:privacy@dynadot.com\nAdmin ID:CP-157087\nAdmin Name:Reg 11 c/o Dynadot Privacy\nAdmin Organization:\nAdmin Address:PO Box 701\nAdmin Address2:\nAdmin Address3:\nAdmin City:San Mateo\nAdmin State/Province:CA\nAdmin Country/Economy:US\nAdmin Postal Code:94401\nAdmin Phone:+1.6505854708\nAdmin Phone Ext.:\nAdmin FAX:\nAdmin FAX Ext.:\nAdmin E-mail:privacy@dynadot.com\nTech ID:CP-157087\nTech Name:Reg 11 c/o Dynadot Privacy\nTech Organization:\nTech Address:PO Box 701\nTech Address2:\nTech Address3:\nTech City:San Mateo\nTech State/Province:CA\nTech Country/Economy:US\nTech Postal Code:94401\nTech Phone:+1.6505854708\nTech Phone Ext.:\nTech FAX:\nTech FAX Ext.:\nTech E-mail:privacy@dynadot.com\nNameservers:NS4.HE.NET\nNameservers:NS5.HE.NET\nNameservers: \nNameservers: \nNameservers: \nNameservers: \nNameservers: \nNameservers: \nNameservers: \nNameservers: \nNameservers: \nNameservers: \nNameservers: \nDNSSEC:Unsigned\n\n\n\n"], "registrar": ["Dynadot LLC R30-ME"], "creation_date": ["2012-12-18T00:52:32", "2012-12-18T00:52:32"], "id": ["D6684477-ME"]}

@ -0,0 +1 @@
{"raw": ["\n% Copyright (c) Nic.br\n% The use of the data below is only permitted as described in\n% full by the terms of use (http://registro.br/termo/en.html),\n% being prohibited its distribution, comercialization or\n% reproduction, in particular, to use it for advertising or\n% any similar purpose.\n% 2013-11-24 15:50:16 (BRST -02:00)\n\n% Query rate limit exceeded. Reduced information.\n% Use https://registro.br/cgi-bin/avail/ for domain availability.\n\ndomain: ufpa.br\nowner: Universidade Federal do Par\u00e1 (19057)\n\n% Security and mail abuse issues should also be addressed to\n% cert.br, http://www.cert.br/, respectivelly to cert@cert.br\n% and mail-abuse@cert.br\n%\n% whois.registro.br accepts only direct match queries. Types\n% of queries are: domain (.br), registrant (tax ID), ticket,\n% provider, contact handle (ID), CIDR block, IP and ASN.\n\n\n"], "emails": ["cert@cert.br", "mail-abuse@cert.br"], "contacts": {"admin": null, "tech": null, "registrant": {"name": "Universidade Federal do Par\u00e1 (19057)"}, "billing": null}}
Loading…
Cancel
Save