diff options
| -rwxr-xr-x | php-malware-finder/phpmalwarefinder | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/php-malware-finder/phpmalwarefinder b/php-malware-finder/phpmalwarefinder index 98c578d..99d9033 100755 --- a/php-malware-finder/phpmalwarefinder +++ b/php-malware-finder/phpmalwarefinder | |||
| @@ -31,13 +31,12 @@ fi | |||
| 31 | # before starting yara, check if the file | 31 | # before starting yara, check if the file |
| 32 | one_line_trick() { | 32 | one_line_trick() { |
| 33 | 33 | ||
| 34 | find $@ -type f -print0 | while IFS= read -r -d '' -r file; do | 34 | find $@ -type f -iname '*.ph*' -print0 | while IFS= read -r -d '' -r file; do |
| 35 | line_num=$(wc -l "$file" | cut -d' ' -f1) | 35 | read lines words chars name <<< $(wc "$file") |
| 36 | char_num=$(wc -c "$file" | cut -d' ' -f1) | 36 | |
| 37 | 37 | if [ "$lines" -le "2" ]; then | |
| 38 | if [ "$line_num" -le "2" ]; then | ||
| 39 | # humm, 2 lines long file ? | 38 | # humm, 2 lines long file ? |
| 40 | if [ "$char_num" -ge "300" ]; then | 39 | if [ "$chars" -ge "300" ]; then |
| 41 | echo TooShort $file | 40 | echo TooShort $file |
| 42 | fi; | 41 | fi; |
| 43 | fi; | 42 | fi; |
