Giter Site home page Giter Site logo

Comments (12)

balloob avatar balloob commented on September 16, 2024

pynetgear uses the Netgear SOAP api which communicates over HTTP. Port 5555
uses a freeciv protocol so this will not work.

On Sat, Mar 19, 2016 at 4:48 PM, DVDave15 [email protected] wrote:

Ok, this is not really an "issue" but perhaps it will allow pynetgear to
work with the Netgear WNR2000v4 which it doesn't seem to work with.

I think NETGEAR Genie talks to the WNR2000v4 on port 5555. When I run an
nmap against my WNR2000v4 I get this output:

Nmap scan report for 192.168.0.1
Host is up (0.017s latency).
Not shown: 995 closed ports
PORT STATE SERVICE
53/tcp open domain
80/tcp open http
3333/tcp open dec-notes
5555/tcp open freeciv
49152/tcp open unknown

When I ran NETGEAR Genie while watching in WireShark, I saw a lot of
communication to port 5555 which I didn't see otherwise.

I think if the port can be specified, it may just work. If you allow that
option I can give it a try and let you know.

Or if you have a better way of figuring it out, let me know, I'm happy to
help.


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#6

PaulusSchoutsen.nl
It's nice to be important but it's more important to be nice.

from pynetgear.

 avatar commented on September 16, 2024

Oh, so it uses a completely different protocol? I didn't realize freeciv was a protocol, I just thought it was an open source game from a long time ago and Netgear was using the same port it used. Sorry about that, but thanks for the response! :)

from pynetgear.

 avatar commented on September 16, 2024

Ok, sorry to be a pest, but I am now fairly certain NETGEAR Genie is speaking SOAP on port 5555 to my WNR2000v4 as I looked through the captured content and found SOAP requests very similar to the ones you captured here: https://github.com/balloob/pynetgear/tree/master/capture.

If I have time I will see if I can download the pynetgear source and see if I can figure out if I can make it work. I don't know python, but I might be able to figure it out.

from pynetgear.

balloob avatar balloob commented on September 16, 2024

It looks like your nmap protocol report was off then.

You can change the port by changing this line:
https://github.com/balloob/pynetgear/blob/master/pynetgear/__init__.py#L23

On Sat, Mar 19, 2016 at 6:49 PM, DVDave15 [email protected] wrote:

Ok, sorry to be a pest, but I am now fairly certain NETGEAR Genie is
speaking SOAP on port 5555 to my WNR2000v4 as I looked through the captured
content and found SOAP requests very similar to the ones you captured here:
https://github.com/balloob/pynetgear/tree/master/capture.

If I have time I will see if I can download the pynetgear source and see
if I can figure out if I can make it work. I don't know python, but I might
be able to figure it out.


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#6 (comment)

PaulusSchoutsen.nl
It's nice to be important but it's more important to be nice.

from pynetgear.

 avatar commented on September 16, 2024

Yeah, I think nmap just reports port 5555 as "freeciv" as the freeciv people registered that port with the name "freeciv". Yeah, I figured that was where to make the change, I'm more concerned with getting a python environment setup and running. I should be able to figure it out. I'll post back. :)

Thanks for putting up with me. :)

from pynetgear.

 avatar commented on September 16, 2024

Well I'm closer... By changing to port 5555 it is connecting, but something isn't quite right because I get this response:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><s:Fault>s:ClientUPnPError401Invalid Action/s:Fault/s:Body/s:Envelope

Which looks like either a 401 (bad username / password) or an invalid action. I even tried this while hardwired without a username and password, but it did not work.

Looking at the request compared to what I captured in wireshark, they look very close. I even updated the SOAP_LOGIN with namespaces, but with no luck. I think the Genie uses http 1.0 and the python library uses 1.1, but I doubt that would be it...

I might try a bit more.

from pynetgear.

 avatar commented on September 16, 2024

Ok, I tried the other open ports, and low and behold port 80 works perfect. So if we just allow specifying the port in the script, everything will work perfect. I can try to issue a pull request if you like. Let me know. But anyway, sounds like a simple and easy solution! :)

from pynetgear.

balloob avatar balloob commented on September 16, 2024

Awesome. Yeah a pr would be great. Just make sure the default port is the
original one

On Wed, Mar 23, 2016, 18:39 DVDave15 [email protected] wrote:

Ok, I tried the other open ports, and low and behold port 80 works
perfect. So if we just allow specifying the port in the script, everything
will work perfect. I can try to issue a pull request if you like. Let me
know. But anyway, sounds like a simple and easy solution! :)


You are receiving this because you commented.

Reply to this email directly or view it on GitHub
#6 (comment)

from pynetgear.

 avatar commented on September 16, 2024

Ok, it looks like I don't have permissions (Or I haven't done the push correctly) to push my branch to origin. So, I went old school and created a patch. I hope this works for you.

Thanks!
pynetgear.patch.zip

from pynetgear.

 avatar commented on September 16, 2024

If you like this, and want me to try to make an update to the home-assistant project to also allow specifying the port, let me know and I can try to get that done for you.

from pynetgear.

balloob avatar balloob commented on September 16, 2024

Applied your patch: fe8b6c7 Thanks!

Uploaded new version as 0.3.3 to PyPi.

For Home Assistant, press the fork button on GitHub, git clone your forked repo and you should be able to push to your repo. Then from your repo you can open a PR on GitHub to my Home Assistant repo.

from pynetgear.

 avatar commented on September 16, 2024

Ah, yeah, I was starting to go that route after uploading the patch, but ran out of time. :-)
Thanks again!

from pynetgear.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.