summaryrefslogtreecommitdiff
path: root/net/p5-Net-XWhois/files/patch-lib::Net::XWhois.pm
blob: aeb6d348e8ed18309cd517d88c1bd8ff91fb4bf1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
--- lib/Net/XWhois.pm.orig	Sun Oct  6 05:37:55 2002
+++ lib/Net/XWhois.pm	Tue Apr 29 19:01:59 2003
@@ -16,6 +16,7 @@
 # 
 # Changes:
 #
+#  03/08/2003  jmiller     Added new .org PIR registy and parser
 #  08/05/2002  rwoodard    Merged in changes from XWhois discussion forum on
 #                          sourceforge.net; made additional changes as needed
 #                          to implement reverse lookups of IP addresses
@@ -157,6 +158,26 @@
    net_handle           => '\((NETBLK\S+)\)',
    country              => '\n\s+(\S+)\n\n',
  },
+
+ PIR => {
+  name            => 'Domain Name:(\S+)',
+  status          => 'Status:(.*?)\s*\n',
+  registrant      => 'Registrant (?:Name|Street1|Street2|City|Postal Code|Country|Email):(.*?)\s*\n',
+  nameservers     => 'Name Server:(\S+)',
+  contact_admin   => 'Admin (?:Name|Street1|Street2|City|Postal Code|Country|Email):(.*?)\s*\n',
+  contact_tech    => 'Tech (?:Name|Street1|Street2|City|Postal Code|Country|Email):(.*?)\s*\n',
+  contact_zone    => 'Admin (?:Name|Street1|Street2|City|Postal Code|Country|Email):(.*?)\s*\n',
+  contact_billing => 'Billing (?:Name|Street1|Street2|City|Postal Code|Country|Email):(.*?)\s*\n',
+  contact_emails  => '(?:Registrant|Admin|Billing|Tech) Email:(\S+\@\S+)',
+  contact_handles => '\(([^\W\d]+\d+)\)',
+  domain_handles  => '\((\S*?-DOM)\)',
+  org_handles     => '\((\S*?-ORG)\)',
+  not_registered  => 'NOT FOUND',
+#  forwardwhois    => 'Whois Server:(.*?)\s*\n',
+  registrar       => 'Referral URL:(.*?)\s*\n',
+  reg_date        => 'Created On:(.*?)\s*\n',
+  exp_date        => 'Expiration Date:(.*?)\s*\n',
+ },
  
  INTERNIC => {
   name            => '[\n\r\f]+\s*[Dd]omain [Nn]ame[:\.]*\s+(\S+)', 
@@ -241,6 +262,22 @@
   nameservers     => 'Name servers:[\s\n]+(\S+)[\s\n]+(\S+)',
  },
 
+ RIPN => {
+  name            => 'domain:\s+(\S+)\n',
+  registrant      => 'descr:\s+(.+?)\n',
+  contact_admin   => 'admin-o:\s+(.*?)\s*\n',
+  contact_tech    => 'tech-c:\s+(.*?)\s*\n',
+  nameservers     => 'nserver:\s+(\S+)',
+  status          => 'state:\s+(.*?)\s*\n',
+  changed         => 'changed:\s+(.*?)\s*\n',
+  source          => 'source:\s+(.*?)\s*\n',
+  person          => 'person:\s+(.*?)\s*\n',
+  address         => 'address:\s+(.+?)\n',
+  phone           => 'phone:\s+(.+?)\n',
+  fax_no          => 'fax-no:\s+(.+?)\n',
+  contact_emails  => 'e-mail:\s+(.+?)\n',
+ },
+
  NOMINET => { 
   name                => 'omain Name:\s+(\S+)',
   registrant          => 'egistered For:\s*(.*?)\n',
@@ -276,7 +313,7 @@
 
  DENIC => { 
   name            => 'domain:\s+(\S+)\n',
-  registrants     => 'descr:\s+(.+?)\n',
+  registrant      => 'descr:\s+(.+?)\n',
   contact_admin   => 'admin-c:\s+(.*?)\s*\n',
   contact_tech    => 'tech-c:\s+(.*?)\s*\n',
   contact_zone    => 'zone-c:\s+(.*?)\s*\n',
@@ -339,7 +376,9 @@
 );
 
 my %WHOIS_PARSER = (
+    'whois.publicinterestregistry.net' => 'PIR',
     'whois.ripe.net'            => 'RPSL',
+    'whois.ripn.net'            => 'RIPN',
     'whois.nic.mil'             => 'INTERNIC',
     'whois.nic.ad.jp'           => 'JAPAN',
     'whois.domainz.net.nz'      => 'GENERIC',
@@ -397,12 +436,12 @@
     'mt'  => 'whois.ripe.net',      'mx'  => 'whois.nic.mx',
     'net' => 'whois.internic.net',  'nl'  => 'whois.ripe.net',
     'no'  => 'whois.norid.no',      'nz'  => 'whois.domainz.net.nz',
-    'org' => 'whois.internic.net',
+    'org' => 'whois.publicinterestregistry.net',
     'pl'  => 'whois.ripe.net',      'pt'  => 'whois.ripe.net',
-    'ro'  => 'whois.ripe.net',      'ru'  => 'whois.ripe.net',
+    'ro'  => 'whois.ripe.net',      'ru'  => 'whois.ripn.net',
     'se'  => 'whois.ripe.net',      'sg'  => 'whois.nic.net.sg',
     'si'  => 'whois.ripe.net',      'sk'  => 'whois.ripe.net',
-    'sm'  => 'whois.ripe.net',      'su'  => 'whois.ripe.net',
+    'sm'  => 'whois.ripe.net',      'su'  => 'whois.ripn.net',
     'tn'  => 'whois.ripe.net',      'tr'  => 'whois.ripe.net',
     'tw'  => 'whois.twnic.net',
     'ua'  => 'whois.ripe.net',      
@@ -557,6 +596,7 @@
     $self->{ Domain }=~s/^www\.//; #trim leading www. if present; internic doesn't like it
     print "looking up ", $self->{ Domain }, " on ", $self->{ Server }, "\n" if ($self->{ Verbose });
     
+    my $domain = $self->{ Domain };
     #see if we already have a response in the cache, unless told not to
     unless ( $self->{ Nocache } ) {
       READCACHE: {