diff options
| -rw-r--r-- | README.md | 11 | ||||
| -rwxr-xr-x | php-malware-finder/phpmalwarefinder | 3 |
2 files changed, 7 insertions, 7 deletions
| @@ -55,12 +55,13 @@ of [YARA](https://plusvic.github.io/yara/) rules. Yes, it's that simple! | |||
| 55 | 55 | ||
| 56 | ``` | 56 | ``` |
| 57 | $ ./phpmalwarefinder -h | 57 | $ ./phpmalwarefinder -h |
| 58 | Usage phpmalwarefinder [-cfhw] <file|folder> ... | 58 | Usage phpmalwarefinder [-cfhtv] [-l (php|asp)] <file|folder> ... |
| 59 | -c Optional path to a configuration file | 59 | -c Optional path to a configuration file |
| 60 | -f Fast mode | 60 | -f Fast mode |
| 61 | -h Show this help message | 61 | -h Show this help message |
| 62 | -t Specify the number of threads to use (8 by default) | 62 | -t Specify the number of threads to use (8 by default) |
| 63 | -v Verbose mode | 63 | -v Verbose mode |
| 64 | -l Set language ('asp', 'php') | ||
| 64 | ``` | 65 | ``` |
| 65 | 66 | ||
| 66 | Or if you prefer to use `yara`: | 67 | Or if you prefer to use `yara`: |
diff --git a/php-malware-finder/phpmalwarefinder b/php-malware-finder/phpmalwarefinder index 3dda46b..501ce47 100755 --- a/php-malware-finder/phpmalwarefinder +++ b/php-malware-finder/phpmalwarefinder | |||
| @@ -5,6 +5,7 @@ YARA=$(type -P yara) | |||
| 5 | CONFIG_PATH='/etc/phpmalwarefinder/common.yara' | 5 | CONFIG_PATH='/etc/phpmalwarefinder/common.yara' |
| 6 | IONICE_BIN=$(type -P ionice) | 6 | IONICE_BIN=$(type -P ionice) |
| 7 | NICE_BIN=$(type -P nice) | 7 | NICE_BIN=$(type -P nice) |
| 8 | FORMAT="php" | ||
| 8 | 9 | ||
| 9 | if [ ! -x "$YARA" ] | 10 | if [ ! -x "$YARA" ] |
| 10 | then | 11 | then |
| @@ -72,8 +73,6 @@ one_line_trick() { | |||
| 72 | ;; | 73 | ;; |
| 73 | esac | 74 | esac |
| 74 | 75 | ||
| 75 | echo "Target is $FORMAT." | ||
| 76 | |||
| 77 | find "$@" -type f -iname "$EXT" -print0 | while IFS= read -r -d '' -r file; do | 76 | find "$@" -type f -iname "$EXT" -print0 | while IFS= read -r -d '' -r file; do |
| 78 | read -r lines _ chars _ <<< "$(wc "$file")" | 77 | read -r lines _ chars _ <<< "$(wc "$file")" |
| 79 | 78 | ||
