New find usage to exclude evobackup.

This commit is contained in:
Benoît S. 2015-01-22 15:26:03 +01:00
parent f1e6f7afc8
commit 82c411f52c
1 changed files with 4 additions and 3 deletions

View File

@ -4,10 +4,10 @@
# You can set aggressive to true to search for suspicions scripts.
aggressive=false
# Path to search for.
wwwpath=/localhome/bserie/CVS/scripts/scripts
wwwpath=/home
# URL to download patterns and filenames.
databaseURL="http://antispam00.evolix.org/evomalware"
databasePATH=/tmp/lib/evomalware
databasePATH=/var/lib/evomalware
# Tools.
find="ionice -c3 find"
grep="nice -n 19 grep"
@ -58,7 +58,8 @@ filenames=$(cat ${databasePATH}/evomalware.filenames | tr -d '\n')
patterns=$(cat ${databasePATH}/evomalware.patterns | tr -d '\n')
# Search for .php files (less than 1M).
find $wwwpath -type f ! -size +1M -name "*.php" > $fileslist 2>/dev/null
find $wwwpath -name evobackup -prune -o \( -type f ! -size +1M -name "*.php" \) \
> $fileslist 2>/dev/null
while read file; do
# Search known filenames.
if [[ "$file" =~ $filenames ]]; then