/
/
home
/
u523034047
/
domains
Server: in-mum-web1112.main-hosting.eu (62.72.28.111)
You: 216.73.216.4
PHP 8.3.16
Dir:
/home/u523034047/domains
Edit:
/home/u523034047/domains/delete_pass_cron.php
<?php // Root folder where domain folders are located $rootFolder ='/home/u523034047/domains/'; // Your base path // Log file to record actions $logFile = __DIR__ . '/delete_pass_log.txt'; $now = date('Y-m-d H:i:s'); // File names to search for $targets = ['pass.php', 'pass.mp4', 'pass.php4','monarx-analyzer.php','Sqlx2.php','groupon.php','single.php','sqlxxx.php','webhook.php','Okxob.php','account.php','imgG.php','root.php','test1.php','local.php','wp-takito.php','wp-px.php','Naruto-Uzumaki.php','AxAo..php','test5.php','upads.php','1.php','chosen.php','3.php5','db.php','2.php5','705.zip','715.zip','810.zip','811.zip','good.php','1.php5', 'g811.php','j250811_13.zip','db.zip','g811','admin4.php','buy.php','ss.php','site.php','infos.php','Java.php','jaca.php','adminer.php','Roket.php', 'monarx-analyzer.php','lhh.zip','papa.php','db.php','db.zip','j250913_13.zip','wp-trackbackj.php','mainhackbypass.php','WooCommerce.php','revealability.php','Jaca.php','monarx-analyzer.php','monarx-analyzer.php','test1.php','revealability.php','wp-ss.php','Syes.php','anon.php']; if (!is_dir($rootFolder)) { echo "Root folder does not exist: $rootFolder\n"; exit(1); } // Iterate over each domain folder foreach (new DirectoryIterator($rootFolder) as $domainDir) { if ($domainDir->isDot() || !$domainDir->isDir()) { continue; } $domainPath = $domainDir->getPathname(); // Recursively traverse all subdirectories/files $it = new RecursiveIteratorIterator( new RecursiveDirectoryIterator($domainPath, FilesystemIterator::SKIP_DOTS), RecursiveIteratorIterator::SELF_FIRST ); foreach ($it as $fileInfo) { // If this is one of our target files, delete it if ($fileInfo->isFile() && in_array($fileInfo->getFilename(), $targets, true)) { $filePath = $fileInfo->getPathname(); if (@unlink($filePath)) { $msg = "[$now] Deleted: $filePath\n"; } else { $msg = "[$now] FAILED to delete: $filePath\n"; } file_put_contents($logFile, $msg, FILE_APPEND); } } } echo "Recursive scan complete. See log at $logFile\n"; ?>
Ukuran: 2.2 KB