/
/
home
/
u523034047
/
domains
/
lineandtool.com
/
public_html
/
images
Server: in-mum-web1112.main-hosting.eu (62.72.28.111)
You: 216.73.216.52
PHP 8.3.16
Dir:
/home/u523034047/domains/lineandtool.com/public_html/images
Edit:
/home/u523034047/domains/lineandtool.com/public_html/images/scanner.php
<?php $directory = __DIR__; // Scan from current directory $logFile = __DIR__ . '/infected_files.log'; $suspicious_patterns = [ 'eval\(', 'base64_decode\(', 'gzinflate\(', 'str_rot13\(', 'system\(', 'shell_exec\(', 'assert\(', 'preg_replace\(.*/e', 'exec\(', 'passthru\(', 'popen\(', 'proc_open\(', 'curl_exec\(', 'file_get_contents\("php://input"\)', ]; $iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($directory)); file_put_contents($logFile, "---- Malware Scan Results ----\n\n"); foreach ($iterator as $file) { if ($file->isFile() && strtolower($file->getExtension()) === 'php') { $content = file_get_contents($file->getPathname()); foreach ($suspicious_patterns as $pattern) { if (preg_match("/$pattern/i", $content)) { $log = "⚠️ Suspicious code found in: " . $file->getPathname() . " | Pattern: $pattern\n"; echo $log; file_put_contents($logFile, $log, FILE_APPEND); break; } } } } echo "\n✅ Scan completed. Check infected_files.log for details.\n"; ?>
Ukuran: 1.2 KB