Archived
0
This repository has been archived on 2022-04-24. You can view files and clone it, but cannot push or open issues or pull requests.
Files
whois.scan/whois.scan.pl
2015-01-20 00:37:30 +03:00

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);