Created
June 15, 2019 23:40
-
-
Save jahir/45aebc0148f27f8d1cb7208a22ca8042 to your computer and use it in GitHub Desktop.
fritzbox reconnect
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
#!/bin/sh | |
#wget -qO- "http://fritz.box:49000/igdupnp/control/WANIPConn1" --header "Content-Type: text/xml; charset="utf-8"" --header "SoapAction:urn:schemas-upnp-org:service:WANIPConnection:1#GetExternalIPAddress" --post-data="<?xml version='1.0' encoding='utf-8'?> <s:Envelope s:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/' xmlns:s='http://schemas.xmlsoap.org/soap/envelope/'> <s:Body> <u:GetExternalIPAddress xmlns:u='urn:schemas-upnp-org:service:WANIPConnection:1' /> </s:Body> </s:Envelope>" | grep -Eo '\<[[:digit:]]{1,3}(\.[[:digit:]]{1,3}){3}\>' | |
#wget -q "http://fritz.box:49000/upnp/control/wanipconnection1" --header='Content-Type: text/xml; charset="utf-8"' --header='SoapAction: urn:dslforum-org:service:WANIPConnection:1#ForceTermination' --post-data='<?xml version="1.0" encoding="utf-8"?> <s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:Body> <u:ForceTermination xmlns:u="urn:dslforum-org:service:WANIPConnection:1" /> </s:Body> </s:Envelope>' | |
#wget \ | |
# --header='Content-Type: text/xml; charset="utf-8"' \ | |
# --header='SoapAction: urn:schemas-upnp-org:service:WANIPConnection:1#ForceTermination' \ | |
# --post-data='<?xml version="1.0" encoding="utf-8"?><s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><u:ForceTermination xmlns:u="urn:schemas-upnp-org:service:WANIPConnection:1"></u:ForceTermination></s:Body></s:Envelope>' \ | |
# 'http://fritz.box:49000/igdupnp/control/WANIPConn1' | |
curl \ | |
-H 'Content-Type: text/xml; charset="utf-8"' \ | |
-H "SoapAction: urn:schemas-upnp-org:service:WANIPConnection:1#ForceTermination" \ | |
-d '<?xml version="1.0" encoding="utf-8"?> <s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:Body> <u:ForceTermination xmlns:u="urn:schemas-upnp-org:service:WANIPConnection:1" /> </s:Body> </s:Envelope>' \ | |
"http://fritz.box:49000/igdupnp/control/WANIPConn1" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment