D-Link Forums
The Graveyard - Products No Longer Supported => Routers / COVR => DIR-615 => Topic started by: luckyboy on January 31, 2010, 12:56:51 AM
-
Hi guys,
is there a way how to reboot DIR 615 using some kind of script?
From time to time I need to reboot the router and I would love to have some automated tool for this.
I also have Dlink DNS 323 and somebody discovered a way how to shutdown it down using Wget:
set UNAME=username
set PASSWD=password
set IP=NAS IP
set WGETPATH=path to wget.exe
"%WGETPATH%" --tries=1 --timeout=5 "http://%IP%/goform/formLogin?f_login_type=0&f_LOGIN_NAME=%UNAME%&f_LOGIN_PASSWD=%PASSWD%"
IF %ERRORLEVEL%==0 (
"%WGETPATH%" --tries=1 --timeout=5 "http://%IP%/goform/sysShutDown?shootdown"
) ELSE (
ECHO Unable to shutdown NAS Server!
)
It should be possible to call reboot for DIR 615 as well, but Im not able to find out... :-[
Help would be really appreciated!
-
Bump!
I agree!
This would be Really usefull
Anyone know how to do this?
Thanks
Russ
-
hi all
i wrote an autohotkey script that uses html with javascript to automatically login and reboot the dir-615 router.
+++ download RouterReboot.zip via www +++ (http://321.endofinternet.org/routerreboot/index.html)
+++ download RouterReboot.zip via ftp +++ (ftp://routerreboot:download@321.endofinternet.org)
zip file includes compiled .exe and source code as well.
edit:
* new version 0.1.1 supports any router if appropriate html files are provided
* version 0.2.1
stores router data in an .ini file instead of using html
email support for adding a router (see readme)
-
Can this be modified for any router?
-
the login part should be suitable, the script uses a simplified html code of the router's login page. i'm not sure about the reboot command. it's composed of two javascript functions in the router's corresponding html page.
-
Thanks for the info, I'll have a look at it and see if maybe we can make it configurable for other models...i may contact you again...Thanks for sharing.
-
Assuming there's some interest I modified the script by taking the html code out and putting it in two seperate files. This way support for any router can be added easily as long as it's possible to login and reboot it automatically by using html and javascript.
-
Any what of letting the user select a particular model with in the .exe? I presume this might need more code dev or information based on models...most DIR series routers have the same manual Boot location under Tools/System...
-
most DIR series routers have the same manual Boot location under Tools/System...
... sounds like it could work for many routers.
The .exe reads variables from an .ini file. Variables are
model
username
password
routerip
wait
Logging in and rebooting is done by sending two different urls. To add support for a certain model, you have to create a folder with the same name as the router model and put two html files in it.
-
And could the .exe tell which folder to use or could be point it to a specified folder?
-
The new folder has to be in the folder "routers" which is located in the scripts directory. To make the .exe use those html files write the name of the router model into the .ini file ("model=DIR-615"). The folder must have this name as well.
-
Is the .ini file editable to users, i.e. changing the DIR-615?
-
Is the .ini file editable to users, i.e. changing the DIR-615?
Of course it is, you have to put username and password in it.
-
Ok, thank you for this information...I hope users will enjoy it as there has been some users asking about it.
-
I just stumbled upon the initial question of the thread, so i make up the basic info now although it's four years ago (what happened in four years?):
loginurl="http://routerip/login.php?ACTION_POST=LOGIN&LOGIN_USER=username&LOGIN_PASSWD=password"
rebooturl="http://routerip/sys_cfg_valid.xgi?exeshell=submit REBOOT"
:o
-
I just stumbled upon the initial question of the thread, so i make up the basic info now although it's four years ago (what happened in four years?):
loginurl="http://routerip/login.php?ACTION_POST=LOGIN&LOGIN_USER=username&LOGIN_PASSWD=password"
rebooturl="http://routerip/sys_cfg_valid.xgi?exeshell=submit REBOOT"
:o
-
Yes? ???
-
I just open this thread http://forums.dlink.com/index.php?topic=59519.0 (http://forums.dlink.com/index.php?topic=59519.0) thanks
-
;)
I just open this thread http://forums.dlink.com/index.php?topic=59519.0 (http://forums.dlink.com/index.php?topic=59519.0) thanks
-
I just registered to add how I did it with my D-Link DHP-1565
curl -v --max-time 10 --connect-timeout 1 -u admin:pswd http://192.168.0.1/reboot.cgi -d "html_response_page=count_down.asp&html_response_return_page=tools_system.asp&html_response_message=The Reboot running&result_timer=50&action=reboot" > /dev/null
I hope it helps on other routers too!!
-
Thanks for posting this information.
Can you give more detail on how this code is actually executed? What are the exact step and what application(s) are needed?
I just registered to add how I did it with my D-Link DHP-1565
curl -v --max-time 10 --connect-timeout 1 -u admin:pswd http://192.168.0.1/reboot.cgi -d "html_response_page=count_down.asp&html_response_return_page=tools_system.asp&html_response_message=The Reboot running&result_timer=50&action=reboot" > /dev/null
I hope it helps on other routers too!!