Chat > Guides & Projects

restart router batch script thigie

(1/4) > >>

knighty:
sick of having to get off my ass to go hard reset my router...

and even worse trying to remote from home to work and vice versa only to find the router on the other end has crashed so can't remote in at all

so I tried to write a batch script to telnet into the local router and restart it each day.... but... a windows telnet won't accept passwords and the batch file can't send them once it's running (spent 2 hours thinking it was just me doing it wrong)

found a small program which can work with telnet to do the username pass wtc...
it needs a batch file to run the program, and point it to a text file with a list of commands in it to run

dropbox link to my version


--- Code: (to run program/text file) ---tst10.exe /r:reboot.txt /m
--- End code ---


--- Code: (text file) ---192.168.1.254
WAIT "Username :"
SEND "Administrator\m"
WAIT "Password :"
SEND "PASSWORD\m"
SEND "system reboot\m"
WAIT "#"
SEND "exit\m"
--- End code ---

swap PASSWORD for your password

might need a slight edit to work with your router... I just telnet into mine to play around and figure out what it needed

then it runs at 4am every morning via windows scheduled tasks


have been meaning to do something like this for ages but just never got around to it.... figure it might be handy for some other people too

handy to stick a shortcut onto the desktop of any noob friends/family so they can restart there router easy with a double click :-)

Clock'd 0Ne:
That's fantastic, I will give it a go with mine as it suffers from prolonged use without a reboot :)

XEntity:
For scheduled reboots, I believe if you have dd-wrt it will do this out of the box, but good to see something you can run from a batch file!

soopahfly:
Real routers cost money son.

I can't remember the last time I had to touch my Draytek router.  That's with a fibre connection and passing hundreds of GB through it a month.

knighty:

--- Quote from: soopahfly on December 03, 2012, 22:48:49 PM ---Real routers cost money son.
I can't remember the last time I had to touch my Draytek router.  That's with a fibre connection and passing hundreds of GB through it a month.

--- End quote ---

I had a £250 cisco

couldn;t get the bloody thing to work, all settings had to be via telnet, and there was no basic/default settings.... you had to set every setting individually... like turn on each lan port individually, then give them each an ip address, then setup each one for what it's allowed to connect to etc...

drove me crazy

got sick of it and ebayed it in the end


current pos is alright for weeks if I take it easy.... but I tend to hammer it :-)

Navigation

[0] Message Index

[#] Next page

Go to full version