line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
## Domain Registry Interface, EPP Whois Info (EPP-Whois-Info-Ext.pdf) |
2
|
|
|
|
|
|
|
## |
3
|
|
|
|
|
|
|
## Copyright (c) 2006-2008,2012,2013 Patrick Mevzek . All rights reserved. |
4
|
|
|
|
|
|
|
## |
5
|
|
|
|
|
|
|
## This file is part of Net::DRI |
6
|
|
|
|
|
|
|
## |
7
|
|
|
|
|
|
|
## Net::DRI is free software; you can redistribute it and/or modify |
8
|
|
|
|
|
|
|
## it under the terms of the GNU General Public License as published by |
9
|
|
|
|
|
|
|
## the Free Software Foundation; either version 2 of the License, or |
10
|
|
|
|
|
|
|
## (at your option) any later version. |
11
|
|
|
|
|
|
|
## |
12
|
|
|
|
|
|
|
## See the LICENSE file that comes with this distribution for more details. |
13
|
|
|
|
|
|
|
#################################################################################################### |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
package Net::DRI::Protocol::EPP::Extensions::VeriSign::WhoisInfo; |
16
|
|
|
|
|
|
|
|
17
|
1
|
|
|
1
|
|
745
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
26
|
|
18
|
1
|
|
|
1
|
|
3
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
16
|
|
19
|
|
|
|
|
|
|
|
20
|
1
|
|
|
1
|
|
3
|
use Net::DRI::Util; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
16
|
|
21
|
1
|
|
|
1
|
|
4
|
use Net::DRI::Exception; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
352
|
|
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=pod |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=head1 NAME |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
Net::DRI::Protocol::EPP::Extensions::VeriSign::WhoisInfo - EPP Whois Info (EPP-Whois-Info-Ext.pdf) for Net::DRI |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head1 DESCRIPTION |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
Please see the README file for details. |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head1 SUPPORT |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
For now, support questions should be sent to: |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
Enetdri@dotandco.comE |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
Please also see the SUPPORT file in the distribution. |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head1 SEE ALSO |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
Ehttp://www.dotandco.com/services/software/Net-DRI/E |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head1 AUTHOR |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
Patrick Mevzek, Enetdri@dotandco.comE |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head1 COPYRIGHT |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
Copyright (c) 2006-2008,2012,2013 Patrick Mevzek . |
52
|
|
|
|
|
|
|
All rights reserved. |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify |
55
|
|
|
|
|
|
|
it under the terms of the GNU General Public License as published by |
56
|
|
|
|
|
|
|
the Free Software Foundation; either version 2 of the License, or |
57
|
|
|
|
|
|
|
(at your option) any later version. |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
See the LICENSE file that comes with this distribution for more details. |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=cut |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
#################################################################################################### |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
sub register_commands |
66
|
|
|
|
|
|
|
{ |
67
|
0
|
|
|
0
|
0
|
|
my ($class,$version)=@_; |
68
|
0
|
|
|
|
|
|
my %tmp=( |
69
|
|
|
|
|
|
|
info => [ \&info, \&info_parse ], |
70
|
|
|
|
|
|
|
); |
71
|
|
|
|
|
|
|
|
72
|
0
|
|
|
|
|
|
return { 'domain' => \%tmp }; |
73
|
|
|
|
|
|
|
} |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
#################################################################################################### |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
sub info |
78
|
|
|
|
|
|
|
{ |
79
|
0
|
|
|
0
|
0
|
|
my ($epp,$domain,$rd)=@_; |
80
|
0
|
|
|
|
|
|
my $mes=$epp->message(); |
81
|
0
|
|
|
|
|
|
my $defprod=$epp->default_parameters()->{subproductid}; |
82
|
0
|
0
|
0
|
|
|
|
return if ($defprod eq '_auto_' && $domain=~m/\.(?:cc|tv)$/i); |
83
|
|
|
|
|
|
|
|
84
|
0
|
|
|
|
|
|
my $wi; |
85
|
0
|
0
|
|
|
|
|
if (Net::DRI::Util::has_key($rd,'whois_info')) |
86
|
|
|
|
|
|
|
{ |
87
|
0
|
|
|
|
|
|
$wi=$rd->{whois_info}; |
88
|
|
|
|
|
|
|
} else |
89
|
|
|
|
|
|
|
{ |
90
|
0
|
|
|
|
|
|
my $def=$epp->default_parameters(); |
91
|
0
|
0
|
|
|
|
|
if (Net::DRI::Util::has_key($def,'whois_info')) |
92
|
|
|
|
|
|
|
{ |
93
|
0
|
|
|
|
|
|
$wi=$def->{whois_info}; |
94
|
|
|
|
|
|
|
} else |
95
|
|
|
|
|
|
|
{ |
96
|
0
|
|
|
|
|
|
Net::DRI::Exception::usererr_insufficient_parameters('Whois Info must be provided'); |
97
|
|
|
|
|
|
|
} |
98
|
|
|
|
|
|
|
} |
99
|
0
|
0
|
|
|
|
|
Net::DRI::Exception::usererr_invalid_parameters('Whois Info must be true/false/1/0') unless Net::DRI::Util::xml_is_boolean($wi); |
100
|
|
|
|
|
|
|
|
101
|
0
|
|
|
|
|
|
my $eid=$mes->command_extension_register('whoisInf:whoisInf','xmlns:whoisInf="http://www.verisign.com/epp/whoisInf-1.0" xsi:schemaLocation="http://www.verisign.com/epp/whoisInf-1.0 whoisInf-1.0.xsd"'); |
102
|
0
|
|
|
|
|
|
$mes->command_extension($eid,['whoisInf:flag',$wi]); |
103
|
0
|
|
|
|
|
|
return; |
104
|
|
|
|
|
|
|
} |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
sub info_parse |
107
|
|
|
|
|
|
|
{ |
108
|
0
|
|
|
0
|
0
|
|
my ($po,$otype,$oaction,$oname,$rinfo)=@_; |
109
|
0
|
|
|
|
|
|
my $mes=$po->message(); |
110
|
0
|
0
|
|
|
|
|
return unless $mes->is_success(); |
111
|
|
|
|
|
|
|
|
112
|
0
|
|
|
|
|
|
my $infdata=$mes->get_extension('http://www.verisign.com/epp/whoisInf-1.0','whoisInfData'); |
113
|
0
|
0
|
|
|
|
|
return unless $infdata; |
114
|
|
|
|
|
|
|
|
115
|
0
|
|
|
|
|
|
my %w; |
116
|
0
|
|
|
|
|
|
foreach my $el (Net::DRI::Util::xml_list_children($infdata)) |
117
|
|
|
|
|
|
|
{ |
118
|
0
|
|
|
|
|
|
my ($name,$c)=@$el; |
119
|
0
|
0
|
|
|
|
|
if ($name=~m/^(?:registrar|whoisServer|url|irisServer)$/) |
120
|
|
|
|
|
|
|
{ |
121
|
0
|
|
|
|
|
|
$w{Net::DRI::Util::remcam($name)}=$c->textContent(); |
122
|
|
|
|
|
|
|
} |
123
|
|
|
|
|
|
|
} |
124
|
|
|
|
|
|
|
|
125
|
0
|
|
|
|
|
|
$rinfo->{domain}->{$oname}->{whois_info}=\%w; |
126
|
0
|
|
|
|
|
|
return; |
127
|
|
|
|
|
|
|
} |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
#################################################################################################### |
130
|
|
|
|
|
|
|
1; |