Skip to content

Commit

Permalink
Fixed unknown/error results for the following TLDs: .eu, .name, .nl, …
Browse files Browse the repository at this point in the history
…and .sh. .bz and .ms both can't be fixed at this time.

Signed-off-by: Matt Lightner <mlightner@gmail.com>
  • Loading branch information
Josh Delsman authored and Matt Lightner committed Jan 6, 2009
1 parent 552a056 commit f6cb079
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 38 deletions.
7 changes: 3 additions & 4 deletions lib/universal_ruby_whois/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ class Unavailable < StandardError

# The default regular expressions used when defining a new server if none are supplied.
DEFAULT_WHOIS_REGULAR_EXPRESSIONS = {
:free => /(avail|free|no match|no entr|not taken|not registered|not found)/im,
:registered => /(registered|Domain ID|domain name\s*\:|is active|is not available|exists|\bregistrant\b|Created on)/im,
:free => /(avail|free|no match|no entr|not taken|Available|Status\:\sNot\sRegistered|not registered|not found)/im,
:registered => /(registered|Domain ID|domain name\s*\:|is active|Status\:\sActive|Not available|is not available|exists|\bregistrant\b|Created on)/im,
:creation_date => /(Creation date|created on|created at|Commencement Date|Registration Date)\s*[\:\.\]]*\s*([\w\-\:\ \/]+?\d[\w\-\:\ \/]*)[^\n\r]*[\n\r]/im,
:expiration_date => /(expiration date|expires on|registered through|Renewal date)\s*[\:\.\]]*\s*([\w\-\:\ \/]+?\d[\w\-\:\ \/]*)[^\n\r]*[\n\r]/im,
:error => /(error)/im,
Expand Down Expand Up @@ -242,5 +242,4 @@ def self.shell_escape(word) #:nodoc:

end

end

end
75 changes: 41 additions & 34 deletions lib/universal_ruby_whois/server_list.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
Whois::Server.define('la', 'whois2.afilias-grs.net')
Whois::Server.define('ly', 'whois.lydomains.com')
Whois::Server.define('mc', 'whois.ripe.net')
Whois::Server.define('ms', 'whois.ms')
Whois::Server.define('ms', 'whois.nic.ms')
Whois::Server.define('mx', 'whois.nic.mx')
Whois::Server.define('my', 'whois.mynic.net.my')
Whois::Server.define('nu', 'whois.nic.nu')
Expand Down Expand Up @@ -61,30 +61,30 @@
Whois::Server.define('ws', 'whois.tld.ws')
Whois::Server.define('yt', 'whois.nic.yt')
Whois::Server.define('us', 'whois.nic.us')
Whois::Server.define('at',"whois.nic.at")
Whois::Server.define('ca',"whois.cira.ca")
Whois::Server.define('cc',"whois.nic.cc")
Whois::Server.define('ch',"whois.nic.ch")
Whois::Server.define('cn',"whois.cnnic.net.cn")
Whois::Server.define('cz',"whois.nic.cz")
Whois::Server.define('ee',"whois.eenet.ee")
Whois::Server.define('gr',"https://grweb.ics.forth.gr/")
Whois::Server.define('it',"whois.nic.it")
Whois::Server.define('li',"whois.nic.li")
Whois::Server.define('lt',"whois.domreg.lt")
Whois::Server.define('lu',"whois.dns.lu")
Whois::Server.define('lv',"whois.ripe.net")
Whois::Server.define('ms',"whois.adamsnames.tc")
Whois::Server.define('co.nz',"whois.domainz.net.nz")
Whois::Server.define('nu',"whois.nic.nu")
Whois::Server.define('pl',"whois.dns.pl")
Whois::Server.define('ro',"whois.rotld.ro")
Whois::Server.define('ru',"whois.ripn.net")
Whois::Server.define('se',"whois.nic-se.se")
Whois::Server.define('sk',"whois.ripe.net")
Whois::Server.define('tc',"whois.adamsnames.tc")
Whois::Server.define('vg',"whois.adamsnames.tc")
Whois::Server.define('ws',"whois.worldsite.ws")
Whois::Server.define('at', 'whois.nic.at')
Whois::Server.define('ca', 'whois.cira.ca')
Whois::Server.define('cc', 'whois.nic.cc')
Whois::Server.define('ch', 'whois.nic.ch')
Whois::Server.define('cn', 'whois.cnnic.net.cn')
Whois::Server.define('cz', 'whois.nic.cz')
Whois::Server.define('ee', 'whois.eenet.ee')
Whois::Server.define('gr', 'https://grweb.ics.forth.gr/')
Whois::Server.define('it', 'whois.nic.it')
Whois::Server.define('li', 'whois.nic.li')
Whois::Server.define('lt', 'whois.domreg.lt')
Whois::Server.define('lu', 'whois.dns.lu')
Whois::Server.define('lv', 'whois.ripe.net')
Whois::Server.define('ms', 'whois.adamsnames.tc')
Whois::Server.define('co.nz', 'whois.domainz.net.nz')
Whois::Server.define('nu', 'whois.nic.nu')
Whois::Server.define('pl', 'whois.dns.pl')
Whois::Server.define('ro', 'whois.rotld.ro')
Whois::Server.define('ru', 'whois.ripn.net')
Whois::Server.define('se', 'whois.nic-se.se')
Whois::Server.define('sk', 'whois.ripe.net')
Whois::Server.define('tc', 'whois.adamsnames.tc')
Whois::Server.define('vg', 'whois.adamsnames.tc')
Whois::Server.define('ws', 'whois.worldsite.ws')

#Whois::Server.define('es',"https://www.nic.es/esnic/servlet/BuscarDomSolAlta?dominio=%DOMAIN%")
#Whois::Server.define('com.es',"https://www.nic.es/esnic/servlet/BuscarDomSolAlta?dominio=%DOMAIN%")
Expand All @@ -104,7 +104,6 @@
:free => [%q{%DOMAIN% </a> </th> <td class="disp"> <img src="../images/icon_disp_yes.gif" alt="si" />}, 'im']
)


# By leaving out the whois server, we force it to follow the internic redirection.
Whois::Server.define(
[ 'com', 'net', 'edu' ], nil,
Expand Down Expand Up @@ -177,7 +176,7 @@
)
Whois::Server.define(
'eu',
'http://www.whois.eu/whois/GetDomainStatus.htm?domainName=%DOMAIN%',
'whois.eu',
:free => /AVAILABLE/im,
:registered => /REGISTERED/im,
:pending => /APPLICATION PENDING/im,
Expand All @@ -193,7 +192,7 @@
Whois::Server.define(
'name',
'whois.nic.name',
:registered => /Not available for registration./im,
:registered => /Not available for second level registration./im,
:preserved => /Not available for second level registration./im,
:free => /No match./im
)
Expand All @@ -206,10 +205,10 @@
Whois::Server.define(
'nl',
'whois.domain-registry.nl',
:registered => /ims active/im,
:free => /ims free/im,
:error => /imnvalid name/im,
:preserved => /ims excluded/im
:registered => /active/im,
:free => /free/im,
:error => /invalid domain/im,
:preserved => /excluded/im
)
Whois::Server.define(
'org',
Expand Down Expand Up @@ -257,13 +256,21 @@
:registered => /EXIST/im,
:free => /AVAIL/im
)
Whois::Server.define('asia', 'whois.nic.asia',
Whois::Server.define(
'asia',
'whois.nic.asia',
:registered => /Domain ID/im,
:free => /NOT FOUND/im
)
Whois::Server.define(
'.co.il',
'co.il',
'whois.isoc.org.il',
:registered => /validity:/im,
:free => /No data was found to match the request criteria./im
)
Whois::Server.define(
'ac.uk',
'whois.ja.net',
:registered => /Domain:/im,
:free => /No such domain/im
)

0 comments on commit f6cb079

Please sign in to comment.