Feeds:
Posts
Comments

Posts Tagged ‘restart router’

With the WA3002G4 wireless router i got recently from my friend i made a wifi hotspot in home. Haven’t been downloading a lot since my script to reboot old teracom router was not working with the new one.Thinking that I should do something on the day which will come only in every four years I modified the old script to work with the new wireless router and I am sharing it here.

#!/usr/bin/env expect

set username admin
set pass admin
set host 192.168.1.1

spawn telnet ${host}

expect -re "Login:"
send "${username}\r"

expect -re "Password:"
send "${pass}\r"

expect -re "Main Menu"
send "13\r"
send "1\r"
expect eof 

Read Full Post »

A slightly edited version of the script to restart router written by Madhusudan.C.S to make it work with teracom router given by bsnl.

#!/usr/bin/env expect

set username admin
set pass admin
set host 192.168.1.1

spawn telnet ${host}

expect -re "Login:"
send "${username}\r"

expect "Password:"
send "${pass}\r"

expect -re "successful"
send "console enable\r"
send "restart\r"
expect eof 

Read Full Post »

%d bloggers like this: