summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex2022-02-22 21:32:34 +0300
committerGitHub2022-02-22 19:32:34 +0100
commit98fb222eb0a878df2abb6b13386a5ebc46b835c3 (patch)
treec0a47e5c1e1491e002ccdce26feaf077457c46df
parent785031106a4ce199fe4fce04705cf0e07796e261 (diff)
Added support for white-spaces in target (#113)
https://github.com/nbs-system/php-malware-finder/pull/8
-rwxr-xr-xphp-malware-finder/phpmalwarefinder3
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)
90target=$(echo "$@" | sed s'#/$##') 90target=$(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
94needle_in_haystack "$output" 95needle_in_haystack "$output"
95rm "$output" 96rm "$output"