twstokes / arris-scrape

Arris modem status page scraper that uploads signal values to InfluxDB and Grafana.
https://www.tannr.com/2021/03/22/scraping-an-arris-cable-modem-status-page/
MIT License
11 stars 7 forks source link

SB6190 Requires Login - COX #10

Open danfoxley opened 1 year ago

danfoxley commented 1 year ago

My Arris SB6190 requires login. No status is shown until login. If u/p is required, do you have any pointer to having this work with U/P requirement?

Going straight to status page URL: http://192.168.100.1/cgi-bin/status

redirects me to:

http://192.168.100.1/cgi-bin/adv_pwd_cgi image

twstokes commented 1 year ago

If u/p is required, do you have any pointer to having this work with U/P requirement?

👋 Hi @danfoxley - it's doable, but would require some work to this script.

I'd start out by recording the requests your web browser makes using a tool like Chrome's DevTools. You'll most likely see an HTTP POST with your plaintext username and password sent to the modem, and then get a cookie in return.

So at a minimum this script would need to be updated to:

  1. Detect when http://192.168.100.1/cgi-bin/status (assuming that's your correct status URL once logged in) redirects because auth failed (e.g. no cookie, or an expired one)
  2. Send the POST request with a stored username / password
  3. Store the cookie and add it to the polling request that gets scraped

If my modem required a login I'd add it to this script, but unfortunately I can't use this scraper anymore. Since upgrading my modem for faster speeds I don't even have a status page. 😐