🔍 Deep Website Malware Scanner (Line-by-Line)"; echo ""; $scanPath = __DIR__; // Root folder (can change to 'public_html' or 'uploads') $suspiciousPatterns = [ 'eval', 'base64_decode', 'gzinflate', 'str_rot13', 'system', 'exec', 'shell_exec', 'passthru', 'assert', 'php://input', 'php://filter', 'preg_replace.*\/e', 'file_put_contents', 'fopen.*w', 'chmod', 'unlink', ]; $found = []; $rii = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($scanPath)); foreach ($rii as $file) { if (!$file->isFile()) continue; $ext = strtolower(pathinfo($file, PATHINFO_EXTENSION)); if (!in_array($ext, ['php', 'phtml'])) continue; $lines = file($file->getPathname()); foreach ($lines as $lineNum => $line) { foreach ($suspiciousPatterns as $pattern) { if (preg_match("/$pattern/i", $line)) { $filePath = $file->getPathname(); $matchedLine = htmlspecialchars(trim($line)); echo "
  • 📁 $filePath
    📝 Line " . ($lineNum + 1) . ": $matchedLine
  • "; break; } } } } echo "

    ✅ Scan Complete

    "; ?>