Net-Whois-Raw
view release on metacpan or search on metacpan
maintain/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
XN--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
'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
BEGIN {
use Socket;
eval "
use Coro;
use Coro::AnyEvent;
use Coro::Socket;
use Coro::LWP;
";
$::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
belizenic.bz
);
my $dns_cache = {};
SKIP: {
print "The following tests requires internet connection. Checking...\n";
skip "Looks like no internet connection", 5 unless get_connected();
print "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 {
require LWP::UserAgent;
my $ua = LWP::UserAgent->new( timeout => 10 );
my $res = $ua->get( 'http://www.google.com' );
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
}
return (
PeerAddr => $dns_cache->{$name},
PeerPort => 43,
# LocalHost => ,
# LocalPort =>
);
};
return ! $::require_coro;
}
t/example-domains-load-balancing.pl view on Meta::CPAN
eval "
use Coro;
use Coro::AnyEvent;
use Coro::Socket;
use Coro::LWP;
use Coro::Timer;
use DBI:SQLite;
";
$::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
belizenic.bz
);
my $dns_cache = {};
SKIP: {
print "The following tests requires internet connection. Checking...\n";
skip "Looks like no internet connection", 5 unless get_connected();
print "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 {
require LWP::UserAgent;
my $ua = LWP::UserAgent->new( timeout => 10 );
my $res = $ua->get( 'http://www.google.com' );
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
my $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
);
return (
PeerAddr => $dns_cache->{$name},
PeerPort => 43,
LocalHost => dword_to_ip ($result->[0]->{local_ip}),
# LocalPort =>
);
};
return ! $::require_coro;
}
( run in 0.315 second using v1.01-cache-2.11-cpan-3cd7ad12f66 )