Your IP : 216.73.216.170


Current Path : /var/www/iplanru/data/www/intesco.ru/d59ed/
Upload File :
Current File : /var/www/iplanru/data/www/intesco.ru/d59ed/maldet.tar

etc/init.d/maldet000066600000005746150771264330007725 0ustar00#!/usr/bin/env bash
#
# maldet    Linux Malware Detect monitoring
#
# chkconfig: 345 70 30
# description: Linux Malware Detect file monitoring
# processname: maldet

### BEGIN INIT INFO
# Provides:          maldet
# Required-Start:    $local_fs $remote_fs $network $syslog $named
# Required-Stop:     $local_fs $remote_fs $network $syslog $named
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# X-Interactive:     true
# Short-Description: Start/stop maldet in monitor mode
### END INIT INFO
inspath='/usr/local/maldetect'
intcnf="$inspath/internals/internals.conf"

if [ -f "$intcnf" ]; then
	source $intcnf
	source $cnf
else
	echo "$intcnf not found."
	exit 1
fi

# Source function library.
if [ -f /etc/init.d/functions ]; then
        . /etc/init.d/functions
elif [ -f /lib/lsb/init-functions ]; then
        . /lib/lsb/init-functions
fi

if [ -f "/etc/sysconfig/maldet" ]; then
	. /etc/sysconfig/maldet
elif [ -f "/etc/default/maldet" ]; then
	. /etc/default/maldet
fi

if [ "$default_monitor_mode" ]; then
	MONITOR_MODE="$default_monitor_mode"
fi

RETVAL=0
prog="maldet"
if [ -d /var/lock/subsys ]; then
        LOCKFILE=/var/lock/subsys/$prog
else
        LOCKFILE=/var/lock/$prog
fi

if [ -z "$MONITOR_MODE" ]; then
    if [ -f /etc/redhat-release ]; then
        echo "error no default monitor mode defined, set \$MONITOR_MODE in /etc/sysconfig/maldet, or \$default_monitor_mode in $cnf"
    elif [ -f /etc/debian_version ]; then
        echo "error no default monitor mode defined, set \$MONITOR_MODE in /etc/default/maldet, or \$default_monitor_mode in $cnf"
    else
        echo "error no default monitor mode defined, set \$MONITOR_MODE in /etc/sysconfig/maldet, or \$default_monitor_mode in $cnf"
    fi
	exit 1
fi

start() {
        echo -n "Starting $prog: "
        $inspath/maldet --monitor $MONITOR_MODE
        RETVAL=$? [ $RETVAL -eq 0 ] && touch $LOCKFILE
        echo
        return $RETVAL
}

stop() {
        echo -n "Shutting down $prog: "
        if [ -f /etc/redhat-release ]; then
            $inspath/maldet --kill-monitor && success || failure
        elif [ -f /etc/debian_version ]; then
            $inspath/maldet --kill-monitor && log_success_msg || log_failure_msg
        else
            $inspath/maldet --kill-monitor && success || failure
        fi
        RETVAL=$? [ $RETVAL -eq 0 ] && rm -f $LOCKFILE
        echo
        return $RETVAL
}

restart() {
        stop
        start
}

status() {
        echo -n "Checking $prog monitoring status: "
        if [ "$(pgrep -f inotify.paths.[0-9]+)" ]; then
            echo "Running"
	    exit 0
        else
            echo "Not running"
            exit 1
        fi
}

case "$1" in
    start)
        start
        ;;
    stop)
        stop
        ;;
    status)
        status
        ;;
    restart)
        restart
        ;;
    condrestart)
        if [ -f $LOCKFILE ]; then
            restart
        fi
        ;;
    *)
        echo "Usage: $prog {start|stop|status|restart|condrestart}"
        exit 1
        ;;
esac
exit $RETVAL
etc/default/maldet000066600000000657150771466450010167 0ustar00##
# Linux Malware Detect v1.6.4
#             (C) 2002-2019, R-fx Networks <proj@rfxn.com>
#             (C) 2019, Ryan MacDonald <ryan@rfxn.com>
# This program may be freely redistributed under the terms of the GNU GPL v2
##
# MONITOR_MODE
# users      | monitor all local unix users
# PATH FILE  | read path file, line spaced, for local paths to monitor

#MONITOR_MODE="users"
#MONITOR_MODE="/usr/local/maldetect/monitor_paths"
etc/cron.daily/maldet000066600000007301150772374710010574 0ustar00#!/usr/bin/env bash
export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:$PATH
export LMDCRON=1
inspath='/usr/local/maldetect'
intcnf="$inspath/internals/internals.conf"

if [ -f "$intcnf" ]; then
	source $intcnf
else
	echo "\$intcnf not found."
	exit 1
fi
if [ -f "$cnf" ]; then
	source $cnf
	if [ -f "$compatcnf" ]; then
	        source $compatcnf
	fi
else
	echo "could not find \$cnf, fatal error, bye."
	exit 1
fi

if [ -f "/etc/sysconfig/maldet" ]; then
	. /etc/sysconfig/maldet
elif [ -f "/etc/default/maldet" ]; then
	. /etc/default/maldet
fi

if [ -f "$cron_custom_conf" ]; then
	. $cron_custom_conf
fi

if [ -z "$scan_days" ]; then
	scan_days=1
fi

if [ -z "$cron_prune_days" ]; then
	cron_prune_days=21
fi

if [ "$find" ]; then
	# prune any quarantine/session/tmp data older than 7 days
	tmpdirs="$tmpdir $varlibpath/sess $varlibpath/quarantine $varlibpath/pub"
	for dir in $tmpdirs; do
	 if [ -d "$dir" ]; then
	  $find $dir -type f -mtime +${cron_prune_days} -print0 | xargs -0 rm -f >> /dev/null 2>&1
	 fi
	done
fi

if [ "$autoupdate_version" == "1" ] || [ "$autoupdate_signatures" == "1" ]; then
	# sleep for random 1-999s interval to better distribute upstream load
	sleep $(echo $RANDOM | cut -c1-3) >> /dev/null 2>&1
fi

if [ "$autoupdate_version" == "1" ]; then
	# check for new release version
	$inspath/maldet -d >> /dev/null 2>&1
fi

if [ "$autoupdate_signatures" == "1" ]; then
	# check for new definition set
	$inspath/maldet -u >> /dev/null 2>&1
fi

# if we're running inotify monitoring, send daily hit summary
if [ "$(ps -A --user root -o "cmd" | grep -E maldetect | grep -E inotifywait)" ]; then
        $inspath/maldet --monitor-report >> /dev/null 2>&1
elif [ "$cron_daily_scan" == "1" ]; then
	if [ -d "/home/virtual" ] && [ -d "/usr/lib/opcenter" ]; then
		# ensim
	        $inspath/maldet -b -r /home/virtual/?/fst/var/www/html/,/home/virtual/?/fst/home/?/public_html/ $scan_days >> /dev/null 2>&1
	elif [ -d "/etc/psa" ] && [ -d "/var/lib/psa" ]; then
		# psa
		$inspath/maldet -b -r /var/www/vhosts/?/ $scan_days >> /dev/null 2>&1
        elif [ -d "/usr/local/directadmin" ]; then
                # DirectAdmin
                $inspath/maldet -b -r /home?/?/domains/?/public_html/,/var/www/html/?/ $scan_days >> /dev/null 2>&1
	elif [ -d "/var/www/clients" ]; then
		# ISPConfig
                $inspath/maldet -b -r /var/www/clients/?/web?/web,/var/www/clients/?/web?/subdomains,/var/www $scan_days >> /dev/null 2>&1
	elif [ -d "/etc/webmin/virtual-server" ]; then
		# Virtualmin
                $inspath/maldet -b -r /home/?/public_html/,/home/?/domains/?/public_html/ $scan_days >> /dev/null 2>&1
	elif [ -d "/usr/local/ispmgr" ] || [ -d "/usr/local/mgr5" ]; then
		# ISPmanager
		$inspath/maldet -b -r /var/www/?/data/,/home/?/data/ $scan_days >> /dev/null 2>&1
	elif [ -d "/var/customers/webs" ]; then
		# froxlor
		$inspath/maldet -b -r /var/customers/webs/ $scan_days >> /dev/null 2>&1
        elif [ -d "/usr/local/vesta" ]; then
                # VestaCP
                $inspath/maldet -b -r /home/?/web/?/public_html/,/home/?/web/?/public_shtml/,/home/?/tmp/,/home/?/web/?/private/ $scan_days >> /dev/null 2>&1
        elif [ -d "/usr/share/dtc" ]; then
                # DTC
                if [ -f /var/lib/dtc/saved_install_config ]; then
                    . /var/lib/dtc/saved_install_config
                fi
                $inspath/maldet -b -r ${conf_hosting_path:-/var/www/sites}/?/?/subdomains/?/html/ $scan_days >> /dev/null 2>&1
	else
		# cpanel, interworx and other standard home/user/public_html setups
	        $inspath/maldet -b -r /home?/?/public_html/,/var/www/html/,/usr/local/apache/htdocs/ $scan_days >> /dev/null 2>&1
	fi
fi

if [ -f "$cron_custom_exec" ]; then
	. $cron_custom_exec
fi