$type = 'site%20contains';
use IO::Socket;
$host = 'searchdns.netcraft.com';
@domains = (
'lt', 'com', 'net', 'org', 'biz', 'info',
'co.uk', 'co.nz', 'co.il', 'net.nz', 'org.uk', 'org.il',
'org.nz', 'com.ph', 'co.za', 'za', 'ws', 'vu',
'vg', 'us', 'uk', 'tv', 'to', 'tc',
'st', 'sh', 'ro', 'ph', 'nz', 'ms',
'kz', 'jp', 'il', 'gs', 'fm', 'dk',
'de', 'cc', 'ca', 'be', 'as', 'ac',
'pro', 'eu', 'mobi', 'ae', 'at', 'br',
'cat', 'ch', 'cl', 'tw', 'com.tw', 'net.tw',
'org.tw', 'cn', 'fi', 'gr', 'hk', 'hu',
'io', 'is', 'kr', 'li', 'lv', 'museum',
'no', 'nu', 'pl', 'se', 'tm', 'tr',
'vn'
);
if ( $ARGV[0] ) { @domains = shift; }
else { die "ko ieskosime?\n"; }
foreach $search (@domains) {
$url = '/?restriction=' . $type . '&host=' . $search . '&position=limited';
$testi = 1;
while ( $testi == 1 ) {
$testi = 0;
$query =
"GET $url HTTP/1.1\015\012"
. "Host: $host\015\012"
. "Accept:*/*\015\012"
. "Accept-Language: en-us,en-gb;q=0.7,en;q=0.3\015\012"
. "Pragma: no-cache\015\012"
. "Cache-Control: no-cache\015\012"
. "Referer: http://$host\015\012"
. "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)\015\012"
. "Connection: close\015\012\015\012";
$sock = IO::Socket::INET->new(
Proto => "tcp",
PeerAddr => "$host",
PeerPort => "80"
) || die "nesusijunge..\n";
print $sock $query;
while (<$sock>) {
s/<a href="http:\/\/toolbar.netcraft.com//eg;
if (/<a href="http:\/\/(.*)\/">/) {
print "$1\n";
}
elsif (
/<A href="http:\/\/searchdns.netcraft.com(.*)"><b>Next page<\/b><\/a>/
)
{
$url = $1;
$url =~ s/\ /'%20'/eg;
$testi = 1;
}
}
sleep(3);
}
}
|