Script REXX:
/* REXX: reboot.zrx */
connectip= "192.168.1.1"
connectname= "ROUTERNAME"
connectpassword= "telnetpassword"
enablepassword= "enablepass"
CALL rebootrouter
EXIT
rebootrouter:
CALL ZocConnect connectip
CALL ZocWait "Password:"
CALL ZocSend connectpassword||"^M"
CALL ZocWait ">"
CALL ZocSend "enable^M"
CALL ZocWait "Password:"
CALL ZocSend enablepassword||"^M"
CALL ZocWait "#"
CALL ZocSend "reload"
CALL ZocWait "]"
CALL ZocSend "y^M"
CALL ZocWait "]"
CALL ZocSend "y^M"
RETURN
(Shamelessly stol .. umm emprestado de aqui e postado com alguns embelezamentos)