#!/usr/bin/expect -fset timeout 5spawn telnet 192.168.1.1match_max 100000expect -exact "Trying 192.168.1.1...\rConnected to dsl.\rEscape character is '^\]'.\r\rBusyBox on (none) login: "send -- "admin\r"expect -exact "admin\rPassword: "send -- "\r"expect -exact "\r\r\rBusyBox v0.61.pre (2005.05.30-08:31+0000) Built-in shell (ash)\rEnter 'help' for a list of built-in commands.\r\r# "send -- "kill `cat /var/run/ppp0.pid`\r"expect -exact "kill `cat /var/run/ppp0.pid`\r# "send -- ""expect eof