diff options
| author | Alex | 2022-02-22 21:32:34 +0300 |
|---|---|---|
| committer | GitHub | 2022-02-22 19:32:34 +0100 |
| commit | 98fb222eb0a878df2abb6b13386a5ebc46b835c3 (patch) | |
| tree | c0a47e5c1e1491e002ccdce26feaf077457c46df | |
| parent | 785031106a4ce199fe4fce04705cf0e07796e261 (diff) | |
Added support for white-spaces in target (#113)
https://github.com/nbs-system/php-malware-finder/pull/8
| -rwxr-xr-x | php-malware-finder/phpmalwarefinder | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/php-malware-finder/phpmalwarefinder b/php-malware-finder/phpmalwarefinder index ab1d6fb..a6de360 100755 --- a/php-malware-finder/phpmalwarefinder +++ b/php-malware-finder/phpmalwarefinder | |||
| @@ -89,7 +89,8 @@ output=$(mktemp) | |||
| 89 | # delete trailing slash for directories to prevent double slash (issue #40) | 89 | # delete trailing slash for directories to prevent double slash (issue #40) |
| 90 | target=$(echo "$@" | sed s'#/$##') | 90 | target=$(echo "$@" | sed s'#/$##') |
| 91 | # Execute rules | 91 | # Execute rules |
| 92 | $YARA $OPTS $target |tee $output | 92 | # Using $-interpolation and quotes to support a target with whitespaces |
| 93 | $YARA $OPTS "$target" |tee $output | ||
| 93 | 94 | ||
| 94 | needle_in_haystack "$output" | 95 | needle_in_haystack "$output" |
| 95 | rm "$output" | 96 | rm "$output" |
