Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Super simple and super buggy initial version. It works, but sometimes…

… it simply freeze without returning any message at all. Nice, isn't it?
  • Loading branch information...
commit afb4065b35f7247cffc0357aa8ca0c3b73cc84cd 1 parent 54b1d16
@weppos authored
View
4 Rakefile
@@ -57,3 +57,7 @@ begin
rescue LoadError
puts "CodeStatistics (Rails) is not available"
end
+
+Dir["tasks/**/*.rake"].each do |file|
+ load(file)
+end
View
22 data/make_tld_serv.pl
@@ -0,0 +1,22 @@
+#!/usr/bin/perl -w
+
+use strict;
+
+while (<>) {
+ chomp;
+ s/^\s*(.*)\s*$/$1/;
+ s/\s*#.*$//;
+ next if /^$/;
+ die "format error: $_" unless
+ (my ($a, $b) = /^([\w\d\.-]+)\s+([\w\d\.:-]+|[A-Z]+\s+.*)$/);
+ $b =~ s/^W(?:EB)?\s+/\\x01/;
+ $b =~ s/^M(?:SG)?\s+/\\x02/;
+ $b = "\\x03" if $b eq 'NONE';
+ $b = "\\x04" if $b eq 'CRSNIC';
+ $b = "\\x07" if $b eq 'PIR';
+ $b = "\\x08" if $b eq 'AFILIAS';
+ $b = "\\x09" if $b eq 'NICCC';
+ $b = "\\x0C" if $b eq 'ARPA';
+ print " \"$a\",\t\"$b\",\n";
+}
+
View
366 data/tld_serv_list
@@ -0,0 +1,366 @@
+# NIC? means I have not been able to find the registry
+
+.br.com whois.centralnic.net
+.cn.com whois.centralnic.net
+.de.com whois.centralnic.net
+.eu.com whois.centralnic.net
+.gb.com whois.centralnic.net
+.gb.net whois.centralnic.net
+.hu.com whois.centralnic.net
+.no.com whois.centralnic.net
+.qc.com whois.centralnic.net
+.ru.com whois.centralnic.net
+.sa.com whois.centralnic.net
+.se.com whois.centralnic.net
+.se.net whois.centralnic.net
+.uk.com whois.centralnic.net
+.uk.net whois.centralnic.net
+.us.com whois.centralnic.net
+.uy.com whois.centralnic.net
+.za.com whois.centralnic.net
+.jpn.com whois.centralnic.net
+.web.com whois.centralnic.net
+
+.com CRSNIC
+
+.za.net whois.za.net
+.net CRSNIC
+
+.eu.org whois.eu.org
+.za.org whois.za.org
+.org PIR
+
+.edu whois.educause.net
+.gov whois.nic.gov
+.int whois.iana.org
+.mil NONE
+
+.e164.arpa whois.ripe.net
+.in-addr.arpa ARPA
+.arpa whois.iana.org
+
+.aero whois.aero
+.asia whois.nic.asia
+.biz whois.nic.biz
+.cat whois.cat
+.coop whois.nic.coop
+.info whois.afilias.info
+.jobs jobswhois.verisign-grs.com
+.mobi whois.dotmobiregistry.net
+.museum whois.museum
+.name whois.nic.name
+.pro whois.registrypro.pro
+.tel whois.nic.tel
+.travel whois.nic.travel
+
+.ac whois.nic.ac
+.ad NONE # www.nic.ad
+.ae whois.uaenic.ae
+.af whois.nic.af
+.ag whois.nic.ag
+.ai whois.ai
+.al NONE # http://www.ert.gov.al/ert_alb/domain.html
+.am whois.nic.am
+.an NONE # http://www.una.an/an_domreg/
+.ao NONE # www.dns.ao
+.aq NONE # 2day.com
+.ar WEB http://www.nic.ar/
+.as whois.nic.as
+.at whois.nic.at
+.au whois.ausregistry.net.au
+.aw NONE # http://www.setarnet.aw/domreg.html
+.ax NONE # www.ax
+.az WEB http://www.nic.az/AzCheck.htm
+.ba WEB http://www.nic.ba/stream/whois/
+.bb WEB http://www.barbadosdomains.net/search_domain.php
+.bd www.whois.com.bd # http://www.btcl.net.bd/faq_dotbd.php
+.be whois.dns.be
+.bf NONE # NIC? http://www.onatel.bf/
+.bg whois.register.bg
+.bh NONE # www.inet.com.bh
+.bi WEB http://www.nic.bi/Nic_search.asp
+.bj whois.nic.bj
+.bm WEB http://207.228.133.14/cgi-bin/lansaweb?procfun+BMWHO+BMWHO2+WHO
+.bn NONE # www.brunet.bn
+.bo WEB http://www.nic.bo/
+.br whois.nic.br
+.bs WEB http://www.nic.bs/cgi-bin/search.pl
+.bt WEB http://www.nic.bt/
+.bv NONE # http://www.norid.no/domenenavnbaser/bv-sj.html
+.by WEB http://www.tld.by/indexeng.html
+.bw NONE # NIC? btc.bw www.info.bw/resource/local/index.shtml
+.bz AFILIAS
+.co.ca whois.co.ca
+.ca whois.cira.ca
+.cc NICCC
+.cd whois.nic.cd
+.cf NONE # was: WEB http://www.nic.cf/whois.php3
+.cg WEB http://www.nic.cg/cgi-bin/whois.pl
+.ch whois.nic.ch
+.ci www.nic.ci
+.ck whois.nic.ck
+.cl whois.nic.cl
+.cm NONE # http://info.intelcam.cm http://www.camnet.cm/
+.edu.cn whois.edu.cn
+.cn whois.cnnic.net.cn
+.uk.co whois.uk.co
+.co WEB https://www.nic.co/
+.cr WEB http://www.nic.cr/niccr_publico/showRegistroDominiosScreen.do
+.cu WEB http://www.nic.cu/consult.html
+.cv NONE # www.dns.cv?
+.cx whois.nic.cx
+.cy WEB http://www.nic.cy/nslookup/online_database.php
+.cz whois.nic.cz
+.de whois.denic.de
+.dj whois.domain.dj
+.dk whois.dk-hostmaster.dk
+.dm whois.nic.dm
+.do WEB http://www.nic.do/whois-h.php3
+.dz WEB https://www.nic.dz/
+.ec WEB http://www.nic.ec/whois/eng/whois.asp
+.ee whois.eenet.ee
+.eg NONE # www.egregistry.eg
+#.eh
+.er NONE # http://www.afridns.org/er/tld_er.txt
+.es WEB https://www.nic.es/
+.et NONE # http://www.telecom.net.et/EthioInternet/domainname.html
+.eu whois.eu
+.fi whois.ficora.fi
+.fj whois.usp.ac.fj
+.fk NONE # http://www.fidc.co.fk/
+.fm WEB http://www.dot.fm/whois.html
+.fo whois.ripe.net # www.nic.fo
+.fr whois.nic.fr
+.ga NONE # www.nic.ga
+.gb NONE
+.gd whois.adamsnames.tc
+.ge WEB http://whois.sanet.ge/
+.gf whois.nplus.gf
+.gg whois.gg
+.gh WEB http://www.nic.gh/customer/search_c.htm
+.gi AFILIAS
+.gl NONE # www.nic.gl
+.gm whois.ripe.net # www.nic.gm
+.gn NONE # http://www.psg.com/dns/gn/
+.gp whois.nic.gp
+.gq NONE # NO NIC http://www.getesa.gq/
+.gr WEB https://grweb.ics.forth.gr/Whois?lang=en
+.gs whois.nic.gs
+.gt WEB http://www.gt/whois.htm
+.gu WEB http://gadao.gov.gu/domainsearch.htm
+.gw NONE # www.nic.gw
+.gy whois.registry.gy
+.hk whois.hkdnr.net.hk
+.hm whois.registry.hm
+.hn AFILIAS # www.nic.hn
+.hr WEB http://www.dns.hr/pretrazivanje.html
+.ht whois.nic.ht
+.hu whois.nic.hu
+.id whois.idnic.net.id
+.ie whois.domainregistry.ie
+.il whois.isoc.org.il
+.im whois.nic.im
+.in whois.registry.in # afilias
+.io whois.nic.io
+.iq NONE # http://www.cmc.iq/english/iq/iqregister1.htm
+.ir whois.nic.ir
+.is whois.isnet.is
+.it whois.nic.it
+.je whois.je
+.jm NONE # NIC? uwimona.edu.jm http://nic.jm
+.jo WEB http://www.dns.jo/Whois.aspx
+.jp whois.jprs.jp
+.ke whois.kenic.or.ke
+.kg whois.domain.kg
+.kh NONE # http://www.mptc.gov.kh/ http://www.nic.net.kh/
+.ki WEB http://www.ki/dns/
+.km NONE # www.domaine.km
+.kn NONE # www.dot.kn
+.kp whois.kcce.kp
+.kr whois.nic.or.kr
+.kw WEB http://www.kw/
+.ky WEB http://kynseweb.messagesecure.com/kywebadmin/ # http://www.icta.ky/
+.kz whois.nic.kz
+.la whois.nic.la
+.lb WEB http://www.aub.edu.lb/lbdr/search.html
+.lc AFILIAS
+.li whois.nic.li
+.lk whois.nic.lk
+.lr NONE # http://www.psg.com/dns/lr/
+.ls NONE # http://www.co.ls/
+.lt whois.domreg.lt
+.lu whois.dns.lu
+.lv whois.nic.lv
+.ly whois.nic.ly
+.ma whois.iam.net.ma # www.nic.ma
+.mc whois.ripe.net
+.md WEB http://www.dns.md/wh1.php # whois.nic.md is restricted
+.me whois.meregistry.net # afilias
+.mg NONE # www.nic.mg
+.mh NONE # www.nic.net.mh
+.mk NONE # http://dns.marnet.net.mk/
+.ml NONE # NIC? www.sotelma.ml
+.mm whois.nic.mm
+.mn AFILIAS
+.mo WEB http://www.monic.net.mo/
+.mp NONE # get.mp
+.mq whois.nic.mq
+.mr NONE # www.nic.mr
+.ms whois.adamsnames.tc
+.mt WEB https://www.nic.org.mt/dotmt/ # whois.nic.org.mt is restricted
+.mu whois.nic.mu
+.mv NONE # NIC? www.dhiraagu.com.mv
+.mw WEB http://www.registrar.mw/
+.mx whois.nic.mx
+.my whois.mynic.net.my
+.mz NONE # NIC? www.uem.mz
+.na whois.na-nic.com.na
+.nc whois.cctld.nc
+.ne NONE # NIC? http://www.intnet.ne
+.nf whois.nic.nf
+.ng whois.register.net.ng
+.ni WEB http://www.nic.ni/consulta.htm
+.nl whois.domain-registry.nl
+.no whois.norid.no
+.np WEB http://www.mos.com.np/domsearch.html
+.nr WEB http://www.cenpac.net.nr/dns/whois.html
+.nu whois.nic.nu
+.nz whois.srs.net.nz
+.om WEB http://www.omnic.om/onlineUser/WHOISLookup.jsp
+.pa WEB http://www.nic.pa/
+.pe whois.nic.pe
+.pf NONE # http://www.opt.pf/home/
+.pg NONE # http://www.npi.gov.pg/DNS/DNS-Application-form.htm
+.ph WEB http://whois.domains.ph/
+.pk WEB http://www.pknic.net.pk/
+.co.pl whois.co.pl # "unofficial" SLD
+.pl whois.dns.pl
+.pm whois.nic.fr
+.pn WEB http://www.pitcairn.pn/PnRegistry/
+.pr whois.nic.pr
+.ps WEB http://www.nic.ps/whois/whois.html
+.pt whois.dns.pt
+.pw whois.nic.pw
+.py WEB http://www.nic.py/consultas.html
+.qa NONE # http://www.qatar.net.qa/services/virtual.htm
+.re whois.nic.fr
+.ro whois.rotld.ro
+.rs WEB http://www.nic.rs/en/whois
+.edu.ru whois.informika.ru
+.ru whois.ripn.net
+.rw WEB http://www.nic.rw/cgi-bin/whoisrw.pl
+.sa saudinic.net.sa
+.sb whois.nic.net.sb
+.sc AFILIAS # www.nic.sc
+.sd NONE # http://sudanic.isoc.sd/
+.se whois.nic-se.se
+.sg whois.nic.net.sg
+.sh whois.nic.sh
+.si whois.arnes.si
+.sj NONE # http://www.norid.no/domenenavnbaser/bv-sj.html
+.sk whois.sk-nic.sk
+.sl whois.nic.sl
+.sm whois.ripe.net
+.sn whois.nic.sn
+.so NONE # www.nic.so - no country, no NIC
+.sr whois.register.sr
+.st whois.nic.st
+.su whois.ripn.net
+.sv WEB http://www.uca.edu.sv/dns/ # http://www.svnet.org.sv/
+.sy NONE # NIC? www.ste.gov.sy
+.sz NONE # http://www.sispa.org.sz/
+.tc whois.adamsnames.tc
+.td WEB http://www.nic.td/ # broken 20081209
+.tf whois.nic.tf
+.tg WEB http://www.nic.tg/
+.th whois.thnic.net
+.tj whois.nic.tj
+.tk whois.dot.tk
+.tl whois.nic.tl
+.tm whois.nic.tm
+.tn WEB http://whois.ati.tn/
+.to whois.tonic.to
+.tp whois.nic.tp
+.tr whois.metu.edu.tr
+.tt WEB http://www.nic.tt/cgi-bin/search.pl
+.tv whois.nic.tv
+.tw whois.twnic.net
+.tz NONE # http://www.psg.com/dns/tz/
+.ua whois.net.ua
+.ug www.registry.co.ug # this is a whois server too
+.ac.uk whois.ja.net
+.bl.uk NONE
+.british-library.uk NONE
+.gov.uk whois.ja.net
+.icnet.uk NONE
+.jet.uk NONE
+.mod.uk NONE
+.nhs.uk NONE
+.nls.uk NONE
+.parliament.uk NONE
+.police.uk NONE
+.uk whois.nic.uk
+.fed.us whois.nic.gov
+.us whois.nic.us
+.com.uy WEB https://nic.anteldata.com.uy/dns/
+.uy www.rau.edu.uy # this is a whois server too
+.uz whois.cctld.uz
+.va whois.ripe.net
+.vc AFILIAS
+.ve whois.nic.ve
+.vg whois.adamsnames.tc
+.vi WEB http://www.nic.vi/whoisform.htm
+.vn WEB http://www.vnnic.vn/english/
+.vu WEB http://www.vunic.vu/whois.html
+.wf whois.nic.wf
+.ws whois.samoanic.ws
+.ye NONE # http://www.y.net.ye/services/domain_name.htm
+.yt whois.nic.yt
+.yu NONE # www.nic.yu
+.ac.za whois.ac.za
+.co.za whois.coza.net.za
+.gov.za whois.gov.za
+#.net.za whois.net.za
+.org.za WEB http://www.org.za/ # rwhois.org.za:4321
+.za NONE # http://www.internet.org.za/slds.html many more SLD...
+.zm NONE # http://www.zamnet.zm/ser-isp/dnr.htm
+.zw NONE # http://www.zispa.co.zw/
+
+-dom whois.networksolutions.com
+-org whois.networksolutions.com
+-hst whois.networksolutions.com
+-arin whois.arin.net
+-ripe whois.ripe.net
+-mnt whois.ripe.net
+-lacnic whois.lacnic.net
+-afrinic whois.afrinic.net
+-ap whois.apnic.net
+-ar whois.aunic.net
+-cn whois.cnnic.net.cn
+-cz whois.nic.cz
+-dk whois.dk-hostmaster.dk
+-il whois.isoc.org.il
+-is whois.isnet.is
+-kg whois.domain.kg
+-ti whois.telstra.net
+-tw whois.twnic.net
+-6bone whois.6bone.net
+-coop whois.nic.coop
+-cknic whois.nic.ck
+-idnic whois.idnic.net.id
+-itnic whois.nic.it
+-frnic whois.nic.fr
+-gandi whois.gandi.net
+-kenic whois.kenic.or.ke
+-lrms whois.afilias.info
+-metu whois.metu.edu.tr
+-nicat whois.nic.at
+-nicir whois.nic.ir
+-norid whois.norid.no
+-ripn whois.ripn.net
+-rotld whois.rotld.ro
+-sgnic whois.nic.net.sg
+-tel whois.nic.tel
+-uanic whois.com.ua
+-uynic www.rau.edu.uy
+-sixxs whois.sixxs.net
View
1  lib/whois.rb
@@ -15,6 +15,7 @@
require 'whois/version'
+require 'whois/client'
class Whois
View
58 lib/whois/client.rb
@@ -0,0 +1,58 @@
+#
+# = Ruby Whois
+#
+# A pure Ruby WHOIS client.
+#
+#
+# Category:: Net
+# Package:: WWW::Delicious
+# Author:: Simone Carletti <weppos@weppos.net>
+# License:: MIT License
+#
+#--
+#
+#++
+
+
+require 'socket'
+require 'timeout'
+
+
+class Whois
+
+ class Client
+
+ class Error < StandardError; end
+ class ServerNotFound < Error; end
+
+
+ def query(string)
+ server = find_server(string)
+ ask_the_socket(string, server, 43)
+ end
+
+ private
+
+ def find_server(string)
+ self.class.servers.each do |ext, server|
+ return server if string.slice(-ext.size, ext.size) == ext
+ end
+ raise ServerNotFound, "Unable to find a WHOIS server for `#{string}'"
+ end
+
+ def ask_the_socket(query, server, port = 43)
+ client = TCPSocket.open(server, port)
+ client.write("#{query}\n") # I could use put(foo) and forget the \n
+ client.read # but write/read sounds better than puts/read
+ ensure # and I really want to use read instead of gets.
+ client.close
+ end
+
+
+ def self.servers
+ @@servers ||= YAML.load_file(File.dirname(__FILE__) + "/servers.yml")
+ end
+
+ end
+
+end
View
709 lib/whois/servers.yml
@@ -0,0 +1,709 @@
+---
+- - .br.com
+ - whois.centralnic.net
+- - .cn.com
+ - whois.centralnic.net
+- - .de.com
+ - whois.centralnic.net
+- - .eu.com
+ - whois.centralnic.net
+- - .gb.com
+ - whois.centralnic.net
+- - .gb.net
+ - whois.centralnic.net
+- - .hu.com
+ - whois.centralnic.net
+- - .no.com
+ - whois.centralnic.net
+- - .qc.com
+ - whois.centralnic.net
+- - .ru.com
+ - whois.centralnic.net
+- - .sa.com
+ - whois.centralnic.net
+- - .se.com
+ - whois.centralnic.net
+- - .se.net
+ - whois.centralnic.net
+- - .uk.com
+ - whois.centralnic.net
+- - .uk.net
+ - whois.centralnic.net
+- - .us.com
+ - whois.centralnic.net
+- - .uy.com
+ - whois.centralnic.net
+- - .za.com
+ - whois.centralnic.net
+- - .jpn.com
+ - whois.centralnic.net
+- - .web.com
+ - whois.centralnic.net
+- - .com
+ - CRSNIC
+- - .za.net
+ - whois.za.net
+- - .net
+ - CRSNIC
+- - .eu.org
+ - whois.eu.org
+- - .za.org
+ - whois.za.org
+- - .org
+ - PIR
+- - .edu
+ - whois.educause.net
+- - .gov
+ - whois.nic.gov
+- - .int
+ - whois.iana.org
+- - .mil
+ - NONE
+- - .e164.arpa
+ - whois.ripe.net
+- - .in-addr.arpa
+ - ARPA
+- - .arpa
+ - whois.iana.org
+- - .aero
+ - whois.aero
+- - .asia
+ - whois.nic.asia
+- - .biz
+ - whois.nic.biz
+- - .cat
+ - whois.cat
+- - .coop
+ - whois.nic.coop
+- - .info
+ - whois.afilias.info
+- - .jobs
+ - jobswhois.verisign-grs.com
+- - .mobi
+ - whois.dotmobiregistry.net
+- - .museum
+ - whois.museum
+- - .name
+ - whois.nic.name
+- - .pro
+ - whois.registrypro.pro
+- - .tel
+ - whois.nic.tel
+- - .travel
+ - whois.nic.travel
+- - .ac
+ - whois.nic.ac
+- - .ad
+ - NONE
+- - .ae
+ - whois.uaenic.ae
+- - .af
+ - whois.nic.af
+- - .ag
+ - whois.nic.ag
+- - .ai
+ - whois.ai
+- - .al
+ - NONE
+- - .am
+ - whois.nic.am
+- - .an
+ - NONE
+- - .ao
+ - NONE
+- - .aq
+ - NONE
+- - .ar
+ - WEB http://www.nic.ar/
+- - .as
+ - whois.nic.as
+- - .at
+ - whois.nic.at
+- - .au
+ - whois.ausregistry.net.au
+- - .aw
+ - NONE
+- - .ax
+ - NONE
+- - .az
+ - WEB http://www.nic.az/AzCheck.htm
+- - .ba
+ - WEB http://www.nic.ba/stream/whois/
+- - .bb
+ - WEB http://www.barbadosdomains.net/search_domain.php
+- - .bd
+ - www.whois.com.bd
+- - .be
+ - whois.dns.be
+- - .bf
+ - NONE
+- - .bg
+ - whois.register.bg
+- - .bh
+ - NONE
+- - .bi
+ - WEB http://www.nic.bi/Nic_search.asp
+- - .bj
+ - whois.nic.bj
+- - .bm
+ - WEB http://207.228.133.14/cgi-bin/lansaweb?procfun+BMWHO+BMWHO2+WHO
+- - .bn
+ - NONE
+- - .bo
+ - WEB http://www.nic.bo/
+- - .br
+ - whois.nic.br
+- - .bs
+ - WEB http://www.nic.bs/cgi-bin/search.pl
+- - .bt
+ - WEB http://www.nic.bt/
+- - .bv
+ - NONE
+- - .by
+ - WEB http://www.tld.by/indexeng.html
+- - .bw
+ - NONE
+- - .bz
+ - AFILIAS
+- - .co.ca
+ - whois.co.ca
+- - .ca
+ - whois.cira.ca
+- - .cc
+ - NICCC
+- - .cd
+ - whois.nic.cd
+- - .cf
+ - NONE
+- - .cg
+ - WEB http://www.nic.cg/cgi-bin/whois.pl
+- - .ch
+ - whois.nic.ch
+- - .ci
+ - www.nic.ci
+- - .ck
+ - whois.nic.ck
+- - .cl
+ - whois.nic.cl
+- - .cm
+ - NONE
+- - .edu.cn
+ - whois.edu.cn
+- - .cn
+ - whois.cnnic.net.cn
+- - .uk.co
+ - whois.uk.co
+- - .co
+ - WEB https://www.nic.co/
+- - .cr
+ - WEB http://www.nic.cr/niccr_publico/showRegistroDominiosScreen.do
+- - .cu
+ - WEB http://www.nic.cu/consult.html
+- - .cv
+ - NONE
+- - .cx
+ - whois.nic.cx
+- - .cy
+ - WEB http://www.nic.cy/nslookup/online_database.php
+- - .cz
+ - whois.nic.cz
+- - .de
+ - whois.denic.de
+- - .dj
+ - whois.domain.dj
+- - .dk
+ - whois.dk-hostmaster.dk
+- - .dm
+ - whois.nic.dm
+- - .do
+ - WEB http://www.nic.do/whois-h.php3
+- - .dz
+ - WEB https://www.nic.dz/
+- - .ec
+ - WEB http://www.nic.ec/whois/eng/whois.asp
+- - .ee
+ - whois.eenet.ee
+- - .eg
+ - NONE
+- - .er
+ - NONE
+- - .es
+ - WEB https://www.nic.es/
+- - .et
+ - NONE
+- - .eu
+ - whois.eu
+- - .fi
+ - whois.ficora.fi
+- - .fj
+ - whois.usp.ac.fj
+- - .fk
+ - NONE
+- - .fm
+ - WEB http://www.dot.fm/whois.html
+- - .fo
+ - whois.ripe.net
+- - .fr
+ - whois.nic.fr
+- - .ga
+ - NONE
+- - .gb
+ - NONE
+- - .gd
+ - whois.adamsnames.tc
+- - .ge
+ - WEB http://whois.sanet.ge/
+- - .gf
+ - whois.nplus.gf
+- - .gg
+ - whois.gg
+- - .gh
+ - WEB http://www.nic.gh/customer/search_c.htm
+- - .gi
+ - AFILIAS
+- - .gl
+ - NONE
+- - .gm
+ - whois.ripe.net
+- - .gn
+ - NONE
+- - .gp
+ - whois.nic.gp
+- - .gq
+ - NONE
+- - .gr
+ - WEB https://grweb.ics.forth.gr/Whois?lang=en
+- - .gs
+ - whois.nic.gs
+- - .gt
+ - WEB http://www.gt/whois.htm
+- - .gu
+ - WEB http://gadao.gov.gu/domainsearch.htm
+- - .gw
+ - NONE
+- - .gy
+ - whois.registry.gy
+- - .hk
+ - whois.hkdnr.net.hk
+- - .hm
+ - whois.registry.hm
+- - .hn
+ - AFILIAS
+- - .hr
+ - WEB http://www.dns.hr/pretrazivanje.html
+- - .ht
+ - whois.nic.ht
+- - .hu
+ - whois.nic.hu
+- - .id
+ - whois.idnic.net.id
+- - .ie
+ - whois.domainregistry.ie
+- - .il
+ - whois.isoc.org.il
+- - .im
+ - whois.nic.im
+- - .in
+ - whois.registry.in
+- - .io
+ - whois.nic.io
+- - .iq
+ - NONE
+- - .ir
+ - whois.nic.ir
+- - .is
+ - whois.isnet.is
+- - .it
+ - whois.nic.it
+- - .je
+ - whois.je
+- - .jm
+ - NONE
+- - .jo
+ - WEB http://www.dns.jo/Whois.aspx
+- - .jp
+ - whois.jprs.jp
+- - .ke
+ - whois.kenic.or.ke
+- - .kg
+ - whois.domain.kg
+- - .kh
+ - NONE
+- - .ki
+ - WEB http://www.ki/dns/
+- - .km
+ - NONE
+- - .kn
+ - NONE
+- - .kp
+ - whois.kcce.kp
+- - .kr
+ - whois.nic.or.kr
+- - .kw
+ - WEB http://www.kw/
+- - .ky
+ - WEB http://kynseweb.messagesecure.com/kywebadmin/
+- - .kz
+ - whois.nic.kz
+- - .la
+ - whois.nic.la
+- - .lb
+ - WEB http://www.aub.edu.lb/lbdr/search.html
+- - .lc
+ - AFILIAS
+- - .li
+ - whois.nic.li
+- - .lk
+ - whois.nic.lk
+- - .lr
+ - NONE
+- - .ls
+ - NONE
+- - .lt
+ - whois.domreg.lt
+- - .lu
+ - whois.dns.lu
+- - .lv
+ - whois.nic.lv
+- - .ly
+ - whois.nic.ly
+- - .ma
+ - whois.iam.net.ma
+- - .mc
+ - whois.ripe.net
+- - .md
+ - WEB http://www.dns.md/wh1.php
+- - .me
+ - whois.meregistry.net
+- - .mg
+ - NONE
+- - .mh
+ - NONE
+- - .mk
+ - NONE
+- - .ml
+ - NONE
+- - .mm
+ - whois.nic.mm
+- - .mn
+ - AFILIAS
+- - .mo
+ - WEB http://www.monic.net.mo/
+- - .mp
+ - NONE
+- - .mq
+ - whois.nic.mq
+- - .mr
+ - NONE
+- - .ms
+ - whois.adamsnames.tc
+- - .mt
+ - WEB https://www.nic.org.mt/dotmt/
+- - .mu
+ - whois.nic.mu
+- - .mv
+ - NONE
+- - .mw
+ - WEB http://www.registrar.mw/
+- - .mx
+ - whois.nic.mx
+- - .my
+ - whois.mynic.net.my
+- - .mz
+ - NONE
+- - .na
+ - whois.na-nic.com.na
+- - .nc
+ - whois.cctld.nc
+- - .ne
+ - NONE
+- - .nf
+ - whois.nic.nf
+- - .ng
+ - whois.register.net.ng
+- - .ni
+ - WEB http://www.nic.ni/consulta.htm
+- - .nl
+ - whois.domain-registry.nl
+- - .no
+ - whois.norid.no
+- - .np
+ - WEB http://www.mos.com.np/domsearch.html
+- - .nr
+ - WEB http://www.cenpac.net.nr/dns/whois.html
+- - .nu
+ - whois.nic.nu
+- - .nz
+ - whois.srs.net.nz
+- - .om
+ - WEB http://www.omnic.om/onlineUser/WHOISLookup.jsp
+- - .pa
+ - WEB http://www.nic.pa/
+- - .pe
+ - whois.nic.pe
+- - .pf
+ - NONE
+- - .pg
+ - NONE
+- - .ph
+ - WEB http://whois.domains.ph/
+- - .pk
+ - WEB http://www.pknic.net.pk/
+- - .co.pl
+ - whois.co.pl
+- - .pl
+ - whois.dns.pl
+- - .pm
+ - whois.nic.fr
+- - .pn
+ - WEB http://www.pitcairn.pn/PnRegistry/
+- - .pr
+ - whois.nic.pr
+- - .ps
+ - WEB http://www.nic.ps/whois/whois.html
+- - .pt
+ - whois.dns.pt
+- - .pw
+ - whois.nic.pw
+- - .py
+ - WEB http://www.nic.py/consultas.html
+- - .qa
+ - NONE
+- - .re
+ - whois.nic.fr
+- - .ro
+ - whois.rotld.ro
+- - .rs
+ - WEB http://www.nic.rs/en/whois
+- - .edu.ru
+ - whois.informika.ru
+- - .ru
+ - whois.ripn.net
+- - .rw
+ - WEB http://www.nic.rw/cgi-bin/whoisrw.pl
+- - .sa
+ - saudinic.net.sa
+- - .sb
+ - whois.nic.net.sb
+- - .sc
+ - AFILIAS
+- - .sd
+ - NONE
+- - .se
+ - whois.nic-se.se
+- - .sg
+ - whois.nic.net.sg
+- - .sh
+ - whois.nic.sh
+- - .si
+ - whois.arnes.si
+- - .sj
+ - NONE
+- - .sk
+ - whois.sk-nic.sk
+- - .sl
+ - whois.nic.sl
+- - .sm
+ - whois.ripe.net
+- - .sn
+ - whois.nic.sn
+- - .so
+ - NONE
+- - .sr
+ - whois.register.sr
+- - .st
+ - whois.nic.st
+- - .su
+ - whois.ripn.net
+- - .sv
+ - WEB http://www.uca.edu.sv/dns/
+- - .sy
+ - NONE
+- - .sz
+ - NONE
+- - .tc
+ - whois.adamsnames.tc
+- - .td
+ - WEB http://www.nic.td/
+- - .tf
+ - whois.nic.tf
+- - .tg
+ - WEB http://www.nic.tg/
+- - .th
+ - whois.thnic.net
+- - .tj
+ - whois.nic.tj
+- - .tk
+ - whois.dot.tk
+- - .tl
+ - whois.nic.tl
+- - .tm
+ - whois.nic.tm
+- - .tn
+ - WEB http://whois.ati.tn/
+- - .to
+ - whois.tonic.to
+- - .tp
+ - whois.nic.tp
+- - .tr
+ - whois.metu.edu.tr
+- - .tt
+ - WEB http://www.nic.tt/cgi-bin/search.pl
+- - .tv
+ - whois.nic.tv
+- - .tw
+ - whois.twnic.net
+- - .tz
+ - NONE
+- - .ua
+ - whois.net.ua
+- - .ug
+ - www.registry.co.ug
+- - .ac.uk
+ - whois.ja.net
+- - .bl.uk
+ - NONE
+- - .british-library.uk
+ - NONE
+- - .gov.uk
+ - whois.ja.net
+- - .icnet.uk
+ - NONE
+- - .jet.uk
+ - NONE
+- - .mod.uk
+ - NONE
+- - .nhs.uk
+ - NONE
+- - .nls.uk
+ - NONE
+- - .parliament.uk
+ - NONE
+- - .police.uk
+ - NONE
+- - .uk
+ - whois.nic.uk
+- - .fed.us
+ - whois.nic.gov
+- - .us
+ - whois.nic.us
+- - .com.uy
+ - WEB https://nic.anteldata.com.uy/dns/
+- - .uy
+ - www.rau.edu.uy
+- - .uz
+ - whois.cctld.uz
+- - .va
+ - whois.ripe.net
+- - .vc
+ - AFILIAS
+- - .ve
+ - whois.nic.ve
+- - .vg
+ - whois.adamsnames.tc
+- - .vi
+ - WEB http://www.nic.vi/whoisform.htm
+- - .vn
+ - WEB http://www.vnnic.vn/english/
+- - .vu
+ - WEB http://www.vunic.vu/whois.html
+- - .wf
+ - whois.nic.wf
+- - .ws
+ - whois.samoanic.ws
+- - .ye
+ - NONE
+- - .yt
+ - whois.nic.yt
+- - .yu
+ - NONE
+- - .ac.za
+ - whois.ac.za
+- - .co.za
+ - whois.coza.net.za
+- - .gov.za
+ - whois.gov.za
+- - .org.za
+ - WEB http://www.org.za/
+- - .za
+ - NONE
+- - .zm
+ - NONE
+- - .zw
+ - NONE
+- - -dom
+ - whois.networksolutions.com
+- - -org
+ - whois.networksolutions.com
+- - -hst
+ - whois.networksolutions.com
+- - -arin
+ - whois.arin.net
+- - -ripe
+ - whois.ripe.net
+- - -mnt
+ - whois.ripe.net
+- - -lacnic
+ - whois.lacnic.net
+- - -afrinic
+ - whois.afrinic.net
+- - -ap
+ - whois.apnic.net
+- - -ar
+ - whois.aunic.net
+- - -cn
+ - whois.cnnic.net.cn
+- - -cz
+ - whois.nic.cz
+- - -dk
+ - whois.dk-hostmaster.dk
+- - -il
+ - whois.isoc.org.il
+- - -is
+ - whois.isnet.is
+- - -kg
+ - whois.domain.kg
+- - -ti
+ - whois.telstra.net
+- - -tw
+ - whois.twnic.net
+- - -6bone
+ - whois.6bone.net
+- - -coop
+ - whois.nic.coop
+- - -cknic
+ - whois.nic.ck
+- - -idnic
+ - whois.idnic.net.id
+- - -itnic
+ - whois.nic.it
+- - -frnic
+ - whois.nic.fr
+- - -gandi
+ - whois.gandi.net
+- - -kenic
+ - whois.kenic.or.ke
+- - -lrms
+ - whois.afilias.info
+- - -metu
+ - whois.metu.edu.tr
+- - -nicat
+ - whois.nic.at
+- - -nicir
+ - whois.nic.ir
+- - -norid
+ - whois.norid.no
+- - -ripn
+ - whois.ripn.net
+- - -rotld
+ - whois.rotld.ro
+- - -sgnic
+ - whois.nic.net.sg
+- - -tel
+ - whois.nic.tel
+- - -uanic
+ - whois.com.ua
+- - -uynic
+ - www.rau.edu.uy
+- - -sixxs
+ - whois.sixxs.net
View
19 tasks/server.rake
@@ -0,0 +1,19 @@
+namespace :server do
+
+ desc "server:convert_file_tld"
+ task :convert_file_tld do
+ servers = File.readlines("data/tld_serv_list").map do |line|
+ line.chomp!
+ line.gsub!(/^\s*(.*)\s*$/, '\1')
+ line.gsub!(/\s*#.*$/, '')
+ if line =~ /^([\w\d\.-]+)\s+([\w\d\.:-]+|[A-Z]+\s+.*)$/
+ extension, server = $1, $2
+ [extension, server]
+ end
+ end.reject { |value| value == '' || value.nil? }
+
+ File.open("lib/whois/servers.yml", "w+") { |f| f.write(YAML.dump(servers)) }
+ puts "Created file with #{servers.size} servers."
+ end
+
+end
Please sign in to comment.
Something went wrong with that request. Please try again.