Bunch of fixes

master
Sven Slootweg 11 years ago
parent 0668eafcc0
commit fc828dbe38

@ -45,6 +45,8 @@ If any of those apply, don't hesitate to file an issue! The goal is 100% coverag
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.
All commands are relative to the root directory of the repository.
**Pull requests that do _not_ include output from test.py will be rejected!**
### Adding new WHOIS data to the testing set
@ -71,3 +73,8 @@ Make sure to verify (using `pwhois` or otherwise) that the WHOIS data for the do
./test.py run thedomain.com
### Generating documentation
You need [ZippyDoc](http://cryto.net/zippydoc) (which can be installed through `pip install zippydoc`).
zpy2html doc/*.zpy

@ -218,12 +218,10 @@ def parse_raw_whois(raw_data, normalized=[]):
data['emails'] = [email for email in data["emails"] if email not in known_emails]
except KeyError, e:
pass # Not present
try:
if len(data['emails']) == 0:
del data['emails']
except KeyError, e:
pass
for key in data.keys():
if data[key] is None or len(data[key]) == 0:
del data[key]
data["raw"] = raw_data

@ -1 +1 @@
{"updated_date": ["2013-02-06T00:00:00"], "contacts": {"admin": null, "tech": null, "registrant": {"city": "Oxford", "name": "Nominet UK", "state": "Oxon", "street": "Minerva House\nEdmund Halley Road\nOxford Science Park", "country": "United Kingdom", "postalcode": "OX4 4DQ"}, "billing": null}, "nameservers": ["nom-ns1.nominet.org.uk", "nom-ns2.nominet.org.uk", "nom-ns3.nominet.org.uk"], "creation_date": null, "raw": ["\n Domain name:\n nominet.org.uk\n\n Registrant:\n Nominet UK\n\n Registrant type:\n UK Limited Company, (Company number: 3203859)\n\n Registrant's address:\n Minerva House\n Edmund Halley Road\n Oxford Science Park\n Oxford\n Oxon\n OX4 4DQ\n United Kingdom\n\n Registrar:\n No registrar listed. This domain is registered directly with Nominet.\n\n Relevant dates:\n Registered on: before Aug-1996\n Last updated: 06-Feb-2013\n\n Registration status:\n No registration status listed.\n\n Name servers:\n nom-ns1.nominet.org.uk 213.248.199.16\n nom-ns2.nominet.org.uk 195.66.240.250 2a01:40:1001:37::2\n nom-ns3.nominet.org.uk 213.219.13.194\n\n DNSSEC:\n Signed\n\n WHOIS lookup made at 14:56:34 23-Nov-2013\n\n-- \nThis WHOIS information is provided for free by Nominet UK the central registry\nfor .uk domain names. This information and the .uk WHOIS are:\n\n Copyright Nominet UK 1996 - 2013.\n\nYou may not access the .uk WHOIS or use any data from it except as permitted\nby the terms of use available in full at http://www.nominet.org.uk/whoisterms, which\nincludes restrictions on: (A) use of the data for advertising, or its\nrepackaging, recompilation, redistribution or reuse (B) obscuring, removing\nor hiding any or all of this notice and (C) exceeding query rate or volume\nlimits. The data is provided on an 'as-is' basis and may lag behind the\nregister. Access may be withdrawn or restricted at any time. \n\n"], "registrar": ["No registrar listed. This domain is registered directly with Nominet."]}
{"updated_date": ["2013-02-06T00:00:00"], "nameservers": ["nom-ns1.nominet.org.uk", "nom-ns2.nominet.org.uk", "nom-ns3.nominet.org.uk"], "contacts": {"admin": null, "tech": null, "registrant": {"city": "Oxford", "name": "Nominet UK", "state": "Oxon", "street": "Minerva House\nEdmund Halley Road\nOxford Science Park", "country": "United Kingdom", "postalcode": "OX4 4DQ"}, "billing": null}, "registrar": ["No registrar listed. This domain is registered directly with Nominet."], "raw": ["\n Domain name:\n nominet.org.uk\n\n Registrant:\n Nominet UK\n\n Registrant type:\n UK Limited Company, (Company number: 3203859)\n\n Registrant's address:\n Minerva House\n Edmund Halley Road\n Oxford Science Park\n Oxford\n Oxon\n OX4 4DQ\n United Kingdom\n\n Registrar:\n No registrar listed. This domain is registered directly with Nominet.\n\n Relevant dates:\n Registered on: before Aug-1996\n Last updated: 06-Feb-2013\n\n Registration status:\n No registration status listed.\n\n Name servers:\n nom-ns1.nominet.org.uk 213.248.199.16\n nom-ns2.nominet.org.uk 195.66.240.250 2a01:40:1001:37::2\n nom-ns3.nominet.org.uk 213.219.13.194\n\n DNSSEC:\n Signed\n\n WHOIS lookup made at 14:56:34 23-Nov-2013\n\n-- \nThis WHOIS information is provided for free by Nominet UK the central registry\nfor .uk domain names. This information and the .uk WHOIS are:\n\n Copyright Nominet UK 1996 - 2013.\n\nYou may not access the .uk WHOIS or use any data from it except as permitted\nby the terms of use available in full at http://www.nominet.org.uk/whoisterms, which\nincludes restrictions on: (A) use of the data for advertising, or its\nrepackaging, recompilation, redistribution or reuse (B) obscuring, removing\nor hiding any or all of this notice and (C) exceeding query rate or volume\nlimits. The data is provided on an 'as-is' basis and may lag behind the\nregister. Access may be withdrawn or restricted at any time. \n\n"]}

@ -1 +1 @@
{"status": ["ok"], "updated_date": ["2012-02-06T09:28:40"], "contacts": {"admin": null, "tech": {"handle": "WRSI1010", "name": "Simon Wright"}, "registrant": {"organization": "Whirlpool Broadband Multimedia", "handle": "WRSI1010", "name": "Simon Wright"}, "billing": null}, "nameservers": ["ns0.bulletproof.net.au", "ns1.bulletproof.net.au", "ns1.bulletproofnetworks.net", "ns0.bulletproofnetworks.net"], "creation_date": null, "raw": ["Domain Name: whirlpool.net.au\nLast Modified: 06-Feb-2012 09:28:40 UTC\nRegistrar ID: NetRegistry\nRegistrar Name: NetRegistry\nStatus: ok\n\nRegistrant: Simon Wright\nEligibility Type: Registered Business\nEligibility Name: Whirlpool Broadband Multimedia\nEligibility ID: NSW BN BN98319722\n\nRegistrant Contact ID: WRSI1010\nRegistrant Contact Name: Simon Wright\nRegistrant Contact Email: Visit whois.ausregistry.com.au for Web based WhoIs\n\nTech Contact ID: WRSI1010\nTech Contact Name: Simon Wright\nTech Contact Email: Visit whois.ausregistry.com.au for Web based WhoIs\n\nName Server: ns0.bulletproof.net.au\nName Server IP: 202.44.98.24\nName Server: ns1.bulletproof.net.au\nName Server IP: 64.71.152.56\nName Server: ns1.bulletproofnetworks.net\nName Server: ns0.bulletproofnetworks.net\n\n"], "registrar": ["NetRegistry"]}
{"status": ["ok"], "updated_date": ["2012-02-06T09:28:40"], "contacts": {"admin": null, "tech": {"handle": "WRSI1010", "name": "Simon Wright"}, "registrant": {"organization": "Whirlpool Broadband Multimedia", "handle": "WRSI1010", "name": "Simon Wright"}, "billing": null}, "nameservers": ["ns0.bulletproof.net.au", "ns1.bulletproof.net.au", "ns1.bulletproofnetworks.net", "ns0.bulletproofnetworks.net"], "raw": ["Domain Name: whirlpool.net.au\nLast Modified: 06-Feb-2012 09:28:40 UTC\nRegistrar ID: NetRegistry\nRegistrar Name: NetRegistry\nStatus: ok\n\nRegistrant: Simon Wright\nEligibility Type: Registered Business\nEligibility Name: Whirlpool Broadband Multimedia\nEligibility ID: NSW BN BN98319722\n\nRegistrant Contact ID: WRSI1010\nRegistrant Contact Name: Simon Wright\nRegistrant Contact Email: Visit whois.ausregistry.com.au for Web based WhoIs\n\nTech Contact ID: WRSI1010\nTech Contact Name: Simon Wright\nTech Contact Email: Visit whois.ausregistry.com.au for Web based WhoIs\n\nName Server: ns0.bulletproof.net.au\nName Server IP: 202.44.98.24\nName Server: ns1.bulletproof.net.au\nName Server IP: 64.71.152.56\nName Server: ns1.bulletproofnetworks.net\nName Server: ns0.bulletproofnetworks.net\n\n"], "registrar": ["NetRegistry"]}

@ -1 +1 @@
{"updated_date": ["2013-02-06T00:00:00"], "contacts": {"admin": null, "tech": null, "registrant": {"city": "Oxford", "name": "Nominet UK", "state": "Oxon", "street": "Minerva House\nEdmund Halley Road\nOxford Science Park", "country": "United Kingdom", "postalcode": "OX4 4DQ"}, "billing": null}, "nameservers": ["nom-ns1.nominet.org.uk", "nom-ns2.nominet.org.uk", "nom-ns3.nominet.org.uk"], "creation_date": null, "raw": ["\n Domain name:\n nominet.org.uk\n\n Registrant:\n Nominet UK\n\n Registrant type:\n UK Limited Company, (Company number: 3203859)\n\n Registrant's address:\n Minerva House\n Edmund Halley Road\n Oxford Science Park\n Oxford\n Oxon\n OX4 4DQ\n United Kingdom\n\n Registrar:\n No registrar listed. This domain is registered directly with Nominet.\n\n Relevant dates:\n Registered on: before Aug-1996\n Last updated: 06-Feb-2013\n\n Registration status:\n No registration status listed.\n\n Name servers:\n nom-ns1.nominet.org.uk 213.248.199.16\n nom-ns2.nominet.org.uk 195.66.240.250 2a01:40:1001:37::2\n nom-ns3.nominet.org.uk 213.219.13.194\n\n DNSSEC:\n Signed\n\n WHOIS lookup made at 14:56:34 23-Nov-2013\n\n-- \nThis WHOIS information is provided for free by Nominet UK the central registry\nfor .uk domain names. This information and the .uk WHOIS are:\n\n Copyright Nominet UK 1996 - 2013.\n\nYou may not access the .uk WHOIS or use any data from it except as permitted\nby the terms of use available in full at http://www.nominet.org.uk/whoisterms, which\nincludes restrictions on: (A) use of the data for advertising, or its\nrepackaging, recompilation, redistribution or reuse (B) obscuring, removing\nor hiding any or all of this notice and (C) exceeding query rate or volume\nlimits. The data is provided on an 'as-is' basis and may lag behind the\nregister. Access may be withdrawn or restricted at any time. \n\n"], "registrar": ["No registrar listed. This domain is registered directly with Nominet."]}
{"updated_date": ["2013-02-06T00:00:00"], "nameservers": ["nom-ns1.nominet.org.uk", "nom-ns2.nominet.org.uk", "nom-ns3.nominet.org.uk"], "contacts": {"admin": null, "tech": null, "registrant": {"city": "Oxford", "name": "Nominet UK", "state": "Oxon", "street": "Minerva House\nEdmund Halley Road\nOxford Science Park", "country": "United Kingdom", "postalcode": "OX4 4DQ"}, "billing": null}, "registrar": ["No registrar listed. This domain is registered directly with Nominet."], "raw": ["\n Domain name:\n nominet.org.uk\n\n Registrant:\n Nominet UK\n\n Registrant type:\n UK Limited Company, (Company number: 3203859)\n\n Registrant's address:\n Minerva House\n Edmund Halley Road\n Oxford Science Park\n Oxford\n Oxon\n OX4 4DQ\n United Kingdom\n\n Registrar:\n No registrar listed. This domain is registered directly with Nominet.\n\n Relevant dates:\n Registered on: before Aug-1996\n Last updated: 06-Feb-2013\n\n Registration status:\n No registration status listed.\n\n Name servers:\n nom-ns1.nominet.org.uk 213.248.199.16\n nom-ns2.nominet.org.uk 195.66.240.250 2a01:40:1001:37::2\n nom-ns3.nominet.org.uk 213.219.13.194\n\n DNSSEC:\n Signed\n\n WHOIS lookup made at 14:56:34 23-Nov-2013\n\n-- \nThis WHOIS information is provided for free by Nominet UK the central registry\nfor .uk domain names. This information and the .uk WHOIS are:\n\n Copyright Nominet UK 1996 - 2013.\n\nYou may not access the .uk WHOIS or use any data from it except as permitted\nby the terms of use available in full at http://www.nominet.org.uk/whoisterms, which\nincludes restrictions on: (A) use of the data for advertising, or its\nrepackaging, recompilation, redistribution or reuse (B) obscuring, removing\nor hiding any or all of this notice and (C) exceeding query rate or volume\nlimits. The data is provided on an 'as-is' basis and may lag behind the\nregister. Access may be withdrawn or restricted at any time. \n\n"]}

@ -1 +1 @@
{"status": ["ok"], "updated_date": ["2012-02-06T09:28:40"], "contacts": {"admin": null, "tech": {"handle": "WRSI1010", "name": "Simon Wright"}, "registrant": {"organization": "Whirlpool Broadband Multimedia", "handle": "WRSI1010", "name": "Simon Wright"}, "billing": null}, "nameservers": ["ns0.bulletproof.net.au", "ns1.bulletproof.net.au", "ns1.bulletproofnetworks.net", "ns0.bulletproofnetworks.net"], "creation_date": null, "raw": ["Domain Name: whirlpool.net.au\nLast Modified: 06-Feb-2012 09:28:40 UTC\nRegistrar ID: NetRegistry\nRegistrar Name: NetRegistry\nStatus: ok\n\nRegistrant: Simon Wright\nEligibility Type: Registered Business\nEligibility Name: Whirlpool Broadband Multimedia\nEligibility ID: NSW BN BN98319722\n\nRegistrant Contact ID: WRSI1010\nRegistrant Contact Name: Simon Wright\nRegistrant Contact Email: Visit whois.ausregistry.com.au for Web based WhoIs\n\nTech Contact ID: WRSI1010\nTech Contact Name: Simon Wright\nTech Contact Email: Visit whois.ausregistry.com.au for Web based WhoIs\n\nName Server: ns0.bulletproof.net.au\nName Server IP: 202.44.98.24\nName Server: ns1.bulletproof.net.au\nName Server IP: 64.71.152.56\nName Server: ns1.bulletproofnetworks.net\nName Server: ns0.bulletproofnetworks.net\n\n"], "registrar": ["NetRegistry"]}
{"status": ["ok"], "updated_date": ["2012-02-06T09:28:40"], "contacts": {"admin": null, "tech": {"handle": "WRSI1010", "name": "Simon Wright"}, "registrant": {"organization": "Whirlpool Broadband Multimedia", "handle": "WRSI1010", "name": "Simon Wright"}, "billing": null}, "nameservers": ["ns0.bulletproof.net.au", "ns1.bulletproof.net.au", "ns1.bulletproofnetworks.net", "ns0.bulletproofnetworks.net"], "raw": ["Domain Name: whirlpool.net.au\nLast Modified: 06-Feb-2012 09:28:40 UTC\nRegistrar ID: NetRegistry\nRegistrar Name: NetRegistry\nStatus: ok\n\nRegistrant: Simon Wright\nEligibility Type: Registered Business\nEligibility Name: Whirlpool Broadband Multimedia\nEligibility ID: NSW BN BN98319722\n\nRegistrant Contact ID: WRSI1010\nRegistrant Contact Name: Simon Wright\nRegistrant Contact Email: Visit whois.ausregistry.com.au for Web based WhoIs\n\nTech Contact ID: WRSI1010\nTech Contact Name: Simon Wright\nTech Contact Email: Visit whois.ausregistry.com.au for Web based WhoIs\n\nName Server: ns0.bulletproof.net.au\nName Server IP: 202.44.98.24\nName Server: ns1.bulletproof.net.au\nName Server IP: 64.71.152.56\nName Server: ns1.bulletproofnetworks.net\nName Server: ns0.bulletproofnetworks.net\n\n"], "registrar": ["NetRegistry"]}
Loading…
Cancel
Save