From ea4cf52832fe8ff56fc4937138467819aa2829c1 Mon Sep 17 00:00:00 2001 From: Riccardo Bessone Date: Wed, 25 Jan 2023 15:42:45 +0100 Subject: [PATCH] Add UDR TLDs (#202) --- .../Whois/Configs/module.tld.servers.json | 4 ++++ .../Whois/Modules/Tld/TldParsingTest.php | 4 ++++ .../Modules/Tld/parsing_data/.hk.com/free.txt | 8 ++++++++ .../Tld/parsing_data/.hk.com/udr.hk.com.json | 13 ++++++++++++ .../Tld/parsing_data/.hk.com/udr.hk.com.txt | 20 +++++++++++++++++++ 5 files changed, 49 insertions(+) create mode 100644 tests/Iodev/Whois/Modules/Tld/parsing_data/.hk.com/free.txt create mode 100644 tests/Iodev/Whois/Modules/Tld/parsing_data/.hk.com/udr.hk.com.json create mode 100644 tests/Iodev/Whois/Modules/Tld/parsing_data/.hk.com/udr.hk.com.txt diff --git a/src/Iodev/Whois/Configs/module.tld.servers.json b/src/Iodev/Whois/Configs/module.tld.servers.json index 5d564296..fb7d5259 100644 --- a/src/Iodev/Whois/Configs/module.tld.servers.json +++ b/src/Iodev/Whois/Configs/module.tld.servers.json @@ -509,6 +509,8 @@ {"zone": ".hk", "host": "whois.hkirc.hk"}, {"zone": ".hk", "host": "whois.hknic.net.hk"}, {"zone": ".*.hk", "host": "whois.hkdnr.net.hk"}, + {"zone": ".hk.com", "host": "whois.registry.hk.com"}, + {"zone": ".hk.org", "host": "whois.registry.hk.com"}, {"zone": ".hkt", "host": "whois.nic.hkt"}, {"zone": ".hm", "host": "whois.registry.hm"}, {"zone": ".hn", "host": "whois.nic.hn"}, @@ -555,6 +557,7 @@ {"zone": ".info", "host": "whois.afilias.net"}, {"zone": ".ing", "host": "whois.nic.google"}, {"zone": ".ink", "host": "whois.nic.ink"}, + {"zone": ".inc.hk", "host": "whois.registry.hk.com"}, {"zone": ".institute", "host": "whois.nic.institute"}, {"zone": ".insurance", "host": "whois.nic.insurance"}, {"zone": ".insure", "host": "whois.nic.insure"}, @@ -671,6 +674,7 @@ {"zone": ".ls", "host": "whois.nic.ls"}, {"zone": ".lt", "host": "whois.domreg.lt", "parserType": "commonFlat"}, {"zone": ".ltd", "host": "whois.nic.ltd"}, + {"zone": ".ltd.hk", "host": "whois.registry.hk.com"}, {"zone": ".ltda", "host": "whois.afilias-srs.net"}, {"zone": ".lu", "host": "whois.dns.lu"}, {"zone": ".lu", "host": "whois.restena.lu"}, diff --git a/tests/Iodev/Whois/Modules/Tld/TldParsingTest.php b/tests/Iodev/Whois/Modules/Tld/TldParsingTest.php index b7c4738b..48ae48dd 100644 --- a/tests/Iodev/Whois/Modules/Tld/TldParsingTest.php +++ b/tests/Iodev/Whois/Modules/Tld/TldParsingTest.php @@ -486,6 +486,10 @@ public function getTestData() [ "free.hk", ".hk/free.txt", null ], // [ "google.com.hk", ".hk/google.com.hk.txt", ".hk/google.com.hk.json" ], + // .HK.COM + [ "free.hk.com", ".hk.com/free.txt", null ], + [ "udr.hk.com", ".hk.com/udr.hk.com.txt", ".hk.com/udr.hk.com.json" ], + // .HR [ "free.hr", ".hr/free.txt", null ], [ "google.hr", ".hr/google.hr.txt", ".hr/google.hr.json" ], diff --git a/tests/Iodev/Whois/Modules/Tld/parsing_data/.hk.com/free.txt b/tests/Iodev/Whois/Modules/Tld/parsing_data/.hk.com/free.txt new file mode 100644 index 00000000..35d8c267 --- /dev/null +++ b/tests/Iodev/Whois/Modules/Tld/parsing_data/.hk.com/free.txt @@ -0,0 +1,8 @@ +Use of this whois service implies agreement with our whois +terms found here http://www.whois.hk.com/terms.html + +Available: Yes +No match for "freedomain.hk.com" + +This domain is available for registration, please visit: +http://www.domains.hk.com/register-domain \ No newline at end of file diff --git a/tests/Iodev/Whois/Modules/Tld/parsing_data/.hk.com/udr.hk.com.json b/tests/Iodev/Whois/Modules/Tld/parsing_data/.hk.com/udr.hk.com.json new file mode 100644 index 00000000..fd41b72f --- /dev/null +++ b/tests/Iodev/Whois/Modules/Tld/parsing_data/.hk.com/udr.hk.com.json @@ -0,0 +1,13 @@ +{ + "domainName": "udr.hk.com", + "whoisServer": "", + "nameServers": [ + "ns1.hkdot.com", + "ns2.hkdot.com" + ], + "creationDate": "2005-08-11T00:00:00Z", + "updatedDate": "2005-08-11T00:00:00Z", + "states": [], + "owner": "Hostmaster - Universal Domain Registry", + "registrar": "SARNic - Legacy Registrar" +} \ No newline at end of file diff --git a/tests/Iodev/Whois/Modules/Tld/parsing_data/.hk.com/udr.hk.com.txt b/tests/Iodev/Whois/Modules/Tld/parsing_data/.hk.com/udr.hk.com.txt new file mode 100644 index 00000000..666f93c2 --- /dev/null +++ b/tests/Iodev/Whois/Modules/Tld/parsing_data/.hk.com/udr.hk.com.txt @@ -0,0 +1,20 @@ +Use of this whois service implies agreement with our whois +terms found here http://www.whois.hk.com/terms.html + +Available: No + +Domain Name: UDR.HK.COM +Registrar URL: http://www.sarnic.hk.com +Creation Date: 2005-08-11T00:00:00Z +Last Updated: 2005-08-11T00:00:00Z + +Registrar: SARNic - Legacy Registrar +Registrar Abuse Contact Email: domreg@sarnic.hk.com +Registrant ID: SA-12246 +Registrant Name: Hostmaster - Universal Domain Registry +Registrant Organization: +Name Server: NS2.HKDOT.COM +Name Server: NS1.HKDOT.COM + +For complete domain details go to: +http://www.whois.hk.com \ No newline at end of file