Net-Whois-Raw
view release on metacpan or search on metacpan
1516171819202122232425262728maintain/pwhois-maintain.pl
maintain/pwhois-maintain/func.js
maintain/pwhois-maintain/
index
.html
maintain/pwhois-maintain/logic.js
t/01-
local
.t
t/02-www_parse_tj_cgi_whois.t
t/03-read_write_cache.t
t/04-qrycache.t
t/all_tlds.pl
t/author-pod-spell.t
t/coro-domains.pl
t/example-domains-load-balancing.pl
t/internet.pl
t/ipv6.pl
lib/Net/Whois/Raw/Data.pm view on Meta::CPAN
188318841885188618871888188918901891189218931894189518961897189818991900190119021903XN--CLCHC0EA0B2G2A9GCD whois.sgnic.sg
XN--YFRO4I67O whois.sgnic.sg
XN--O3CW4H whois.thnic.co.th
XN--NODE whois.itdc.ge
XN--3E0B707E whois.kr
XN--CG4BKI whois.kr
SANDVIKCOROMANT whois.nic.sandvikcoromant
SCOR whois.nic.scor
SEVEN whois.nic.seven
SYDNEY whois.nic.sydney
TDK whois.nic.tdk
TEVA whois.nic.teva
lib/Net/Whois/Raw/Data.pm view on Meta::CPAN
282028212822282328242825282628272828282928302831283228332834283528362837283828392840'whois.nic.xn--w4r85el8fhu5dnra'
=>
'No match for "'
,
'whois.nic.xn--w4rs40l'
=>
'No match for "'
,
'whois.nic.xperia'
=>
'No match for "'
,
'whois.nic.zm'
=>
'Domain Status: No Object Found'
,
'whois.pnina.ps'
=>
'Domain Status: No Object Found'
,
'whois.registry.knet.cn'
=>
'The queried object does not exist: '
,
'whois.sgnic.sg'
=>
'Domain Not Found'
,
'whois.thnic.co.th'
=>
'No match for'
,
'whois.itdc.ge'
=>
'NO OBJECT FOUND'
,
'whois.kr'
=>
'The requested domain was not found'
,
'whois.nic.sandvikcoromant'
=>
'No Data Found'
,
'whois.nic.scor'
=>
'No Data Found'
,
'whois.nic.seven'
=>
'No Data Found'
,
'whois.nic.sydney'
=>
'No Data Found'
,
'whois.nic.tdk'
=>
'No Data Found'
,
'whois.nic.teva'
=>
'No Data Found'
,
'whois.nic.trust'
=>
'No Data Found'
,
'whois.nic.virgin'
=>
'No Data Found'
,
'whois.nic.vistaprint'
=>
'No Data Found'
,
'whois.nic.walter'
=>
'No Data Found'
,
'whois.nic.woodside'
=>
'No Data Found'
,
t/coro-domains.pl view on Meta::CPAN
789101112131415161718192021222324252627BEGIN {
eval
"
";
$::require_coro = $@
if
$@;
use_ok(
'Net::Whois::Raw'
,
qw( whois )
);
$Net::Whois::Raw::CHECK_FAIL
= 1;
$Net::Whois::Raw::OMIT_MSG
= 1;
$Net::Whois::Raw::CHECK_EXCEED
= 1;
};
my
@domains
= qw(
yahoo.com
t/coro-domains.pl view on Meta::CPAN
313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
belizenic.bz
);
my
$dns_cache
= {};
SKIP: {
"The following tests requires internet connection. Checking...\n"
;
skip
"Looks like no internet connection"
, 5
unless
get_connected();
"The following tests requires Coro. Checking...\n"
;
skip
"Looks like no Coro installed"
, 5
unless
require_coro ();
my
@coros
= ();
# domains
foreach
my
$domain
(
@domains
) {
push
@coros
, Coro->new (
sub
{
my
$txt
= whois(
$domain
);
$domain
=~ s/.NS$//i;
ok(
$txt
&&
$txt
=~ /
$domain
/i,
"domain '$domain' resolved"
);
});
}
$_
->ready
foreach
@coros
;
$_
->
join
foreach
@coros
;
};
sub
get_connected {
my
$ua
= LWP::UserAgent->new(
timeout
=> 10 );
return
$res
->is_success;
}
sub
require_coro {
no
warnings
'once'
;
*Net::Whois::Raw::whois_socket_fixup
=
sub
{
my
$class
=
shift
;
my
$sock
=
shift
;
return
Coro::Socket->new_from_fh (
$sock
,
partial
=> 1);
};
t/coro-domains.pl view on Meta::CPAN
878889909192939495969798
}
return
(
PeerAddr
=>
$dns_cache
->{
$name
},
PeerPort
=> 43,
# LocalHost => ,
# LocalPort =>
);
};
return
! $::require_coro;
}
t/example-domains-load-balancing.pl view on Meta::CPAN
212223242526272829303132333435363738394041eval
"
";
$::require_coro = $@
if
$@;
unlink
"db.sqlite"
;
$ENV
{DBI_DSN} ||=
'DBI:SQLite:dbname=db.sqlite'
;
$ENV
{DBI_USER} ||=
''
;
$ENV
{DBI_PASS} ||=
''
;
use
DBI;
$::dbh = DBI->
connect
;
t/example-domains-load-balancing.pl view on Meta::CPAN
767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
belizenic.bz
);
my
$dns_cache
= {};
SKIP: {
"The following tests requires internet connection. Checking...\n"
;
skip
"Looks like no internet connection"
, 5
unless
get_connected();
"The following tests requires Coro. Checking...\n"
;
skip
"Looks like no Coro installed"
, 5
unless
require_coro ();
my
@coros
= ();
# domains
foreach
my
$domain
(
@domains
) {
push
@coros
, Coro->new (
sub
{
my
$txt
= whois(
$domain
);
$::dbh->
do
(
'delete from whois_connection where domain = ?'
, {},
$domain
);
$domain
=~ s/.NS$//i;
ok(
$txt
&&
$txt
=~ /
$domain
/i,
"domain '$domain' resolved"
);
});
}
$_
->ready
foreach
@coros
;
$_
->
join
foreach
@coros
;
};
sub
get_connected {
my
$ua
= LWP::UserAgent->new(
timeout
=> 10 );
return
$res
->is_success;
}
sub
require_coro {
no
warnings
'once'
;
*Net::Whois::Raw::whois_socket_fixup
=
sub
{
my
$class
=
shift
;
my
$sock
=
shift
;
return
Coro::Socket->new_from_fh (
$sock
,
partial
=> 1);
};
t/example-domains-load-balancing.pl view on Meta::CPAN
126127128129130131132133134135136137138139140141142143144145146my
$class
=
shift
;
my
$domain
=
shift
;
my
$name
=
shift
;
# TODO: YOU MUST PLACE QUOTA CHECK HERE
# my $sth = $::dbh->prepare ('select * from ');
my
$ip
;
if
(!
$dns_cache
->{
$name
}) {
$ip
= inet_ntoa (inet_aton (
$name
));
# TODO: use coro::util for resolve
$dns_cache
->{
$name
} =
$ip
;
}
else
{
$ip
=
$dns_cache
->{
$name
};
}
my
$ip_num
= ip_to_dword (
$ip
);
my
$sth
= $::dbh->prepare (
'select local_ip from whois_ip where local_ip not in (select local_ip from whois_connection where remote_ip = ? group by local_ip) limit 1;'
);
t/example-domains-load-balancing.pl view on Meta::CPAN
165166167168169170171172173174175176
);
return
(
PeerAddr
=>
$dns_cache
->{
$name
},
PeerPort
=> 43,
LocalHost
=> dword_to_ip (
$result
->[0]->{local_ip}),
# LocalPort =>
);
};
return
! $::require_coro;
}
( run in 0.337 second using v1.01-cache-2.11-cpan-8d75d55dd25 )