-
Notifications
You must be signed in to change notification settings - Fork 54
Made dslforum version, works with Huawei Hg658c and other Huawei devices (probably) #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
ngharo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spotted a couple issues.
Thanks for taking the time to submit a PR!
| @@ -1,3 +1,4 @@ | |||
| """Adapted the code to make a Huawei version that uses dslforum schemas""" | |||
| #!/bin/python | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The shebang should always come first
| res = res.replace("\n", ""); | ||
| res = res.replace("\t", ""); | ||
| pres = res.split("<serviceId>urn:upnp-org:serviceId:WANIPConn1</serviceId>"); | ||
| pres = res.split("<serviceId>urn:dslforum-org:serviceId:WANIPConn1</serviceId>"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be better to try both or make it configurable. While you're adding support for your devices, it probably is breaking support for the others.
| ctrl = p3res[1]; | ||
| open_ports = urllib2.Request("http://"+rhost[1]+""+ctrl, opmsg); | ||
| open_ports.add_header("SOAPACTION", '"urn:schemas-upnp-org:service:WANIPConnection:1#GetGenericPortMappingEntry"'); | ||
| open_ports.add_header("SOAPACTION", '"urn:dslforum-org :service:WANIPConnection:1#GetGenericPortMappingEntry"'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like an extra space here
|
Thanks for the PR! I agree with ngharo, "Might be better to try both or
make it configurable. While you're adding support for your devices, it
probably is breaking support for the others."
…On Mon, Oct 28, 2019 at 5:20 PM ngharo ***@***.***> wrote:
@ngharo <https://github.com/ngharo> requested your review on: #1
<#1> Made dslforum version,
works with Huawei Hg658c and other Huawei devices (probably).
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub
<#1?email_source=notifications&email_token=AA7IILC4UGWSVAYZDLR4TL3QQ5QULA5CNFSM4JFRQWX2YY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOUPWXQOI#event-2750249017>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA7IILC3AV47PXMBJJSD5ALQQ5QULANCNFSM4JFRQWXQ>
.
|
No description provided.