diff --git a/evomalware.sh b/evomalware.sh index b44b553..732acaf 100644 --- a/evomalware.sh +++ b/evomalware.sh @@ -65,7 +65,7 @@ while read file; do elif [[ "$file" =~ "wp-content/uploads/" ]]; then echo "PHP file in a non-PHP folder detected: $file" # Count the length of the longest line and search if suspect php functions are used. - elif [[ $($wc -L "$file" | cut -d' ' -f1) -gt 10000 ]]; then + elif [[ $($wc -L "$file" 2>/dev/null | cut -d' ' -f1) -gt 10000 ]]; then grep -q -E "$suspect" "$file" if [[ $? -eq 0 ]]; then echo "Suspect file! More than 10000 characters in one line (and suspect PHP functions): $file." @@ -104,4 +104,4 @@ if ( $aggressive ); then $grep -r 'eval(' . $grep -r '\x..\x..' . $grep -r 'chr(rand(' . -fi \ No newline at end of file +fi