sha256sum
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-06-11 15:37:48 +00:00
parent f47929e1a2
commit d730a1507f

View File

@@ -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;