一个群友写的Linux脚本,蛮经典的:Linux记录键盘操作# /bin/sh # hist_record.sh # This script is often to write in /etc/profile. # This script could record history input and send mail to root.RMIP=`who -u am i 2>/dev/null| awk "{print $NF}"|sed -e "s/[()]//g"` TIME=`date +%Y%m%d.%H:%M.%S`if [ "$RMIP" = "" ] then RMIP=`hostname` fiLOGS="/tmp/.hist/$TIME.$USER.$RMIP.hist" HOST=`/bin/hostname`if [ ! -d /tmp/.hist ] then mkdir /tmp/.hist chmod 777 /tmp/.hist fiscript -q $LOGS && mail -s "$TIME, $USER FROM $RMIP LOGIN $HOST" root < $LOGS 一菜鸟对Linux与Windows安全性的认识Linux下破解路由器WEP加密相关资讯 Linux教程