From 1b8d448d9eee03d75f9d8e6fbd90bf2f92d5cac9 Mon Sep 17 00:00:00 2001 From: DmitriyMX Date: Tue, 20 Jan 2015 00:37:30 +0300 Subject: [PATCH] first commit --- whois.scan.pl | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 whois.scan.pl diff --git a/whois.scan.pl b/whois.scan.pl new file mode 100644 index 0000000..da049d8 --- /dev/null +++ b/whois.scan.pl @@ -0,0 +1,74 @@ +#!/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);