From d90d6799d319e9c4fb09ab255602353548a15d51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sat, 6 Apr 2019 13:14:47 +0200 Subject: [PATCH] Fix fritz box example for newer routers --- sample-get-ip-from-fritzbox | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sample-get-ip-from-fritzbox b/sample-get-ip-from-fritzbox index 87b986e..c17e775 100755 --- a/sample-get-ip-from-fritzbox +++ b/sample-get-ip-from-fritzbox @@ -15,6 +15,6 @@ curl -s -H 'Content-Type: text/xml; charset="utf-8"' \ -H 'SOAPAction: urn:schemas-upnp-org:service:WANIPConnection:1#GetExternalIPAddress' \ - --data-binary '' \ - http://169.254.1.1:49000/upnp/control/WANCommonIFC1 | \ - sed -n -e 's#^.*\(.*\).*$#\1#p' + -d ' ' \ + 'http://fritz.box:49000/igdupnp/control/WANIPConn1' | \ + grep -Eo '\<[[:digit:]]{1,3}(\.[[:digit:]]{1,3}){3}\>'