看板FreeBSD
标 题Re: [问题] 一个FreeBSD的问题
发信站师大计中(精灵之城) (Sun Oct 24 23:49:37 2004)
转信站ptt!ctu-reader!ctu-peer!news.nctu!news.csie.ncyu!news.cs.nthu!freebsd.
※ 引述《[email protected] (☆ 火 炎 焱 燚 ☆)》之铭言:
> #!/usr/bin/expect
> # kkcity.expect - user rwx ONLY
> spawn telnet "-8" "bbs.kkcity.com.tw"
> expect {
> "Connection" { exit }
> "输入代号:" {
> send "vngirl\n"
> expect "输入密码:"
> send "password\n"
> # \n = Enter
> send "\n\n\n\nf\n"
> }
> }
> # send out the NULL character every 60 secs
> interact timeout 60 { send -null }
> exit
> 有人可以跟我说明一下吗@@?
我之前有查到一个作法 给你参考
spawn sh -c "exec /usr/bin/telnet -8 ptt.cc"
interact timeout 450 { send " " }
--
※ Origin: 精灵之城<bbs.ntnu.edu.tw> ◆ From: wood.ite.ntnu.edu.tw