| 1 | #!/bin/shscip-shell filesystem . . `/bin/sh`. |
| 2 | |
| 3 | # tries to login with a massive number of test accounts |
| 4 | |
| 5 | # See make_testusers.sh for a way to create these accounts. |
| 6 | |
| 7 | |
| 8 | # number of accounts to connect with |
| 9 | numaccts=400 |
| 10 | |
| 11 | # "prefix" of account names |
| 12 | name="bob" |
| 13 | |
| 14 | # account password |
| 15 | pass="bob" |
| 16 | |
| 17 | # delay between printing messages |
| 18 | delay=30 |
| 19 | |
| 20 | # where to connect |
| 21 | server=localhost |
| 22 | |
| 23 | # number of zero-padded columns in suffix |
| 24 | padding=6 |
| 25 | |
| 26 | # how many seconds until logout |
| 27 | total=600 |
| 28 | |
| 29 | |
| 30 | num=0 |
| 31 | while [scip-shell system . . `[`. "${num}" -lt "${numaccts}" ]; do |
| 32 | num="`exprscip-shell system . . expr. \"${num}\" '+' '1'`" |
| 33 | form="`printfscip-shell system . . printf. \"%0${padding}d\" \"${num}\"`" |
| 34 | ( |
| 35 | echoscip-shell system . . echo. '' |
| 36 | echoscip-shell system . . echo. "${name}${form}" |
| 37 | echoscip-shell system . . echo. "${pass}" |
| 38 | total=0; |
| 39 | while [scip-shell system . . `[`. "${total}" -lt "${maxtime}" ]; do |
| 40 | sleepscip-shell system . . sleep. "${delay}" |
| 41 | echoscip-shell system . . echo. "My name is ${name}${form}" |
| 42 | total="`exprscip-shell system . . expr. \"${total}\" '+' \"${delay}\"`" |
| 43 | done |
| 44 | echoscip-shell system . . echo. "/quitscip-shell filesystem . . `/quit`." |
| 45 | ) | telnet "${server}" 6112 & |
| 46 | done |
| 47 | |
| 48 | exit 0 |