diff --git a/bash_scripts/fritzbox b/bash_scripts/fritzbox new file mode 100755 index 0000000..1f89877 --- /dev/null +++ b/bash_scripts/fritzbox @@ -0,0 +1,5 @@ +#!/bin/bash +curl 'http://fritz.box:49000/upnp/control/WANIPConn1' \ + -H 'Content-Type: text/xml; charset="utf-8"' \ + -H 'SoapAction: urn:schemas-upnp-org:service:WANIPConnection:1#ForceTermination' \ + -d ' ' diff --git a/bash_scripts/router b/bash_scripts/router deleted file mode 100755 index efbf142..0000000 --- a/bash_scripts/router +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -curl 'http://fritz.box:49000/upnp/control/WANIPConn1' \ - -H 'Content-Type: text/xml; charset="utf-8"' \ - -H 'SoapAction: urn:schemas-upnp-org:service:WANIPConnection:1#ForceTermination' -d ' ' diff --git a/bash_scripts/zyxel b/bash_scripts/zyxel new file mode 100644 index 0000000..14ab1d0 --- /dev/null +++ b/bash_scripts/zyxel @@ -0,0 +1,13 @@ +#!/bin/bash + +IP=192.168.1.1 +USER=admin + +# change password here +#PW= + +OLD_IP=`wget http://checkip.dyndns.org/ -O /dev/stdout 2>/dev/null | sed "s/.*Current IP Address: \([0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\).*/\1/"` +echo "Alte IP: $OLD_IP" +curl http://$USER:$PW@$IP/Forms/DiagADSL_1 -d "LineInfoDisplay=&DiagDSLDisconnect=PPPoE+Trennung" +NEW_IP=`wget http://checkip.dyndns.org/ -O /dev/stdout 2>/dev/null | sed "s/.*Current IP Address: \([0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\).*/\1/"` +echo "Neue IP: $NEW_IP"