diff options
| author | Julien "shaddai" Reveret | 2016-12-08 14:19:59 +0100 |
|---|---|---|
| committer | Julien "shaddai" Reveret | 2016-12-08 14:19:59 +0100 |
| commit | e57429f89622968342e40e12d9ecb7e3babd22c3 (patch) | |
| tree | 324a9f0c3732cc998fabd310cac288c3d44a3fc5 | |
| parent | b5baef1ae6d847df0907162abe27cfdfe5395263 (diff) | |
fixing issue #40, no more double slash in output when scanning a whole directory
| -rwxr-xr-x | php-malware-finder/phpmalwarefinder | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/php-malware-finder/phpmalwarefinder b/php-malware-finder/phpmalwarefinder index a218a40..701564e 100755 --- a/php-malware-finder/phpmalwarefinder +++ b/php-malware-finder/phpmalwarefinder | |||
| @@ -205,8 +205,10 @@ OPTS="${OPTS} -r ${CONFIG_PATH}${FORMAT}.yar" | |||
| 205 | 205 | ||
| 206 | # Copy outpout to temporary file | 206 | # Copy outpout to temporary file |
| 207 | output=$(mktemp) | 207 | output=$(mktemp) |
| 208 | # delete trailing slash for directories to prevent double slash (issue #40) | ||
| 209 | target=$(echo "$@" | sed s'#/$##') | ||
| 208 | # Execute rules | 210 | # Execute rules |
| 209 | ${NICE} ${NICE_OPTS} $YARA $OPTS "$@" |tee $output | 211 | ${NICE} ${NICE_OPTS} $YARA $OPTS "$target" |tee $output |
| 210 | 212 | ||
| 211 | needle_in_haystack $output | 213 | needle_in_haystack $output |
| 212 | rm $output # comment this if you want to keep output | 214 | rm $output # comment this if you want to keep output |
