Created
September 7, 2016 07:37
-
-
Save games647/a1fb286c79a3f0ef9785c708129f31c5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
from pysimplesoap.client import SoapClient | |
location = 'http://fritz.box:49000/igdupnp/control/WANCommonIFC1' | |
namespace = 'urn:schemas-upnp-org:service:WANCommonInterfaceConfig:1' | |
action = 'urn:schemas-upnp-org:service:WANCommonInterfaceConfig:1#' | |
debug = False # display http/soap requests and responses | |
client = SoapClient(location, action, namespace, trace=debug) | |
response = client.GetCommonLinkProperties() | |
upspeed = int(response.GetCommonLinkPropertiesResponse.NewLayer1UpstreamMaxBitRate) | |
downspeed = int(response.GetCommonLinkPropertiesResponse.NewLayer1DownstreamMaxBitRate) | |
response2 = client.GetAddonInfos() | |
newbytesendrate = int(response2.GetAddonInfosResponse.NewByteSendRate) | |
newbytereceiverate = int(response2.GetAddonInfosResponse.NewByteReceiveRate) | |
print(upspeed, downspeed, newbytesendrate, newbytereceiverate) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment