mirror of
https://github.com/scr34m/php-malware-scanner.git
synced 2026-06-16 12:30:35 +00:00
Bug fix for last commit
comment and empty line filters were in the wrong place
This commit is contained in:
12
scan.php
12
scan.php
@@ -182,13 +182,13 @@ class MalwareScanner
|
||||
|
||||
if (!$found) {
|
||||
$patterns = $this->loadPatterns(dirname(__FILE__) . '/patterns_re.txt');
|
||||
if (!$toSearch) {
|
||||
continue;
|
||||
}
|
||||
if ($toSearch[0] === '#') {
|
||||
continue;
|
||||
}
|
||||
foreach ($patterns as $toSearch) {
|
||||
if (!$toSearch) {
|
||||
continue;
|
||||
}
|
||||
if ($toSearch[0] === '#') {
|
||||
continue;
|
||||
}
|
||||
if (preg_match('/' . $toSearch . '/is', $fileContent)) {
|
||||
$found = true;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user