just a simple question. Is there a way to access the router settings via c++? My friend wanted me to write something that would turn off wifi broadcasting on his router when pressing the button in the program.
The only way I can think about is to connect to the router via .net framework and then use reverse engineering (on the router settings site) to find a way how to simulate change of option via POST or GET method.
Is there any other better way?
PS: Or maybe to turn off the whole router would be ok too. Any suggestions how to do that?
I would use WebRequest() from .net, look for it on MSDN help.
It's not problem to login, but then you have to know what to send to the router. I am not sure how to recognize that. Never did reverse engineering before.
Maybe I will experiment a bit with Firebug.
I had to examine how does the router options page send data after saving the changes.
Used browser plugin called Firebug. I found that it uses GET method to post the parameters which can be written like a link with some additional info.
In our case like this: http://192.168.1.1/userRpm/WlanNetworkRpm.htm?ssid=changedName
So this is all I need. Then just use simple .net functions for connecting to the router and send this link with the parameters I wanna change.
I guess there are many ways to avoid using .net especially in c++ but this is simple and fast.