Evil Administrator: June 2008 Archives
作为罪恶的Admin,一定要有罪恶的脚本。当那个讨厌的用户又登录了你的server,不要pkill -9 -f "sshd: the_user". 如果你这么做了,那是粗鲁而不是罪恶。罪恶的admin要调戏(molest)他的用户。让我们发挥SIGSTOP和SIGCONT的威力吧。找到那家伙的sshd,kill -STOP,sleep 0.1,kill -CONT.让他的终端像9C的魔兽世界一样卡。从精神上打垮他。当然我们需要sleep的真实一些,让这看起来真的像网络故障。于是moluser脚本出现了:
#!/bin/bash
# molest user by SIGSTOP and SIGCONT his sshd
GUY="$1"
MAXSLEEP="$2"
MAXSLEEP=${MAXSLEEP:0:10}
ZERO="0000000000"
if [ -z "$GUY" ]
then
echo "Usage: moluser <username> [max sleep time(millionseconds)]"
echo
echo "Molest a user py kill -STOP his sshd"
echo '$Id$'
exit 0
fi
[ -z "$MAXSLEEP" ] && SLEEP=1000
while true
do
SLEEP=$(expr $RANDOM % $MAXSLEEP)
SLEEP="${ZERO:0:$(expr ${#MAXSLEEP} - ${#SLEEP})}$SLEEP"
SLEEP="${SLEEP:0:1}.${SLEEP:1}"
_UID="$(id -u $GUY 2>/dev/null)"
pkill -SIGSTOP -U $_UID sshd
sleep $SLEEP
pkill -SIGCONT -U $_UID sshd
done
Search
October 2008
Friends
Recent Posts
Tag Cloud
- acm
- algorithm
- apache
- bash
- basketball
- bitlbee
- blog
- book
- boot
- camera
- cnlexizer
- computer vision
- console
- daemon
- daemontools
- debian
- directx
- dll
- dotNet
- dynamic programming
- eating
- eduos
- embedded
- evc
- eye candy
- fastcgi
- firefox
- framebuffer
- freebsd
- fs
- git
- grep
- hardware
- ifconfig
- im
- inputrc
- json
- kernel
- life
- linux
- maintainance
- math
- moluser
- msmtp
- mutt
- network
- nfs
- nlp
- notebook
- patch
- performance
- perl
- php
- printf
- regex
- router
- rxvt-unicode
- scp
- screen
- sexy
- shell
- slackware
- smartphone
- ssh
- ssl
- svn
- sysrq
- toshiba
- tunnel
- urxvt
- vc
- vcs
- vfw
- wallpaper
- windows
- xargs
Categories
Powered by Movable Type
Recent Comments
FW on 【转】rxvt-unicode (urxvt) 字间距过宽的patch: pls contac
jianingy on 用正则表达式Look-Ahead做带逃逸的变量替换: 这个lc是啥意思?
cnhackTNT on 用正则表达式Look-Ahead做带逃逸的变量替换: 晕,被过滤掉了,再试
cnhackTNT on 用正则表达式Look-Ahead做带逃逸的变量替换: s/(? 这样可以
R.Q. on 个性化SSH登录: 酱紫哦,了了 ---