#!/bin/sh
#ashow of xt_recent
#
#logfile
prefix="/opt/var/log/recent"
brlogfile="/brute_recent.log"
weblogfile="/web_recent.log"
portscan="/portscan.log"

[ ! -d $prefix ] && mkdir $prefix
[ -f /opt/bin/clear ] && /opt/bin/clear

echo
echo "############################################xt_recent:#################################################"
echo
echo "Brute force to port 21 and/or 22 (FTP, SSH):"
/opt/bin/cat /proc/net/xt_recent/BRUTE | /opt/bin/cut -d "=" -f2 | /opt/bin/cut -d " " -f1
/opt/bin/cat /proc/net/xt_recent/BRUTE | /opt/bin/cut -d "=" -f2 | /opt/bin/cut -d " " -f1 > $prefix$brlogfile

echo
echo "Webserver-access:"
/opt/bin/cat /proc/net/xt_recent/webprotect | /opt/bin/cut -d "=" -f2 | /opt/bin/cut -d " " -f1
/opt/bin/cat /proc/net/xt_recent/webprotect | /opt/bin/cut -d "=" -f2 | /opt/bin/cut -d " " -f1 > $prefix$weblogfile
echo
echo "Portscan:"
/opt/bin/cat /proc/net/xt_recent/portscan | /opt/bin/cut -d "=" -f2 | /opt/bin/cut -d " " -f1
/opt/bin/cat /proc/net/xt_recent/portscan | /opt/bin/cut -d "=" -f2 | /opt/bin/cut -d " " -f1 > $prefix$portscan
echo

