Information Security Stack Exchange is a question and answer site for information security professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was wondering if it is possible to change the password for a wifi with a script instead of having to log-in to the routers firmware?

share|improve this question
If it is, it's a serious vulnerability. You could use a Windows Shell or Bash script (or even an iMacro) to automate the login and navigation (assuming you know the login i the first place), but I seriously doubt any router manufacturer would ever be stupid enough to specifically allow scripted, unauthenticated password resets. – KeithS Jan 2 '13 at 20:54
This is not a security question - it's more about programming / administration. As such, it's off topic. – Polynomial Jan 2 '13 at 21:03
@KeithS Actually, it's often possible to update the wifi password via SNMP or UPnP. The "authentication" is the fact that you have an IP address. Weak, but home routers are hilariously deficient at security anyway. – Polynomial Jan 2 '13 at 21:04
It's mostly a poor question. The final meaning seem not clear. I would write something like what have you tried... but?! – F. Hauri Jan 2 '13 at 23:11

It is possible to do this with a script, but the script will have to "login to the routers firmware."

So, if you are trying to do this as a way of avoiding having to login..then no.

If you have the router credentials, and are looking for a way to automate the changing of keys, then yes, this is entirely possible. Also, like Polynomial said, it is sometimes possible to do this with built in management protocols. It would depend on the Make/Model of your router though.

More details are needed if you want specifics.

share|improve this answer

I'm not aware of any routers providing an easy API to change your wifi password in an automatic fashion.

However, every wifi router that I have used makes it possible to change the wifi password by logging into the router through a web browser using HTTP requests (GET / POST).

Thus its possible to automate out these activities if you want; granted it will be specific to your specific webbrowser. E.g., in python I can get to my router with using requests

import requests
pw = '<replace_this_with_your_password>'
requests.get('', auth=('admin', pw))

Granted how to change the password, depends on the specific router, what POST variables it wants, what URL is required, etc.

share|improve this answer

Yes.. and no.

It's possible to do anything you want, but you have to address correct problem to right target:

As the first manager of your access via wifi is THE wifi router himself, the first thing to consider IS the router.

Depending on which router you use. I like DD-WRT open software as router's firmware. Based on Linux, I'm in known envionment. Support SSH remote access, with ssh keys, shell scripting, cron and a lot of other feature I know and have well tools and samples.

Secondly (if else), you could enable Radius on wifi router than maintain logins on radius server.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.