forked from extern/shorewall_code
Fix the output of the 'hits' command under BusyBox 1.2.0
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@4234 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
a96c3a1a1b
commit
fe827dc82e
@ -1,3 +1,6 @@
|
||||
Changes in 3.3.0
|
||||
|
||||
1) Remove dynamic zone capability.
|
||||
|
||||
2) Fixed output of 'hits' command under busybox 1.2.0.
|
||||
|
||||
|
@ -33,7 +33,8 @@ Note to users upgrading from Shorewall 2.x or 3.0
|
||||
|
||||
Problems Corrected in 3.3.0
|
||||
|
||||
None.
|
||||
1) The output formating of the 'hits' command under BusyBox 1.2.0 has
|
||||
been corrected.
|
||||
|
||||
Other changes in 3.3.0
|
||||
|
||||
|
@ -1715,19 +1715,31 @@ case "$COMMAND" in
|
||||
if [ $(grep -c "$LOGFORMAT" $LOGFILE ) -gt 0 ] ; then
|
||||
echo " HITS IP DATE"
|
||||
echo " ---- --------------- ------"
|
||||
grep "$LOGFORMAT" $LOGFILE | sed 's/\(.\{6\}\)\(.*SRC=\)\(.*\)\( DST=.*\)/\3 \1/' | sort | uniq -c | sort -rn
|
||||
grep "$LOGFORMAT" $LOGFILE | sed 's/\(.\{6\}\)\(.*SRC=\)\(.*\)\( DST=.*\)/\3 \1/' | sort | uniq -c | sort -rn | \
|
||||
while read count address month day; do
|
||||
printf '%7d %-15s %3s %2d\n' $count $address $month $day
|
||||
done
|
||||
|
||||
echo ""
|
||||
|
||||
echo " HITS IP PORT"
|
||||
echo " ---- --------------- -----"
|
||||
grep "$LOGFORMAT" $LOGFILE | sed 's/\(.*SRC=\)\(.*\)\( DST=.*DPT=\)\([0-9]\{1,5\}\)\(.*\)/\2 \4/
|
||||
t
|
||||
s/\(.*SRC=\)\(.*\)\( DST=.*\)/\2/' | sort | uniq -c | sort -rn
|
||||
s/\(.*SRC=\)\(.*\)\( DST=.*\)/\2/' | sort | uniq -c | sort -rn | \
|
||||
while read count address port; do
|
||||
printf '%7d %-15s %d\n' $count $address $port
|
||||
done
|
||||
|
||||
echo ""
|
||||
|
||||
echo " HITS DATE"
|
||||
echo " ---- ------"
|
||||
grep "$LOGFORMAT" $LOGFILE | sed 's/\(.\{6\}\)\(.*\)/\1/' | sort | uniq -c | sort -rn
|
||||
grep "$LOGFORMAT" $LOGFILE | sed 's/\(.\{6\}\)\(.*\)/\1/' | sort | uniq -c | sort -rn | \
|
||||
while read count month day; do
|
||||
printf '%7d %3s %2d\n' $count $month $day
|
||||
done
|
||||
|
||||
echo ""
|
||||
|
||||
echo " HITS PORT SERVICE(S)"
|
||||
|
Loading…
x
Reference in New Issue
Block a user