February 20, 2004

使用screen & expect來掛站

當然, 這也可以用來作一個暴力猜測密碼的工具, 有空在玩嚕

step1:

首先先確定工作站是否有安裝screen 和 expect

step2:

完成一隻shell script能自動完成登入的動作的...
範例如下
#!/usr/bin/expect
spawn telnet -8 bbs.canaan.org.tw
expect "new"
send "youid\n"
expect "密碼"
send "youpasswd\n"
interact timeout 30 { send " " }
exit

step3:

#screen "剛剛完成的那一隻shell script"&

step4:

下次登入時再用#screen [-r "pid"]接回來就ok了

Posted by skychaser at February 20, 2004 01:58 PM
Comments
Post a comment













Remember personal info?