Browse Source

Add support for local whitelist

Since the whitelist file is redownloaded on each script execution, we
can not define our own paths to exclude from scan.
This commit introduces a evomalware.whitelist.local file to fix this
issue.
pull/9/head
Romain Dessort 3 years ago
parent
commit
888d644b6a
  1. 4
      evomalware.sh

4
evomalware.sh

@ -8,6 +8,7 @@ wwwpath=/home
# URL to download patterns and filenames.
databaseURL="http://antispam00.evolix.org/evomalware"
databasePATH=/var/lib/evomalware
whitelistLocal="${databasePATH}/evomalware.whitelist.local"
# Tools.
find="ionice -c3 find -O3"
grep="nice -n 19 grep"
@ -39,6 +40,7 @@ fi
mkdir -p $databasePATH
mkdir -p $tmpPATH
cd $tmpPATH
[ -f $whitelistLocal ] || touch $whitelistLocal
for file in evomalware.filenames evomalware.patterns evomalware.whitelist evomalware.suspect; do
$wget ${databaseURL}/${file}
$wget ${databaseURL}/${file}.md5
@ -51,7 +53,7 @@ for file in evomalware.filenames evomalware.patterns evomalware.whitelist evomal
done
filenames=$(cat ${databasePATH}/evomalware.filenames | tr -d '\n')
patterns=$(cat ${databasePATH}/evomalware.patterns | tr -d '\n')
whitelist=$(cat ${databasePATH}/evomalware.whitelist | tr -d '\n')
whitelist=$(cat ${databasePATH}/evomalware.whitelist $whitelistLocal | tr -d '\n')
suspect=$(cat ${databasePATH}/evomalware.suspect | tr -d '\n')
# Search for .php files (less than 1M).

Loading…
Cancel
Save