From d26eeb9f6397e0bd9e5027d80da045bbba04984b Mon Sep 17 00:00:00 2001 From: Florian Klemenz Date: Wed, 22 May 2024 12:41:46 +0000 Subject: [PATCH] get correct ipv6 prefix from easy box --- easyBoxCtrl.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/easyBoxCtrl.sh b/easyBoxCtrl.sh index 1f5490a..d872ab4 100755 --- a/easyBoxCtrl.sh +++ b/easyBoxCtrl.sh @@ -44,14 +44,14 @@ done RETVAL="" touch $COOKIEFILE -echo "request: http://${HOST}/main.cgi?page=login.html" 1>&2 +#echo "request: http://${HOST}/main.cgi?page=login.html" 1>&2 OUT=$($WGET "http://${HOST}/main.cgi?page=login.html" ) DM_COOKIE=$(echo $OUT | grep dm_cookie | awk -F"dm_cookie='" '{ print $2 }' | awk -F"'" '{ print $1 }') -echo "DM_COOKIE = "${DM_COOKIE} 1>&2 +#echo "DM_COOKIE = "${DM_COOKIE} 1>&2 WBM_COOKIE=$(cat $COOKIEFILE | grep "wbm_cookie_session_id" | awk -F"\t" '{ print $7 }') -echo "WBM_COOKIE = "${WBM_COOKIE} 1>&2 +#echo "WBM_COOKIE = "${WBM_COOKIE} 1>&2 # Create a 'special' cookie file without HOST and PATH (important): # cat step1_cookie.txt | sed "s/${HOST}//g" | sed 's/\t\/\t/\t\t/g' > step1_cookie_special.txt @@ -71,7 +71,8 @@ fi if [[ "$1" == "wan" && "$2" == "ipv6prefix" ]]; then echo "request: http://${HOST}/data_model.cgi" 1>&2 - POST_DATA="${DM_COOKIE}1InternetGatewayDevice.X_JUNGO_COM_TR_181.Device.IP.Interface.33948673.IPv6Prefix.2049.Prefix" + #POST_DATA="${DM_COOKIE}1InternetGatewayDevice.X_JUNGO_COM_TR_181.Device.IP.Interface.33948673.IPv6Prefix.2049.Prefix" + POST_DATA="${DM_COOKIE}1InternetGatewayDevice.X_JUNGO_COM_TR_181.Device.IP.Interface.33948673.IPv6Prefix.5121.Prefix" OUT=$($WGET \ --post-data="${POST_DATA}" \