Last active
February 26, 2016 18:41
-
-
Save jmark/db788180a2648ae08031 to your computer and use it in GitHub Desktop.
Bash script: Force reconnect for router Fritz!Box 7360 SL (FRITZ!OS: 06.20)
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/bash | |
# date: 2015-01-24 | |
# Inspiration from: http://www.gtkdb.de/index_7_1302.html | |
payload=$(cat <<EOF | |
<?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> | |
EOF | |
) | |
curl \ | |
-s 'http://fritz.box:49000/igdupnp/control/WANIPConn1' \ | |
-H 'Content-Type: text/xml; charset=utf-8' \ | |
-H 'SoapAction: urn:schemas-upnp-org:service:WANIPConnection:1#ForceTermination' \ | |
-d "$payload" \ | |
>/dev/null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment