75 lines
1.7 KiB
Perl
75 lines
1.7 KiB
Perl
#!/usr/bin/perl -w
|
|
|
|
use FileHandle;
|
|
|
|
@abc = split(//, 'abcdefghijklmnopqrstuvwxyz0123456789');
|
|
$len = $#abc;
|
|
#$count = 3;
|
|
$last = '';
|
|
|
|
#######################################
|
|
|
|
my $file = 'domains.txt';
|
|
open(LOG, ">>$file");
|
|
LOG->autoflush(1);
|
|
|
|
my $domain;
|
|
for ($i = 0; $i <= $len; $i++) {
|
|
$domain = $abc[$i];
|
|
|
|
for ($j = 0; $j <= $len; $j++) {
|
|
$domain .= $abc[$j];
|
|
|
|
for ($k = 0; $k <= $len; $k++) {
|
|
$domain .= $abc[$k];
|
|
|
|
if ($last ne '') {
|
|
if ($last eq $domain) {
|
|
$last = '';
|
|
}
|
|
chop($domain);
|
|
next;
|
|
}
|
|
|
|
#################
|
|
|
|
$whois_res = `whois $domain.ru`;
|
|
|
|
if ($whois_res =~ /No entries found for the selected source/) {
|
|
printf LOG "%s:y:::::\n", $domain.'.ru';
|
|
printf "%s:y:::::\n", $domain.'.ru';
|
|
} else {
|
|
$whois_res =~ /registrar:\s+(.+)/i;
|
|
$d_reg = $1;
|
|
|
|
$whois_res =~ /created:\s+(.+)/i;
|
|
$d_cre = $1;
|
|
|
|
$whois_res =~ /paid-till:\s+(.+)/i;
|
|
$d_pai = $1;
|
|
|
|
$whois_res =~ /free-date:\s+(.+)/i;
|
|
$d_fre = $1;
|
|
|
|
$whois_res =~ /nserver:\s+(.+)/i;
|
|
$d_nse = $1;
|
|
|
|
printf LOG "%s:n:%s:%s:%s:%s:%s\n", $domain.'.ru', $d_nse, $d_cre, $d_pai, $d_fre, $d_reg;
|
|
printf "%s:n:%s:%s:%s:%s:%s\n", $domain.'.ru', $d_nse, $d_cre, $d_pai, $d_fre, $d_reg;
|
|
}
|
|
|
|
sleep 2.5;
|
|
|
|
#################
|
|
|
|
chop($domain);
|
|
}
|
|
|
|
chop($domain);
|
|
}
|
|
|
|
chop($domain);
|
|
}
|
|
|
|
close(LOG);
|