From 16a73afe9d40daa48b33dd9ef7eddaadbc7086a4 Mon Sep 17 00:00:00 2001 From: AuxXxilium Date: Fri, 15 Nov 2024 15:20:33 +0100 Subject: [PATCH] arc-functions: more logic fix Signed-off-by: AuxXxilium --- files/initrd/opt/arc/arc-functions.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/files/initrd/opt/arc/arc-functions.sh b/files/initrd/opt/arc/arc-functions.sh index a3c42cf9..815ed711 100755 --- a/files/initrd/opt/arc/arc-functions.sh +++ b/files/initrd/opt/arc/arc-functions.sh @@ -2258,7 +2258,7 @@ function genHardwareID() { HWID="$(genHWID)" while true; do if [ -n "${HWID}" ]; then - USERID="$(curl -skL "https://arc.auxxxilium.tech?hwid=${HWID}" 2>/dev/null)" + USERID="$(curl -skL -m 10 "https://arc.auxxxilium.tech?hwid=${HWID}" 2>/dev/null)" if echo "${USERID}" | grep -vq "Hardware ID"; then dialog --backtitle "$(backtitle)" --title "HardwareID" \ --msgbox "HardwareID: ${HWID}\nYour HardwareID is registered to UserID: ${USERID}!" 6 70 @@ -2288,15 +2288,16 @@ function genHardwareID() { # Check HardwareID function checkHardwareID() { HWID="$(genHWID)" - USERID="$(curl -skL "https://arc.auxxxilium.tech?hwid=${HWID}" 2>/dev/null)" + USERID="$(curl -skL -m 10 "https://arc.auxxxilium.tech?hwid=${HWID}" 2>/dev/null)" if echo "${USERID}" | grep -vq "Hardware ID"; then cp -f "${S_FILE}" "${S_FILE}.bak" - if curl -skL "https://arc.auxxxilium.tech?hwid=${HWID}&userid=${USERID}" -o "${S_FILE}" 2>/dev/null; then + if curl -skL -m 10 "https://arc.auxxxilium.tech?hwid=${HWID}&userid=${USERID}" -o "${S_FILE}" 2>/dev/null; then writeConfigKey "arc.hwid" "${HWID}" "${USER_CONFIG_FILE}" writeConfigKey "arc.userid" "${USERID}" "${USER_CONFIG_FILE}" else dialog --backtitle "$(backtitle)" --title "HardwareID" \ --infobox "HardwareID: Your HardwareID couldn't be verified!" 4 50 + sleep 3 USERID="" writeConfigKey "arc.hwid" "" "${USER_CONFIG_FILE}" writeConfigKey "arc.userid" "" "${USER_CONFIG_FILE}" @@ -2304,11 +2305,11 @@ function checkHardwareID() { else dialog --backtitle "$(backtitle)" --title "HardwareID" \ --infobox "HardwareID: Your HardwareID isn't registered!" 4 50 + sleep 3 USERID="" writeConfigKey "arc.hwid" "" "${USER_CONFIG_FILE}" writeConfigKey "arc.userid" "" "${USER_CONFIG_FILE}" fi - sleep 3 return }