问个问题:linux下有能面向internet的嗅探器吗?不
rt 有,不过您的Linux主机得放在Internet的汇聚点上 我下了一个sniffit RPM 包不会用 sniffit -i 是交互方式。可以做成一个 /etc/init.d/sniffit 文件,内容如下:
#! /bin/sh
#
# chkconfig: 2345 15 15
# processname: sniffit
# Source function library.
. /etc/init.d/functions
# Get config.
. /etc/sysconfig/network
# Check that networking is up.
if [ "$NETWORKING" = "no" ]
then
exit 0
fi
RETVAL=0
prog="Net Watch Program"
start () {
echo -n $"Starting $prog: "
# if [ -x /usr/sbin/iplog ]; then
# iplog -w -y -z -m -l /var/log/iplog.log
# RETVAL=$?
# [ $RETVAL -eq 0 ] && touch /var/lock/subsys/iplog; chown nobody.nobody /var/run/iplog.pid
# fi
if [ -x /usr/bin/sniffit ]; then
cd /var/sniffit
sniffit -P tcp -p 0 -t x.x.x.x-A . >/dev/null 2>&1 &
sniffit -P tcp -p 23 -t x.x.x.x -A . >/dev/null 2>&1 &
#
#
RETVAL=$?
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/sniffit
cd - >/dev/null 2>&1
fi
echo
}
stop () {
echo -n $"Stopping $prog: "
# daemon iplog -kill
killproc sniffit
RETVAL=$?
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/sniffit
echo
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
status)
# status iplog
status sniffit
;;
restart|reload)
stop
start
;;
condrestart)
[ -f /var/lock/subsys/sniffit ] && restart || :
;;
*)
echo $"Usage: $0 {start|stop|status|restart|reload|condrestart}"
exit 1
esac
exit $?
页:
[1]