Fix fritz box example for newer routers

This commit is contained in:
Sandro Jäckel 2019-04-06 13:14:47 +02:00 committed by GitHub
parent 02c983a991
commit d90d6799d3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -15,6 +15,6 @@
curl -s -H 'Content-Type: text/xml; charset="utf-8"' \ curl -s -H 'Content-Type: text/xml; charset="utf-8"' \
-H 'SOAPAction: urn:schemas-upnp-org:service:WANIPConnection:1#GetExternalIPAddress' \ -H 'SOAPAction: urn:schemas-upnp-org:service:WANIPConnection:1#GetExternalIPAddress' \
--data-binary '<?xml version="1.0" encoding="utf-8"?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:GetExternalIPAddress xmlns:u="urn:schemas-upnp-org:service:WANIPConnection:1" /></s:Body></s:Envelope>' \ -d '<?xml version="1.0" encoding="utf-8"?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <s:Body> <u:GetExternalIPAddress xmlns:u="urn:schemas-upnp-org:service:WANIPConnection:1" /></s:Body></s:Envelope>' \
http://169.254.1.1:49000/upnp/control/WANCommonIFC1 | \ 'http://fritz.box:49000/igdupnp/control/WANIPConn1' | \
sed -n -e 's#^.*<NewExternalIPAddress>\(.*\)</NewExternalIPAddress>.*$#\1#p' grep -Eo '\<[[:digit:]]{1,3}(\.[[:digit:]]{1,3}){3}\>'