NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
Patou034
Mar 22, 2018Aspirant
Curl does not work any more since upgrade to 6.9.3 on RN316
Hello, I'm using following command to shutdown my RN316, but it is no more working since update to 6.9.3 : curl -u admin:$1 -k "https://$2/dbbroker" -H "Content-Type: application/x-www-form-u...
mdgm-ntgr
Mar 26, 2018NETGEAR Employee Retired
This changed behaviour is expected. Your app/script will need to be longer on 6.9.3.
When sending the NML command or upload files to NAS over LAN, the APP needs to send the csrfpId token and login credentials in the HTTP request header. To get the csrfpId token, the app needs to request this webpage http://nas_ip/admin/csrf.html with the admin login credentials.
And then parse the html file to get the csrfpId token.
The csrf.html includes a script element which has the csrfpId token.
For example,
<script type="text/javascript">
<!--
csrfInsert("csrfpId", "mKrWJJlKMv5iqXUcSK7dEruWxdSbSqNi713aOVNCpYkLIA1wWmCUhmoZeV8EJ-jfXb6X6K6rT9InWOSd_OPiWPeonCpp01LC");
//-->
</script>
Then the app shall add a HTTP header "csrfpId" with the token. The csrfpId can also be added to URL query parameters or upload form. The token expiry occurs after 3600 seconds by default. When the token has expired, if the app sends a NML command to the NAS, the NAS returns status code 403. The app needs to get a new token with the above steps.
DIYJeff
Mar 30, 2018Aspirant
Just what I needed. I saw that the it needed the csrfpld token, but did not know how to get it. Thanks my code is now working again.
- AemstelMar 31, 2018Tutor
Like Shadowl0rd, I also don't know how to write this code and copy/pasted the code I've been using for years, which now doesn't work anymore. Could anyone with a new working script please share their script here? Preferably for a .bat file, like in the first post. Much appreciated.
- SandsharkMar 31, 2018Sensei
This sounds like a place where Netgear should consider writing a program, so that the password is not stored in the clear. Ideally, something that can be called from a backup job. Even better would be the ability to send a WoL packet as well.
Let's call the program ReadyCTL. Script does:
ReadyCTL wakeup NAS1
<insert backup software command here>
ReadyCTL shutdown NAS1
Before all this, the user configures the program through the GUI with the NAS1 IP address (and others if he has them), admin name, and password and the program stores the name and password encrypted.
Building this into the NAS backup system would also be great.
- StephenBApr 02, 2018Guru - Experienced User
Sandshark wrote:
This sounds like a place where Netgear should consider writing a program, so that the password is not stored in the clear. Ideally, something that can be called from a backup job. Even better would be the ability to send a WoL packet as well.
Let's call the program ReadyCTL. Script does:
ReadyCTL wakeup NAS1
<insert backup software command here>
ReadyCTL shutdown NAS1
Before all this, the user configures the program through the GUI with the NAS1 IP address (and others if he has them), admin name, and password and the program stores the name and password encrypted.
Building this into the NAS backup system would also be great.
Maybe post this on the idea exchange. FWIW, I'd like to see a general WoL app for OS6 NAS.
Related Content
NETGEAR Academy
Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!