arc-functions: more logic fix

Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
AuxXxilium 2024-11-15 15:20:33 +01:00
parent c4cc0b779a
commit 16a73afe9d

View File

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