From e57429f89622968342e40e12d9ecb7e3babd22c3 Mon Sep 17 00:00:00 2001 From: Julien "shaddai" Reveret Date: Thu, 8 Dec 2016 14:19:59 +0100 Subject: fixing issue #40, no more double slash in output when scanning a whole directory --- php-malware-finder/phpmalwarefinder | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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" # Copy outpout to temporary file output=$(mktemp) +# delete trailing slash for directories to prevent double slash (issue #40) +target=$(echo "$@" | sed s'#/$##') # Execute rules -${NICE} ${NICE_OPTS} $YARA $OPTS "$@" |tee $output +${NICE} ${NICE_OPTS} $YARA $OPTS "$target" |tee $output needle_in_haystack $output rm $output # comment this if you want to keep output -- cgit v1.3