403Webshell
Server IP : 82.208.35.60  /  Your IP : 216.73.216.89
Web Server : Apache/2.4.55 (FreeBSD) OpenSSL/1.1.1q-freebsd PHP/7.3.31
System : FreeBSD server7.d2m.cz 12.4-RELEASE-p9 FreeBSD 12.4-RELEASE-p9 GENERIC amd64
User : studiokobylisy_cz ( 1008)
PHP Version : 7.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/ports/security/scanlogd/files/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/ports/security/scanlogd/files/850.scanlogd
#!/bin/sh -
#
# Show possible port scans detected by scanlogd.
#
# If you want to enable this script, place the following
# into /etc/periodic.conf:
#
# security_status_scanlogd_enable="YES"
# security_status_scanlogd_period="daily"
#

# If there is a global system configuration file, suck it in.
#
if [ -r /etc/defaults/periodic.conf ]; then
	. /etc/defaults/periodic.conf
	source_periodic_confs
fi

: ${security_status_scanlogd_period="daily"}

security_daily_compat_var security_status_logdir
security_daily_compat_var security_status_scanlogd_enable

logdir="${security_status_logdir}"

yesterday=`env LC_TIME=C date -v-1d "+%b %e "`

catmsgs() {
	local logdir logfile mtime
	logdir="$1"
	logfile="$2"
	mtime="$3"

	find "$logdir" \( -name "$logfile" -o -name "$logfile.*" \) -mtime "$mtime" -print0 |
		xargs -0 ls -1tr |
		while read f; do
			case "$f" in
				*.gz)   zcat -f "$f" ;;
				*.bz2)  bzcat -f "$f" ;;
				*)      cat "$f" ;;
			esac
		done
}

rc=0

if check_yesno_period security_status_scanlogd_enable; then
	echo ""
	echo "${host} possible port scans:"
	n=$(catmsgs "$logdir" messages "-2" | egrep -ia "^$yesterday.*scanlogd:" | tee /dev/stderr | wc -l)
	[ $n -gt 0 ] && rc=1 || rc=0
fi

exit $rc

Youez - 2016 - github.com/yon3zu
LinuXploit