whois 3.6.5 → 4.0.0.pre.beta1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +15 -0
- data/CONTRIBUTING.md +0 -2
- data/README.md +8 -3
- data/bin/whoisrb +5 -5
- data/data/tld.json +437 -216
- data/lib/whois.rb +1 -75
- data/lib/whois/errors.rb +0 -44
- data/lib/whois/record.rb +0 -237
- data/lib/whois/record/part.rb +20 -4
- data/lib/whois/server/adapters/base.rb +18 -3
- data/lib/whois/version.rb +1 -13
- data/whois.gemspec +9 -16
- metadata +7 -295
- data/lib/whois/record/contact.rb +0 -65
- data/lib/whois/record/nameserver.rb +0 -48
- data/lib/whois/record/parser.rb +0 -398
- data/lib/whois/record/parser/base.rb +0 -399
- data/lib/whois/record/parser/base_afilias.rb +0 -141
- data/lib/whois/record/parser/base_afilias2.rb +0 -138
- data/lib/whois/record/parser/base_cocca.rb +0 -99
- data/lib/whois/record/parser/base_cocca2.rb +0 -100
- data/lib/whois/record/parser/base_icann_compliant.rb +0 -159
- data/lib/whois/record/parser/base_icb.rb +0 -94
- data/lib/whois/record/parser/base_iisse.rb +0 -113
- data/lib/whois/record/parser/base_shared1.rb +0 -110
- data/lib/whois/record/parser/base_shared2.rb +0 -129
- data/lib/whois/record/parser/base_shared3.rb +0 -129
- data/lib/whois/record/parser/base_verisign.rb +0 -108
- data/lib/whois/record/parser/base_whoisd.rb +0 -147
- data/lib/whois/record/parser/blank.rb +0 -37
- data/lib/whois/record/parser/capetown-whois.registry.net.za.rb +0 -27
- data/lib/whois/record/parser/ccwhois.ksregistry.net.rb +0 -28
- data/lib/whois/record/parser/ccwhois.verisign-grs.com.rb +0 -27
- data/lib/whois/record/parser/durban-whois.registry.net.za.rb +0 -27
- data/lib/whois/record/parser/example.rb +0 -166
- data/lib/whois/record/parser/jobswhois.verisign-grs.com.rb +0 -27
- data/lib/whois/record/parser/joburg-whois.registry.net.za.rb +0 -27
- data/lib/whois/record/parser/kero.yachay.pe.rb +0 -88
- data/lib/whois/record/parser/org-whois.registry.net.za.rb +0 -27
- data/lib/whois/record/parser/whois.1und1.info.rb +0 -30
- data/lib/whois/record/parser/whois.35.com.rb +0 -26
- data/lib/whois/record/parser/whois.aeda.net.ae.rb +0 -66
- data/lib/whois/record/parser/whois.aero.rb +0 -59
- data/lib/whois/record/parser/whois.afilias-grs.info.rb +0 -23
- data/lib/whois/record/parser/whois.afilias.net.rb +0 -28
- data/lib/whois/record/parser/whois.ai.rb +0 -64
- data/lib/whois/record/parser/whois.amnic.net.rb +0 -81
- data/lib/whois/record/parser/whois.ascio.com.rb +0 -31
- data/lib/whois/record/parser/whois.ati.tn.rb +0 -118
- data/lib/whois/record/parser/whois.audns.net.au.rb +0 -121
- data/lib/whois/record/parser/whois.ax.rb +0 -66
- data/lib/whois/record/parser/whois.biz.rb +0 -27
- data/lib/whois/record/parser/whois.bnnic.bn.rb +0 -77
- data/lib/whois/record/parser/whois.cat.rb +0 -79
- data/lib/whois/record/parser/whois.cctld.by.rb +0 -96
- data/lib/whois/record/parser/whois.cctld.uz.rb +0 -83
- data/lib/whois/record/parser/whois.centralnic.com.rb +0 -142
- data/lib/whois/record/parser/whois.cira.ca.rb +0 -194
- data/lib/whois/record/parser/whois.cmc.iq.rb +0 -27
- data/lib/whois/record/parser/whois.cnnic.cn.rb +0 -110
- data/lib/whois/record/parser/whois.co.ca.rb +0 -78
- data/lib/whois/record/parser/whois.co.pl.rb +0 -84
- data/lib/whois/record/parser/whois.co.ug.rb +0 -84
- data/lib/whois/record/parser/whois.comlaude.com.rb +0 -115
- data/lib/whois/record/parser/whois.corporatedomains.com.rb +0 -30
- data/lib/whois/record/parser/whois.denic.de.rb +0 -166
- data/lib/whois/record/parser/whois.dk-hostmaster.dk.rb +0 -82
- data/lib/whois/record/parser/whois.dns.be.rb +0 -122
- data/lib/whois/record/parser/whois.dns.hr.rb +0 -99
- data/lib/whois/record/parser/whois.dns.lu.rb +0 -128
- data/lib/whois/record/parser/whois.dns.pl.rb +0 -153
- data/lib/whois/record/parser/whois.dns.pt.rb +0 -79
- data/lib/whois/record/parser/whois.domain-registry.nl.rb +0 -125
- data/lib/whois/record/parser/whois.domain.kg.rb +0 -78
- data/lib/whois/record/parser/whois.domainregistry.ie.rb +0 -123
- data/lib/whois/record/parser/whois.domreg.lt.rb +0 -70
- data/lib/whois/record/parser/whois.donuts.co.rb +0 -64
- data/lib/whois/record/parser/whois.dot.cf.rb +0 -73
- data/lib/whois/record/parser/whois.dot.tk.rb +0 -72
- data/lib/whois/record/parser/whois.dotgov.gov.rb +0 -63
- data/lib/whois/record/parser/whois.dotmobiregistry.net.rb +0 -23
- data/lib/whois/record/parser/whois.dotpostregistry.net.rb +0 -27
- data/lib/whois/record/parser/whois.dotproregistry.net.rb +0 -41
- data/lib/whois/record/parser/whois.dreamhost.com.rb +0 -25
- data/lib/whois/record/parser/whois.educause.edu.rb +0 -202
- data/lib/whois/record/parser/whois.eenet.ee.rb +0 -74
- data/lib/whois/record/parser/whois.enom.com.rb +0 -36
- data/lib/whois/record/parser/whois.eu.org.rb +0 -60
- data/lib/whois/record/parser/whois.eu.rb +0 -132
- data/lib/whois/record/parser/whois.fi.rb +0 -119
- data/lib/whois/record/parser/whois.gandi.net.rb +0 -32
- data/lib/whois/record/parser/whois.gg.rb +0 -33
- data/lib/whois/record/parser/whois.godaddy.com.rb +0 -113
- data/lib/whois/record/parser/whois.gov.za.rb +0 -64
- data/lib/whois/record/parser/whois.hkirc.hk.rb +0 -73
- data/lib/whois/record/parser/whois.iana.org.rb +0 -104
- data/lib/whois/record/parser/whois.iis.nu.rb +0 -28
- data/lib/whois/record/parser/whois.iis.se.rb +0 -28
- data/lib/whois/record/parser/whois.in.ua.rb +0 -77
- data/lib/whois/record/parser/whois.inregistry.net.rb +0 -29
- data/lib/whois/record/parser/whois.isnic.is.rb +0 -72
- data/lib/whois/record/parser/whois.isoc.org.il.rb +0 -77
- data/lib/whois/record/parser/whois.ja.net.rb +0 -77
- data/lib/whois/record/parser/whois.je.rb +0 -27
- data/lib/whois/record/parser/whois.jprs.jp.rb +0 -105
- data/lib/whois/record/parser/whois.kenic.or.ke.rb +0 -93
- data/lib/whois/record/parser/whois.kr.rb +0 -81
- data/lib/whois/record/parser/whois.markmonitor.com.rb +0 -38
- data/lib/whois/record/parser/whois.monic.mo.rb +0 -85
- data/lib/whois/record/parser/whois.museum.rb +0 -81
- data/lib/whois/record/parser/whois.mynic.my.rb +0 -74
- data/lib/whois/record/parser/whois.na-nic.com.na.rb +0 -23
- data/lib/whois/record/parser/whois.nc.rb +0 -124
- data/lib/whois/record/parser/whois.netcom.cm.rb +0 -28
- data/lib/whois/record/parser/whois.networksolutions.com.rb +0 -39
- data/lib/whois/record/parser/whois.nic.ac.rb +0 -27
- data/lib/whois/record/parser/whois.nic.af.rb +0 -27
- data/lib/whois/record/parser/whois.nic.ag.rb +0 -23
- data/lib/whois/record/parser/whois.nic.as.rb +0 -65
- data/lib/whois/record/parser/whois.nic.asia.rb +0 -109
- data/lib/whois/record/parser/whois.nic.at.rb +0 -66
- data/lib/whois/record/parser/whois.nic.bj.rb +0 -128
- data/lib/whois/record/parser/whois.nic.bo.rb +0 -75
- data/lib/whois/record/parser/whois.nic.cd.rb +0 -36
- data/lib/whois/record/parser/whois.nic.ch.rb +0 -111
- data/lib/whois/record/parser/whois.nic.ci.rb +0 -72
- data/lib/whois/record/parser/whois.nic.cl.rb +0 -73
- data/lib/whois/record/parser/whois.nic.co.rb +0 -27
- data/lib/whois/record/parser/whois.nic.college.rb +0 -27
- data/lib/whois/record/parser/whois.nic.coop.rb +0 -72
- data/lib/whois/record/parser/whois.nic.cx.rb +0 -27
- data/lib/whois/record/parser/whois.nic.cz.rb +0 -44
- data/lib/whois/record/parser/whois.nic.design.rb +0 -27
- data/lib/whois/record/parser/whois.nic.dm.rb +0 -27
- data/lib/whois/record/parser/whois.nic.dz.rb +0 -60
- data/lib/whois/record/parser/whois.nic.ec.rb +0 -36
- data/lib/whois/record/parser/whois.nic.es.rb +0 -107
- data/lib/whois/record/parser/whois.nic.fo.rb +0 -45
- data/lib/whois/record/parser/whois.nic.fr.rb +0 -176
- data/lib/whois/record/parser/whois.nic.gd.rb +0 -33
- data/lib/whois/record/parser/whois.nic.gl.rb +0 -27
- data/lib/whois/record/parser/whois.nic.gs.rb +0 -33
- data/lib/whois/record/parser/whois.nic.hn.rb +0 -27
- data/lib/whois/record/parser/whois.nic.ht.rb +0 -27
- data/lib/whois/record/parser/whois.nic.hu.rb +0 -80
- data/lib/whois/record/parser/whois.nic.im.rb +0 -68
- data/lib/whois/record/parser/whois.nic.io.rb +0 -50
- data/lib/whois/record/parser/whois.nic.ir.rb +0 -68
- data/lib/whois/record/parser/whois.nic.it.rb +0 -161
- data/lib/whois/record/parser/whois.nic.ki.rb +0 -27
- data/lib/whois/record/parser/whois.nic.kz.rb +0 -69
- data/lib/whois/record/parser/whois.nic.la.rb +0 -27
- data/lib/whois/record/parser/whois.nic.li.rb +0 -66
- data/lib/whois/record/parser/whois.nic.lk.rb +0 -111
- data/lib/whois/record/parser/whois.nic.lv.rb +0 -69
- data/lib/whois/record/parser/whois.nic.ly.rb +0 -78
- data/lib/whois/record/parser/whois.nic.md.rb +0 -96
- data/lib/whois/record/parser/whois.nic.me.rb +0 -87
- data/lib/whois/record/parser/whois.nic.mg.rb +0 -33
- data/lib/whois/record/parser/whois.nic.ms.rb +0 -27
- data/lib/whois/record/parser/whois.nic.mu.rb +0 -27
- data/lib/whois/record/parser/whois.nic.mx.rb +0 -81
- data/lib/whois/record/parser/whois.nic.name.rb +0 -70
- data/lib/whois/record/parser/whois.nic.net.ng.rb +0 -29
- data/lib/whois/record/parser/whois.nic.net.sa.rb +0 -72
- data/lib/whois/record/parser/whois.nic.net.sb.rb +0 -33
- data/lib/whois/record/parser/whois.nic.nf.rb +0 -27
- data/lib/whois/record/parser/whois.nic.org.uy.rb +0 -77
- data/lib/whois/record/parser/whois.nic.pr.rb +0 -86
- data/lib/whois/record/parser/whois.nic.priv.at.rb +0 -64
- data/lib/whois/record/parser/whois.nic.pw.rb +0 -27
- data/lib/whois/record/parser/whois.nic.sh.rb +0 -27
- data/lib/whois/record/parser/whois.nic.sl.rb +0 -78
- data/lib/whois/record/parser/whois.nic.sm.rb +0 -78
- data/lib/whois/record/parser/whois.nic.sn.rb +0 -115
- data/lib/whois/record/parser/whois.nic.so.rb +0 -72
- data/lib/whois/record/parser/whois.nic.space.rb +0 -27
- data/lib/whois/record/parser/whois.nic.st.rb +0 -74
- data/lib/whois/record/parser/whois.nic.tc.rb +0 -27
- data/lib/whois/record/parser/whois.nic.tech.rb +0 -27
- data/lib/whois/record/parser/whois.nic.tel.rb +0 -27
- data/lib/whois/record/parser/whois.nic.tl.rb +0 -27
- data/lib/whois/record/parser/whois.nic.tm.rb +0 -33
- data/lib/whois/record/parser/whois.nic.tr.rb +0 -161
- data/lib/whois/record/parser/whois.nic.travel.rb +0 -27
- data/lib/whois/record/parser/whois.nic.tv.rb +0 -27
- data/lib/whois/record/parser/whois.nic.uk.rb +0 -179
- data/lib/whois/record/parser/whois.nic.us.rb +0 -27
- data/lib/whois/record/parser/whois.nic.ve.rb +0 -89
- data/lib/whois/record/parser/whois.nic.xxx.rb +0 -44
- data/lib/whois/record/parser/whois.nic.xyz.rb +0 -22
- data/lib/whois/record/parser/whois.norid.no.rb +0 -63
- data/lib/whois/record/parser/whois.pairnic.com.rb +0 -30
- data/lib/whois/record/parser/whois.pandi.or.id.rb +0 -27
- data/lib/whois/record/parser/whois.pir.org.rb +0 -92
- data/lib/whois/record/parser/whois.pnina.ps.rb +0 -33
- data/lib/whois/record/parser/whois.register.bg.rb +0 -85
- data/lib/whois/record/parser/whois.register.com.rb +0 -32
- data/lib/whois/record/parser/whois.register.si.rb +0 -75
- data/lib/whois/record/parser/whois.registre.ma.rb +0 -65
- data/lib/whois/record/parser/whois.registro.br.rb +0 -75
- data/lib/whois/record/parser/whois.registry.gy.rb +0 -27
- data/lib/whois/record/parser/whois.registry.hm.rb +0 -74
- data/lib/whois/record/parser/whois.registry.net.za.rb +0 -145
- data/lib/whois/record/parser/whois.registry.om.rb +0 -42
- data/lib/whois/record/parser/whois.registry.qa.rb +0 -27
- data/lib/whois/record/parser/whois.ripe.net.rb +0 -70
- data/lib/whois/record/parser/whois.rnids.rs.rb +0 -136
- data/lib/whois/record/parser/whois.rotld.ro.rb +0 -67
- data/lib/whois/record/parser/whois.rrpproxy.net.rb +0 -34
- data/lib/whois/record/parser/whois.safenames.net.rb +0 -50
- data/lib/whois/record/parser/whois.schlund.info.rb +0 -36
- data/lib/whois/record/parser/whois.sgnic.sg.rb +0 -89
- data/lib/whois/record/parser/whois.sk-nic.sk.rb +0 -103
- data/lib/whois/record/parser/whois.smallregistry.net.rb +0 -133
- data/lib/whois/record/parser/whois.srs.net.nz.rb +0 -161
- data/lib/whois/record/parser/whois.sx.rb +0 -134
- data/lib/whois/record/parser/whois.tcinet.ru.rb +0 -116
- data/lib/whois/record/parser/whois.thnic.co.th.rb +0 -81
- data/lib/whois/record/parser/whois.tld.ee.rb +0 -136
- data/lib/whois/record/parser/whois.tld.sy.rb +0 -36
- data/lib/whois/record/parser/whois.tonic.to.rb +0 -88
- data/lib/whois/record/parser/whois.tucows.com.rb +0 -30
- data/lib/whois/record/parser/whois.twnic.net.tw.rb +0 -74
- data/lib/whois/record/parser/whois.tznic.or.tz.rb +0 -27
- data/lib/whois/record/parser/whois.ua.rb +0 -242
- data/lib/whois/record/parser/whois.udag.net.rb +0 -30
- data/lib/whois/record/parser/whois.uniregistry.net.rb +0 -68
- data/lib/whois/record/parser/whois.usp.ac.fj.rb +0 -74
- data/lib/whois/record/parser/whois.verisign-grs.com.rb +0 -51
- data/lib/whois/record/parser/whois.website.ws.rb +0 -76
- data/lib/whois/record/parser/whois.wildwestdomains.com.rb +0 -37
- data/lib/whois/record/parser/whois.yoursrs.com.rb +0 -127
- data/lib/whois/record/parser/whois.za.net.rb +0 -74
- data/lib/whois/record/parser/whois.za.org.rb +0 -74
- data/lib/whois/record/parser/whois1.nic.bi.rb +0 -27
- data/lib/whois/record/parser/za_central_registry.rb +0 -70
- data/lib/whois/record/registrar.rb +0 -34
- data/lib/whois/record/scanners/base.rb +0 -126
- data/lib/whois/record/scanners/base_afilias.rb +0 -63
- data/lib/whois/record/scanners/base_cocca2.rb +0 -55
- data/lib/whois/record/scanners/base_icann_compliant.rb +0 -57
- data/lib/whois/record/scanners/base_iisse.rb +0 -48
- data/lib/whois/record/scanners/base_shared1.rb +0 -43
- data/lib/whois/record/scanners/base_shared2.rb +0 -47
- data/lib/whois/record/scanners/base_shared3.rb +0 -49
- data/lib/whois/record/scanners/base_whoisd.rb +0 -56
- data/lib/whois/record/scanners/iana.rb +0 -101
- data/lib/whois/record/scanners/scannable.rb +0 -77
- data/lib/whois/record/scanners/verisign.rb +0 -112
- data/lib/whois/record/scanners/whois.ati.tn.rb +0 -44
- data/lib/whois/record/scanners/whois.audns.net.au.rb +0 -37
- data/lib/whois/record/scanners/whois.cctld.by.rb +0 -47
- data/lib/whois/record/scanners/whois.centralnic.com.rb +0 -44
- data/lib/whois/record/scanners/whois.cira.ca.rb +0 -84
- data/lib/whois/record/scanners/whois.cnnic.cn.rb +0 -54
- data/lib/whois/record/scanners/whois.denic.de.rb +0 -108
- data/lib/whois/record/scanners/whois.dns.hr.rb +0 -37
- data/lib/whois/record/scanners/whois.domainregistry.ie.rb +0 -58
- data/lib/whois/record/scanners/whois.fi.rb +0 -51
- data/lib/whois/record/scanners/whois.nc.rb +0 -44
- data/lib/whois/record/scanners/whois.nic.cz.rb +0 -34
- data/lib/whois/record/scanners/whois.nic.it.rb +0 -104
- data/lib/whois/record/scanners/whois.pir.org.rb +0 -29
- data/lib/whois/record/scanners/whois.registry.net.za.rb +0 -104
- data/lib/whois/record/scanners/whois.rnids.rs.rb +0 -64
- data/lib/whois/record/scanners/whois.smallregistry.net.rb +0 -61
- data/lib/whois/record/scanners/whois.srs.net.nz.rb +0 -35
- data/lib/whois/record/scanners/whois.sx.rb +0 -49
- data/lib/whois/record/scanners/whois.tld.ee.rb +0 -57
- data/lib/whois/record/scanners/whois.tucows.com.rb +0 -35
- data/lib/whois/record/scanners/whois.yoursrs.com.rb +0 -36
- data/lib/whois/record/super_struct.rb +0 -62
@@ -1,134 +0,0 @@
|
|
1
|
-
#--
|
2
|
-
# Ruby Whois
|
3
|
-
#
|
4
|
-
# An intelligent pure Ruby WHOIS client and parser.
|
5
|
-
#
|
6
|
-
# Copyright (c) 2009-2015 Simone Carletti <weppos@weppos.net>
|
7
|
-
#++
|
8
|
-
|
9
|
-
|
10
|
-
require 'whois/record/parser/base'
|
11
|
-
require 'whois/record/scanners/whois.sx.rb'
|
12
|
-
|
13
|
-
|
14
|
-
module Whois
|
15
|
-
class Record
|
16
|
-
class Parser
|
17
|
-
|
18
|
-
# Parser for the whois.sx server.
|
19
|
-
#
|
20
|
-
# @see Whois::Record::Parser::Example
|
21
|
-
# The Example parser for the list of all available methods.
|
22
|
-
#
|
23
|
-
class WhoisSx < Base
|
24
|
-
include Scanners::Scannable
|
25
|
-
|
26
|
-
self.scanner = Scanners::WhoisSx
|
27
|
-
|
28
|
-
|
29
|
-
property_supported :disclaimer do
|
30
|
-
node("field:disclaimer")
|
31
|
-
end
|
32
|
-
|
33
|
-
|
34
|
-
property_supported :domain do
|
35
|
-
node("Domain Name", &:downcase)
|
36
|
-
end
|
37
|
-
|
38
|
-
property_supported :domain_id do
|
39
|
-
node("Domain ID")
|
40
|
-
end
|
41
|
-
|
42
|
-
|
43
|
-
property_supported :status do
|
44
|
-
case (s = node("Domain Status", &:downcase))
|
45
|
-
when "available"
|
46
|
-
:available
|
47
|
-
when "ok"
|
48
|
-
:registered
|
49
|
-
when "premium name"
|
50
|
-
:unavailable
|
51
|
-
else
|
52
|
-
Whois.bug!(ParserError, "Unknown status `#{s}'.")
|
53
|
-
end
|
54
|
-
end
|
55
|
-
|
56
|
-
property_supported :available? do
|
57
|
-
status == :available
|
58
|
-
end
|
59
|
-
|
60
|
-
property_supported :registered? do
|
61
|
-
status == :registered
|
62
|
-
end
|
63
|
-
|
64
|
-
|
65
|
-
property_supported :created_on do
|
66
|
-
node("Creation Date") { |value| parse_time(value) }
|
67
|
-
end
|
68
|
-
|
69
|
-
property_supported :updated_on do
|
70
|
-
node("Updated Date") { |value| parse_time(value) }
|
71
|
-
end
|
72
|
-
|
73
|
-
property_supported :expires_on do
|
74
|
-
node("Registry Expiry Date") { |value| parse_time(value) }
|
75
|
-
end
|
76
|
-
|
77
|
-
|
78
|
-
property_supported :registrar do
|
79
|
-
node("Sponsoring Registrar") do |value|
|
80
|
-
Record::Registrar.new(
|
81
|
-
:name => value
|
82
|
-
)
|
83
|
-
end
|
84
|
-
end
|
85
|
-
|
86
|
-
|
87
|
-
property_supported :registrant_contacts do
|
88
|
-
build_contact("Registrant", Whois::Record::Contact::TYPE_REGISTRANT)
|
89
|
-
end
|
90
|
-
|
91
|
-
property_supported :admin_contacts do
|
92
|
-
build_contact("Admin", Whois::Record::Contact::TYPE_ADMINISTRATIVE)
|
93
|
-
end
|
94
|
-
|
95
|
-
property_supported :technical_contacts do
|
96
|
-
build_contact("Tech", Whois::Record::Contact::TYPE_TECHNICAL)
|
97
|
-
end
|
98
|
-
|
99
|
-
|
100
|
-
property_supported :nameservers do
|
101
|
-
Array.wrap(node("Name Server")).map do |name|
|
102
|
-
Record::Nameserver.new(:name => name)
|
103
|
-
end
|
104
|
-
end
|
105
|
-
|
106
|
-
|
107
|
-
private
|
108
|
-
|
109
|
-
def parse_time(value)
|
110
|
-
# Hack to remove usec. Do you know a better way?
|
111
|
-
Time.utc(*Time.parse(value).to_a)
|
112
|
-
end
|
113
|
-
|
114
|
-
def build_contact(element, type)
|
115
|
-
node("#{element} ID") do |id|
|
116
|
-
Record::Contact.new(
|
117
|
-
:type => type,
|
118
|
-
:id => id,
|
119
|
-
:name => node("#{element} Name"),
|
120
|
-
:organization => node("#{element} Organization"),
|
121
|
-
:address => node("#{element} Street"),
|
122
|
-
:city => node("#{element} City"),
|
123
|
-
:zip => node("#{element} Postal Code"),
|
124
|
-
:country => node("#{element} Country"),
|
125
|
-
:email => node("#{element} Email")
|
126
|
-
)
|
127
|
-
end
|
128
|
-
end
|
129
|
-
|
130
|
-
end
|
131
|
-
|
132
|
-
end
|
133
|
-
end
|
134
|
-
end
|
@@ -1,116 +0,0 @@
|
|
1
|
-
#--
|
2
|
-
# Ruby Whois
|
3
|
-
#
|
4
|
-
# An intelligent pure Ruby WHOIS client and parser.
|
5
|
-
#
|
6
|
-
# Copyright (c) 2009-2015 Simone Carletti <weppos@weppos.net>
|
7
|
-
#++
|
8
|
-
|
9
|
-
|
10
|
-
require 'whois/record/parser/base'
|
11
|
-
|
12
|
-
|
13
|
-
module Whois
|
14
|
-
class Record
|
15
|
-
class Parser
|
16
|
-
|
17
|
-
# Parser for the whois.tcinet.ru server.
|
18
|
-
#
|
19
|
-
# @note This parser is just a stub and provides only a few basic methods
|
20
|
-
# to check for domain availability and get domain status.
|
21
|
-
# Please consider to contribute implementing missing methods.
|
22
|
-
#
|
23
|
-
# @see Whois::Record::Parser::Example
|
24
|
-
# The Example parser for the list of all available methods.
|
25
|
-
#
|
26
|
-
class WhoisTcinetRu < Base
|
27
|
-
|
28
|
-
property_supported :domain do
|
29
|
-
if content_for_scanner =~ /domain:\s+(.+?)\n/
|
30
|
-
$1.downcase
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
property_not_supported :domain_id
|
35
|
-
|
36
|
-
|
37
|
-
property_supported :status do
|
38
|
-
if content_for_scanner =~ /state:\s+(.+?)\n/
|
39
|
-
$1.split(",").map(&:strip)
|
40
|
-
else
|
41
|
-
[]
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
45
|
-
property_supported :available? do
|
46
|
-
!!(content_for_scanner =~ /No entries found/)
|
47
|
-
end
|
48
|
-
|
49
|
-
property_supported :registered? do
|
50
|
-
!available?
|
51
|
-
end
|
52
|
-
|
53
|
-
|
54
|
-
property_supported :created_on do
|
55
|
-
if content_for_scanner =~ /created:\s+(.*)\n/
|
56
|
-
Time.parse($1)
|
57
|
-
end
|
58
|
-
end
|
59
|
-
|
60
|
-
property_not_supported :updated_on
|
61
|
-
|
62
|
-
property_supported :expires_on do
|
63
|
-
if content_for_scanner =~ /paid-till:\s+(.*)\n/
|
64
|
-
Time.parse($1)
|
65
|
-
end
|
66
|
-
end
|
67
|
-
|
68
|
-
|
69
|
-
property_supported :registrar do
|
70
|
-
if content_for_scanner =~ /registrar:\s+(.*)\n/
|
71
|
-
Record::Registrar.new(
|
72
|
-
:id => $1
|
73
|
-
)
|
74
|
-
end
|
75
|
-
end
|
76
|
-
|
77
|
-
|
78
|
-
property_supported :admin_contacts do
|
79
|
-
url = content_for_scanner[/admin-contact:\s+(.+)\n/, 1]
|
80
|
-
email = content_for_scanner[/e-mail:\s+(.+)\n/, 1]
|
81
|
-
contact = if url or email
|
82
|
-
Record::Contact.new(
|
83
|
-
:type => Record::Contact::TYPE_ADMINISTRATIVE,
|
84
|
-
:url => url,
|
85
|
-
:email => email,
|
86
|
-
:name => content_for_scanner[/person:\s+(.+)\n/, 1],
|
87
|
-
:organization => content_for_scanner[/org:\s+(.+)\n/, 1],
|
88
|
-
:phone => content_for_scanner[/phone:\s+(.+)\n/, 1],
|
89
|
-
:fax => content_for_scanner[/fax-no:\s+(.+)\n/, 1]
|
90
|
-
)
|
91
|
-
end
|
92
|
-
Array.wrap(contact)
|
93
|
-
end
|
94
|
-
|
95
|
-
property_not_supported :registrant_contacts
|
96
|
-
|
97
|
-
property_not_supported :technical_contacts
|
98
|
-
|
99
|
-
|
100
|
-
# Nameservers are listed in the following formats:
|
101
|
-
#
|
102
|
-
# nserver: ns.masterhost.ru.
|
103
|
-
# nserver: ns.masterhost.ru. 217.16.20.30
|
104
|
-
#
|
105
|
-
property_supported :nameservers do
|
106
|
-
content_for_scanner.scan(/nserver:\s+(.+)\n/).flatten.map do |line|
|
107
|
-
name, ipv4 = line.split(/\s+/)
|
108
|
-
Record::Nameserver.new(:name => name.chomp("."), :ipv4 => ipv4)
|
109
|
-
end
|
110
|
-
end
|
111
|
-
|
112
|
-
end
|
113
|
-
|
114
|
-
end
|
115
|
-
end
|
116
|
-
end
|
@@ -1,81 +0,0 @@
|
|
1
|
-
#--
|
2
|
-
# Ruby Whois
|
3
|
-
#
|
4
|
-
# An intelligent pure Ruby WHOIS client and parser.
|
5
|
-
#
|
6
|
-
# Copyright (c) 2009-2015 Simone Carletti <weppos@weppos.net>
|
7
|
-
#++
|
8
|
-
|
9
|
-
|
10
|
-
require 'whois/record/parser/base'
|
11
|
-
|
12
|
-
|
13
|
-
module Whois
|
14
|
-
class Record
|
15
|
-
class Parser
|
16
|
-
|
17
|
-
#
|
18
|
-
# = whois.thnic.co.th parser
|
19
|
-
#
|
20
|
-
# Parser for the whois.thnic.co.th server.
|
21
|
-
#
|
22
|
-
# NOTE: This parser is just a stub and provides only a few basic methods
|
23
|
-
# to check for domain availability and get domain status.
|
24
|
-
# Please consider to contribute implementing missing methods.
|
25
|
-
# See WhoisNicIt parser for an explanation of all available methods
|
26
|
-
# and examples.
|
27
|
-
#
|
28
|
-
class WhoisThnicCoTh < Base
|
29
|
-
|
30
|
-
property_supported :status do
|
31
|
-
if content_for_scanner =~ /Status: (.+?)\n/
|
32
|
-
case $1.downcase
|
33
|
-
when "active"
|
34
|
-
:registered
|
35
|
-
else
|
36
|
-
Whois.bug!(ParserError, "Unknown status `#{$1}'.")
|
37
|
-
end
|
38
|
-
else
|
39
|
-
:available
|
40
|
-
end
|
41
|
-
end
|
42
|
-
|
43
|
-
property_supported :available? do
|
44
|
-
!!(content_for_scanner =~ /^% No match for/)
|
45
|
-
end
|
46
|
-
|
47
|
-
property_supported :registered? do
|
48
|
-
!available?
|
49
|
-
end
|
50
|
-
|
51
|
-
|
52
|
-
property_supported :created_on do
|
53
|
-
if content_for_scanner =~ /^Created date: (.+?)\n/
|
54
|
-
Time.parse($1)
|
55
|
-
end
|
56
|
-
end
|
57
|
-
|
58
|
-
property_supported :updated_on do
|
59
|
-
if content_for_scanner =~ /^Updated date: (.+?)\n/
|
60
|
-
Time.parse($1)
|
61
|
-
end
|
62
|
-
end
|
63
|
-
|
64
|
-
property_supported :expires_on do
|
65
|
-
if content_for_scanner =~ /^Exp date: (.+?)\n/
|
66
|
-
Time.parse($1)
|
67
|
-
end
|
68
|
-
end
|
69
|
-
|
70
|
-
|
71
|
-
property_supported :nameservers do
|
72
|
-
content_for_scanner.scan(/Name Server:\s+(.+)\n/).flatten.map do |name|
|
73
|
-
Record::Nameserver.new(:name => name.downcase)
|
74
|
-
end
|
75
|
-
end
|
76
|
-
|
77
|
-
end
|
78
|
-
|
79
|
-
end
|
80
|
-
end
|
81
|
-
end
|
@@ -1,136 +0,0 @@
|
|
1
|
-
#--
|
2
|
-
# Ruby Whois
|
3
|
-
#
|
4
|
-
# An intelligent pure Ruby WHOIS client and parser.
|
5
|
-
#
|
6
|
-
# Copyright (c) 2009-2015 Simone Carletti <weppos@weppos.net>
|
7
|
-
#++
|
8
|
-
|
9
|
-
require 'whois/record/parser/base'
|
10
|
-
require 'whois/record/scanners/whois.tld.ee'
|
11
|
-
|
12
|
-
module Whois
|
13
|
-
class Record
|
14
|
-
class Parser
|
15
|
-
|
16
|
-
# Parser for the whois.tld.ee server.
|
17
|
-
#
|
18
|
-
# @see Whois::Record::Parser::Example
|
19
|
-
# The Example parser for the list of all available methods.
|
20
|
-
#
|
21
|
-
class WhoisTldEe < Base
|
22
|
-
include Scanners::Scannable
|
23
|
-
|
24
|
-
self.scanner = Scanners::WhoisTldEe
|
25
|
-
|
26
|
-
|
27
|
-
property_supported :disclaimer do
|
28
|
-
node('field:disclaimer').to_s.strip
|
29
|
-
end
|
30
|
-
|
31
|
-
|
32
|
-
property_supported :domain do
|
33
|
-
if (content_for_scanner =~ /^Domain:\nname:\s+(.+)\n/)
|
34
|
-
$1.to_s.strip.downcase
|
35
|
-
end
|
36
|
-
end
|
37
|
-
|
38
|
-
property_not_supported :domain_id
|
39
|
-
|
40
|
-
|
41
|
-
property_supported :status do
|
42
|
-
if content_for_scanner =~ /status:\s+(.+?)\n/
|
43
|
-
case $1
|
44
|
-
when 'ok (paid and in zone)'
|
45
|
-
:registered
|
46
|
-
when 'expired'
|
47
|
-
:expired
|
48
|
-
else
|
49
|
-
$1
|
50
|
-
end
|
51
|
-
else
|
52
|
-
:available
|
53
|
-
end
|
54
|
-
end
|
55
|
-
|
56
|
-
property_supported :available? do
|
57
|
-
!!node('status:available')
|
58
|
-
end
|
59
|
-
|
60
|
-
property_supported :registered? do
|
61
|
-
!available?
|
62
|
-
end
|
63
|
-
|
64
|
-
|
65
|
-
property_supported :created_on do
|
66
|
-
if content_for_scanner =~ /registered:\s+(.+?)\n/
|
67
|
-
Time.parse($1)
|
68
|
-
end
|
69
|
-
end
|
70
|
-
|
71
|
-
property_supported :updated_on do
|
72
|
-
if content_for_scanner =~ /changed:\s+(.+?)\n/
|
73
|
-
Time.parse($1)
|
74
|
-
end
|
75
|
-
end
|
76
|
-
|
77
|
-
property_supported :expires_on do
|
78
|
-
if content_for_scanner =~ /expire:\s+(.+?)\n/
|
79
|
-
Time.parse($1)
|
80
|
-
end
|
81
|
-
end
|
82
|
-
|
83
|
-
|
84
|
-
property_supported :registrar do
|
85
|
-
node('Registrar') do |hash|
|
86
|
-
Record::Registrar.new(
|
87
|
-
name: hash['name'],
|
88
|
-
organization: hash['name'],
|
89
|
-
url: hash['url']
|
90
|
-
)
|
91
|
-
end
|
92
|
-
end
|
93
|
-
|
94
|
-
property_supported :registrant_contacts do
|
95
|
-
build_contact('Registrant', Whois::Record::Contact::TYPE_REGISTRANT)
|
96
|
-
end
|
97
|
-
|
98
|
-
property_supported :admin_contacts do
|
99
|
-
build_contact('Administrative contact', Whois::Record::Contact::TYPE_ADMINISTRATIVE)
|
100
|
-
end
|
101
|
-
|
102
|
-
property_supported :technical_contacts do
|
103
|
-
build_contact('Technical contact', Whois::Record::Contact::TYPE_TECHNICAL)
|
104
|
-
end
|
105
|
-
|
106
|
-
|
107
|
-
property_supported :nameservers do
|
108
|
-
node('Name servers') do |hash|
|
109
|
-
Array.wrap(hash['nserver']).map do |name|
|
110
|
-
Nameserver.new(name: name.downcase)
|
111
|
-
end
|
112
|
-
end
|
113
|
-
end
|
114
|
-
|
115
|
-
|
116
|
-
private
|
117
|
-
|
118
|
-
def build_contact(element, type)
|
119
|
-
node(element) do |hash|
|
120
|
-
el_size = Array.wrap(hash['name']).size
|
121
|
-
|
122
|
-
(0...el_size).map do |i|
|
123
|
-
Record::Contact.new(
|
124
|
-
type: type,
|
125
|
-
name: Array.wrap(hash['name'])[i],
|
126
|
-
email: Array.wrap(hash['email'])[i],
|
127
|
-
updated_on: Time.parse(Array.wrap(hash['changed'])[i])
|
128
|
-
)
|
129
|
-
end
|
130
|
-
end
|
131
|
-
end
|
132
|
-
|
133
|
-
end
|
134
|
-
end
|
135
|
-
end
|
136
|
-
end
|