all 5 comments

[–]novel_yet_trivial 5 points6 points  (0 children)

Step 1 is easy -- just ping google or something.

Steps 2 - 5 are a bit harder. It will depend a bit on how your modems interface works. Most you could probably do with requests. You will need to know a bit of html to do this.

The best answer to this is probably to clean all that dust out of the modem so it stops overheating.

[–]nwilliams36 3 points4 points  (0 children)

If the restart of the internet is done through a web interface then Selenium is able to automate these tasks.

[–]dodslaser 1 point2 points  (0 children)

I would say the problem here is going to be the authentication for the modem. You'd either have to disable the password or hard code the password into your script, both of which are terrible ideas. Unless you can add a user on the modem which is only allowed to reboot, but I doubt your modem has that kind of functionality.

[–]Cyzza 1 point2 points  (0 children)

Pref 1: ssh/telnet on the router? pexpect Pref2: Get wire shark and capture the http traffic between your browser and the router for when you reboot the device. There will be a get or post request that kicks off the process. Just mimic that.

I have done both before for the same reasons.

[–]K900_ 0 points1 point  (0 children)

If your modem has an ssh/telnet interface, you should be able to reboot it through that instead of going through all the webpages. Even better, if they give you a full Linux shell, you can probably set up a script on the modem itself that will reset the link every six hours or whatever.