diff options
| -rwxr-xr-x | php-malware-finder/phpmalwarefinder | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/php-malware-finder/phpmalwarefinder b/php-malware-finder/phpmalwarefinder index 49cf8ce..98c578d 100755 --- a/php-malware-finder/phpmalwarefinder +++ b/php-malware-finder/phpmalwarefinder | |||
| @@ -31,11 +31,11 @@ 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 | for file in $(find $@ -type f); do | 34 | find $@ -type f -print0 | while IFS= read -r -d '' -r file; do |
| 35 | line_num=$(wc -l $file | cut -d' ' -f1) | 35 | line_num=$(wc -l "$file" | cut -d' ' -f1) |
| 36 | char_num=$(wc -c $file | cut -d' ' -f1) | 36 | char_num=$(wc -c "$file" | cut -d' ' -f1) |
| 37 | 37 | ||
| 38 | if [ "$line_num" -le "2" ]; then | 38 | if [ "$line_num" -le "2" ]; then |
| 39 | # humm, 2 lines long file ? | 39 | # humm, 2 lines long file ? |
| 40 | if [ "$char_num" -ge "300" ]; then | 40 | if [ "$char_num" -ge "300" ]; then |
| 41 | echo TooShort $file | 41 | echo TooShort $file |
