Skip to content

Commit

Permalink
Merge pull request #101 from extremeshok/dev
Browse files Browse the repository at this point in the history
5.2.1
  • Loading branch information
extremeshok committed Apr 16, 2016
2 parents e976430 + 6e72e0d commit eb5ac2d
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 14 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,12 @@ Usage of free Linux Malware Detect clamav signatures: https://www.rfxn.com/proje
- Enabled by default, no configuration required

## Change Log
### Version 5.2.0 (updated 2016-04-15)
### Version 5.2.1 (updated 2016-04-16)
- eXtremeSHOK.com Maintenance
- Minor bugfix for Sanesecurity_sigtest.yara Sanesecurity_spam.yara files being removed incorrectly
- Minor fix: yararulesproject_enabled not yararulesproject_enable

### Version 5.2.0
- eXtremeSHOK.com Maintenance
- Refactor some functions
- Added --install-man this will automatically generate and install the man (help) file
Expand Down
21 changes: 11 additions & 10 deletions clamav-unofficial-sigs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -967,8 +967,8 @@ EOF
################################################################################

#Script Info
script_version="5.2.0"
script_version_date="15 April 2016"
script_version="5.2.1"
script_version_date="16 April 2016"
minimum_required_config_version="62"
minimum_yara_clamav_version="0.99"

Expand Down Expand Up @@ -1247,17 +1247,17 @@ if [ "$enable_yararules" == "yes" ] ; then
minimum_yara_clamav_version=`echo "$minimum_yara_clamav_version" | awk -F. '{ printf("%d%03d%03d%03d\n", $1,$2,$3,$4); }'`
#Check current clamav version against the minimum required version for yara support
if [ $current_clamav_version -lt $minimum_yara_clamav_version ]; then #older
enable_yararulesproject="no"
yararulesproject_enabled="no"
enable_yararules="no"
xshok_pretty_echo_and_log "Notice: Yararules Disabled due to clamav being older than the minimum required version"
fi
else
enable_yararulesproject="no"
yararulesproject_enabled="no"
enable_yararules="no"
fi

#rebuild the database if we need to remove yara rules from them due to yararules being disabled
if [ "$enable_yararules"=="no" ] ; then #yararules are disabled
if [ "$enable_yararules" == "no" ] ; then #yararules are disabled
if [ "$sanesecurity_enabled" == "yes" ] ; then
if [ -n "$sanesecurity_dbs" ] ; then
if [ `xshok_array_count "$sanesecurity_dbs"` -ge "1" ] ; then
Expand Down Expand Up @@ -1427,7 +1427,7 @@ if [ -n "$rsync_proxy" ] ; then
export RSYNC_PROXY
fi

# Create files containing lists of current and previously active 3rd-party databases
# Create $current_dbsfiles containing lists of current and previously active 3rd-party databases
# so that databases and/or backup files that are no longer being used can be removed.
current_tmp="$work_dir_work_configs/current-dbs.tmp"
current_dbs="$work_dir_work_configs/current-dbs.txt"
Expand All @@ -1441,11 +1441,12 @@ if [ "$sanesecurity_enabled" == "yes" ] ; then
if [ -n "$sanesecurity_dbs" ] ; then
rm -f -- "$sanesecurity_include_dbs" "$work_dir_sanesecurity/*.sha256"
for db in $sanesecurity_dbs ; do
echo "$db" >> "$sanesecurity_include_dbs"
echo "$db.sig" >> "$sanesecurity_include_dbs"

echo "$work_dir_sanesecurity/$db" >> "$current_tmp"
echo "$work_dir_sanesecurity/$db.sig" >> "$current_tmp"
clamav_files
echo "$db" >> "$sanesecurity_include_dbs"
echo "$db.sig" >> "$sanesecurity_include_dbs"
done
fi
fi
Expand All @@ -1471,7 +1472,7 @@ if [ "$malwarepatrol_enabled" == "yes" ] ; then
clamav_files
fi
fi
if [ "$yararulesproject_enabled" == "yes" ] ; then
if [ "$yararulesproject_enabledd" == "yes" ] ; then
if [ -n "$yararulesproject_dbs" ] ; then
for db in $yararulesproject_dbs ; do
if echo $db|grep -q "/"; then
Expand Down Expand Up @@ -2170,7 +2171,7 @@ fi
##############################################################################################################################################
# Check for updated yararulesproject database files every set number of hours as defined in the "USER CONFIGURATION" section of this script
##############################################################################################################################################
if [ "$yararulesproject_enabled" == "yes" ] ; then
if [ "$yararulesproject_enabledd" == "yes" ] ; then
if [ -n "$yararulesproject_dbs" ] ; then
if [ `xshok_array_count "$yararulesproject_dbs"` -lt "1" ] ; then
xshok_pretty_echo_and_log "Failed yararulesproject_dbs config is invalid or not defined - SKIPPING"
Expand Down
5 changes: 2 additions & 3 deletions config/master.conf
Original file line number Diff line number Diff line change
Expand Up @@ -408,9 +408,8 @@ curl_proxy=""

# Custom man install settings, these are detected and only used if you want to override
# the automatic detection and generation of the values when not set, this is mainly to aid package maintainers
#man_dir="" #default: /etc/man.d
#man_filename="" #default: clamav-unofficial-sigs
#man_log_file_full_path="" #default: detected to the $log_file_path/$log_file_name
#man_dir="" #default: /usr/share/man/man8
#man_filename="" #default: clamav-unofficial-sigs.8

# Provided two variables that package and port maintainers can use in order to
# prevent the script from removing itself with the '-r' flag
Expand Down

0 comments on commit eb5ac2d

Please sign in to comment.