login_testusers.sh

来自「打魔兽战网的都知道他是什么」· Shell 代码 · 共 49 行

SH
49
字号
#!/bin/sh# tries to login with a massive number of test accounts# See make_testusers.sh for a way to create these accounts.# number of accounts to connect withnumaccts=400# "prefix" of account namesname="bob"# account passwordpass="bob"# delay between printing messagesdelay=30# where to connectserver=localhost# number of zero-padded columns in suffixpadding=6# how many seconds until logouttotal=600num=0while [ "${num}" -lt "${numaccts}" ]; do    num="`expr \"${num}\" '+' '1'`"    form="`printf \"%0${padding}d\" \"${num}\"`"    (        echo ''        echo "${name}${form}"        echo "${pass}"        total=0;        while [ "${total}" -lt "${maxtime}" ]; do            sleep "${delay}"            echo "My name is ${name}${form}"            total="`expr \"${total}\" '+' \"${delay}\"`"        done        echo "/quit"    ) | telnet "${server}" 6112 &doneexit 0

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?