Skip to content

Commit

Permalink
Added testcases for the most popular extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
weppos committed Aug 8, 2009
1 parent bbc50bc commit 97e7a9a
Show file tree
Hide file tree
Showing 148 changed files with 8,095 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/testcases/responses/ae/registered.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Domain Name: google.ae
Registrar ID: markmonitor
Registrar Name: MarkMonitor
Status: ok

Registrant Contact ID: R039097
Registrant Contact Name: GOOGLE INC
Registrant Contact Email: Visit whois.aeda.net.ae for Web based WhoIs

Tech Contact ID: C077369
Tech Contact Name: GOOGLE INC
Tech Contact Email: Visit whois.aeda.net.ae for Web based WhoIs

Name Server: ns1.google.com
Name Server: ns2.google.com
26 changes: 26 additions & 0 deletions utils/generate.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/usr/bin/env ruby -wKU

$:.unshift(File.dirname(__FILE__) + '/../lib')

require File.dirname(__FILE__) + '/../lib/whois'
require 'fileutils'

FileUtils.mkpath(File.dirname(__FILE__) + "/tlds")
File.readlines(File.dirname(__FILE__) + "/tlds.txt").each do |line|
extension, domain = line.chomp.split(",")
puts "Serving #{extension}..."

if !domain
# puts "Skipped"
next
end

begin
response = whois(domain)
File.open(File.dirname(__FILE__) + "/tlds/domain#{extension}.txt", "w+") { |f| f.write(response) }
puts "Success #{domain}"
rescue => e
puts "Error #{domain}: #{e.message}"
end

end
316 changes: 316 additions & 0 deletions utils/tlds.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,316 @@
.br.com,
.cn.com,
.de.com,
.eu.com,
.gb.com,
.gb.net,
.hu.com,
.no.com,
.qc.com,
.ru.com,
.sa.com,
.se.com,
.se.net,
.uk.com,
.uk.net,
.us.com,
.uy.com,
.za.com,
.jpn.com,
.web.com,
.com,google.com
.za.net,aquaria.za.net
.net,google.net
.eu.org,best.eu.org
.za.org,csa.za.org
.org,google.org
.edu,harvard.edu
.gov,usa.gov
.int,who.int
.mil,defenselink.mil
.e164.arpa,0.0.1.8.e164.arpa
.in-addr.arpa,2.0.192.in-addr.arpa
.arpa,
.aero,ivao.aero
.asia,keepclicking.asia
.biz,google.biz
.cat,domini.cat
.coop,co-operative.coop
.info,google.info
.jobs,google.jobs
.mobi,google.mobi
.museum,about.museum
.name,pratham.name
.pro,registry.pro
.tel,google.tel
.travel,
.ac,google.ac
.ad,andorra.ad
.ae,dubaitourism.ae
.af,google.af
.ag,google.ag
.ai,gov.ai
.al,google.al
.am,google.am
.an,una.an
.ao,dns.ao
.aq,acap.aq
.ar,nic.ar
.as,google.as
.at,google.at
.au,google.com.au
.aw,setarnet.aw
.ax,regeringen.ax
.az,google.az
.ba,google.ba
.bb,barbados.bb
.bd,bangladesh.gov.bd
.be,google.be
.bf,onatel.bf
.bg,google.bg
.bh,inet.com.bh
.bi,google.bi
.bj,google.bj
.bm,gov.bm
.bn,brunet.bn
.bo,google.bo
.br,registro.br
.bs,google.bs
.bt,nic.bt
.bv,
.by,google.by
.bw,mascom.bw
.bz,belizenic.bz
.co.ca,whois.co.ca
.ca,cica.ca
.cc,favicon.cc
.cd,google.cd
.cf,socatel.cf
.cg,google.cg
.ch,google.ch
.ci,google.ci
.ck,oyster.net.ck
.cl,google.cl
.cm,intelcam.cm
.edu.cn,tsinghua.edu.cn
.cn,tsinghua.edu.cn
.uk.co,
.co,banrep.gov.co
.cr,tourism.co.cr
.cu,cubaweb.cu
.cv,governo.cv
.cx,analog.cx
.cy,cyprusweekly.com.cy
.cz,google.cz
.de,google.de
.dj,google.dj
.dk,google.dk
.dm,google.dm
.do,nic.do
.dz,google.dz
.ec,google.ec
.ee,google.ee
.eg,bibalex.gov.eg
.er,
.es,google.es
.et,aau.edu.et
.eu,europa.eu
.fi,google.fi
.fj,google.com.fj
.fk,epd.gov.fk
.fm,last.fm
.fo,portal.fo
.fr,google.fr
.ga,nic.ga
.gb,
.gd,google.gd
.ge,google.ge
.gf,google.gf
.gg,google.gg
.gh,google.com.gh
.gi,ajuntament.gi
.gl,google.gl
.gm,google.gm
.gn,
.gp,google.gp
.gq,
.gr,google.gr
.gs,sgisland.gs
.gt,www.gt
.gu,guamchamber.com.gu
.gw,register.gw
.gy,google.gy
.hk,google.hk"
.hm,google.hm
.hn,google.hn
.hr,google.hr
.ht,google.ht
.hu,google.hu
.id,pandi.or.id
.ie,google.ie
.il,isoc.org.il
.im,google.im
.in,google.in
.io,google.io
.iq,cmc.iq
.ir,nic.ir
.is,google.is
.it,google.it
.je,google.je
.jm,google.com.jm
.jo,google.jo
.jp,google.jp
.ke,google.co.ke
.kg,google.kg
.kh,dot.kn
.ki,google.ki
.km,domaine.km
.kn,dot.kn
.kp,kcce.kp
.kr,google.kr
.kw,kotc.com.kw
.ky,icta.ky
.kz,google.kz
.la,google.la
.lb,finance.gov.lb
.lc,nic.lc
.li,google.li
.lk,google.lk
.lr,micat.gov.lr
.ls,google.co.ls
.lt,google.lt
.lu,google.lu
.lv,google.lv
.ly,bit.ly
.ma,google.ma
.mc,rivieraradio.mc
.md,google.md
.me,google.me
.mg,google.mg
.mh,
.mk,airports.com.mk
.ml,sotelma.ml
.mm,
.mn,google.mn
.mo,umac.mo
.mp,laurel.mp
.mq,
.mr,nic.mr
.ms,google.ms
.mt,nic.org.mt
.mu,google.mu
.mv,google.mv
.mw,google.mw
.mx,google.com.mx
.my,mynic.net.my
.mz,norway.org.mz
.na,info.na
.nc,cctld.nc
.ne,intnet.ne
.nf,google.nf
.ng,google.com.ng
.ni,google.com.ni
.nl,google.nl
.no,google.no
.np,google.com.np
.nr,google.nr
.nu,google.nu
.nz,google.co.nz
.om,google.com.om
.pa,google.com.pago
.pe,google.com.pe
.pf,opt.pf
.pg,unitech.ac.pg
.ph,google.ph
.pk,google.pk
.co.pl,google.co.pl
.pl,google.pl
.pm,nic.pm
.pn,google.pn
.pr,google.pr
.ps,www.ps
.pt,google.pt
.pw,start.pw
.py,google.com.py
.qa,google.com.qa
.re,google.re
.ro,google.ro
.rs,google.rs
.edu.ru,school.edu.ru
.ru,google.ru
.rw,google.rw
.sa,saudinic.net.sa
.sb.google.com.sb
.sc,google.sc
.sd,isoc.sd
.se,google.se
.sg,google.sg
.sh,google.sh
.si,google.si
.sj,
.sk,google.sk
.sl,google.sl
.sm,google.sm
.sn,google.sn
.so,nic.so
.sr,google.sr
.st,google.st
.su,google.su
.sv,google.com.sv
.sy,ste.gov.sy
.sz,sispa.org.sz
.tc,biz.tc
.td,sotel.td
.tf,
.tg,netmaster.tg
.th,google.co.th
.tj,google.com.tj
.tk,google.tk
.tl,google.tl
.tm,google.tm
.tn,google.tn
.to,google.to
.tp,www.google.tp
.tr,google.com.tr
.tt,google.tt
.tv,wordpress.tv
.tw,google.tw
.tz,google.co.tz
.ua,google.ua
.ug,google.ug
.ac.uk,jobs.ac.uk
.bl.uk,catalogue.bl.uk
.british-library.uk,
.gov.uk,statistics.gov.uk
.icnet.uk,cgal.icnet.uk
.jet.uk,
.mod.uk,
.nhs.uk,
.nls.uk,
.parliament.uk,publications.parliament.uk
.police.uk,sussex.police.uk
.uk,amazon.co.uk
.fed.us,fs.fed.us
.us,govtrack.us
.com.uy,google.com.uy
.uy,wrm.org.uy
.uz,google.co.uz
.va,vatican.va
.vc,google.vc
.ve,google.co.ve
.vg,google.vg
.vi,career.vi
.vn,dot.vn
.vu,google.vu
.wf,nic.wf
.ws,google.ws
.ye,centralbank.gov.ye
.yt,nic.yt
.yu,nic.yu
.ac.za,unisa.ac.za
.co.za,google.co.za
.gov.za,labour.gov.za
.org.za,anc.org.za
.za,gov.za
.zm,zamnet.zm
.zw,google.co.zw
2 changes: 2 additions & 0 deletions utils/tlds/domain.ac.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Domain "WWW.AC" - Not available
For more information please go to http://www.nic.ac/
Loading

0 comments on commit 97e7a9a

Please sign in to comment.