Reply

LogoutNighthawk(R) X4S R7800 manage via python

Liditek
Follower

LogoutNighthawk(R) X4S R7800 manage via python

Hi,

I would like to receive data from the router usign python, like connected devices.

any idea?

 

Model: R7800|Nighthawk X4S AC2600 Wifi Router
Message 1 of 5
microchip8
Master

Re: LogoutNighthawk(R) X4S R7800 manage via python

there is no Python interpreter running on the router. I don't think you can fetch data with Python

Routing: NETGEAR R7800 - Voxel Firmware 1.0.2.88SF & Kamoj addon
Switching: 2x NETGEAR 8-ports (GS108v4) / 1x NETGEAR 16-ports (JGS516v2)
Desktop: AMD Ryzen 7 3700X - Server: Intel Core i7-7700K - NAS: Intel Pentium G4400 - Cruncher: Intel Core i5-7400
Message 2 of 5
antinode
Guru

Re: LogoutNighthawk(R) X4S R7800 manage via python

> I would like to receive data from the router usign python, like
> connected devices. [...]

 

   Why Python?

 


> there is no Python interpreter running on the router. I don't think
> you can fetch data with Python

 

   There's no Firefox running on the router, either, but I can
certainly fetch data from the router using Firefox.

 


   The basic problem with using the management web site to do anything
is its heavy reliance on JavaScript, so that anything less than a
JavaScript-capable web browser will have a very hard time getting much
useful information from it.  My Python expertise is nil, but if it lacks
a JavaScript engine, then I'd guess that you're doomed if you want a
pure-Python solution.  (I'd expect a program like cURL or Wget to suffer
from the same basic problem.)

 

   If you could spawn out a real web browser job to fetch an actual
"Attached Devices" web page (which sounds hard enough to me), then you
ought to be able to parse the resulting HTML, and extract the desired
data.

 

   These routers typically also offer an unsupported Telnet/shell
interface, which might offer some additional hope, but I don't know
where you'd find the information which goes into an "Attached Devices"
report.

Message 3 of 5
microchip8
Master

Re: LogoutNighthawk(R) X4S R7800 manage via python

 >There's no Firefox running on the router, either, but I can
>certainly fetch data from the router using Firefox.

 

True

 

but there is a web server and a site running which is a requirement for a browser to display something

Routing: NETGEAR R7800 - Voxel Firmware 1.0.2.88SF & Kamoj addon
Switching: 2x NETGEAR 8-ports (GS108v4) / 1x NETGEAR 16-ports (JGS516v2)
Desktop: AMD Ryzen 7 3700X - Server: Intel Core i7-7700K - NAS: Intel Pentium G4400 - Cruncher: Intel Core i5-7400
Message 4 of 5
antinode
Guru

Re: LogoutNighthawk(R) X4S R7800 manage via python

> but there is a web server and a site running which is a requirement
> for a browser to display something

 

   Yes, there is.  And Python, being a capable programming environment
(rather than a simple application), should have no real difficulty in
communicating with that web server, even though "there is no Python
interpreter running on the router."

 

> [...] I don't think you can fetch data with Python

 

   Even knowing as little as I do about Python, I'd bet that you're
wrong about that.  You might as well say that a C program can't "fetch
data".  I'd expect that a Web search for terms like, say,

 

      python  web  browser

 

would find many interesting things.

 

   I'd still expect the JavaScript to be a problem, unless someone has
already done that work in/for Python.  Or, you use Python to run a
JavaScript-capable browser to do the hard work.

Message 5 of 5
Top Contributors
Discussion stats
  • 4 replies
  • 514 views
  • 0 kudos
  • 3 in conversation
Announcements