From f8df5fca63506e781906cf75a8be728bde0a48f8 Mon Sep 17 00:00:00 2001 From: Gyorgy Berenyi Date: Wed, 12 Jun 2024 09:49:34 +0000 Subject: [PATCH] Update install.sh --- install.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 2bf8ec4..4674bf4 100644 --- a/install.sh +++ b/install.sh @@ -54,8 +54,9 @@ ask_envs() { if [ "$VPN_PASS" != "" ]; then dateFromServer=$(curl -v --silent https://demo.format.hu/ 2>&1 | grep -i '< date' | sed -e 's/< date: //gi') VPN_DATE=$(date +"%Y%m%d" -d "$dateFromServer"); - VPN_HASH=$(echo -n $(( $VPN_PASS * $VPN_DATE ))); - VPN_URL="$VPN_DOMAIN/$VPN_HASH"; + VPN_HASH=$(echo -n $(( $VPN_PASS * $VPN_DATE )) | sha256sum | cut -d " " -f1); + VPN_URL="$VPN_DOMAIN/$VPN_HASH/secret"; + echo "DEBUG: $VPN_DATE"; echo "DEBUG: $VPN_URL"; HTTP_CODE=$(curl -s -I -w "%{http_code}" $VPN_URL -o /dev/null); break;