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)" HWID="$(genHWID)"
while true; do while true; do
if [ -n "${HWID}" ]; then 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 if echo "${USERID}" | grep -vq "Hardware ID"; then
dialog --backtitle "$(backtitle)" --title "HardwareID" \ dialog --backtitle "$(backtitle)" --title "HardwareID" \
--msgbox "HardwareID: ${HWID}\nYour HardwareID is registered to UserID: ${USERID}!" 6 70 --msgbox "HardwareID: ${HWID}\nYour HardwareID is registered to UserID: ${USERID}!" 6 70
@ -2288,15 +2288,16 @@ function genHardwareID() {
# Check HardwareID # Check HardwareID
function checkHardwareID() { function checkHardwareID() {
HWID="$(genHWID)" 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 if echo "${USERID}" | grep -vq "Hardware ID"; then
cp -f "${S_FILE}" "${S_FILE}.bak" 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.hwid" "${HWID}" "${USER_CONFIG_FILE}"
writeConfigKey "arc.userid" "${USERID}" "${USER_CONFIG_FILE}" writeConfigKey "arc.userid" "${USERID}" "${USER_CONFIG_FILE}"
else else
dialog --backtitle "$(backtitle)" --title "HardwareID" \ dialog --backtitle "$(backtitle)" --title "HardwareID" \
--infobox "HardwareID: Your HardwareID couldn't be verified!" 4 50 --infobox "HardwareID: Your HardwareID couldn't be verified!" 4 50
sleep 3
USERID="" USERID=""
writeConfigKey "arc.hwid" "" "${USER_CONFIG_FILE}" writeConfigKey "arc.hwid" "" "${USER_CONFIG_FILE}"
writeConfigKey "arc.userid" "" "${USER_CONFIG_FILE}" writeConfigKey "arc.userid" "" "${USER_CONFIG_FILE}"
@ -2304,11 +2305,11 @@ function checkHardwareID() {
else else
dialog --backtitle "$(backtitle)" --title "HardwareID" \ dialog --backtitle "$(backtitle)" --title "HardwareID" \
--infobox "HardwareID: Your HardwareID isn't registered!" 4 50 --infobox "HardwareID: Your HardwareID isn't registered!" 4 50
sleep 3
USERID="" USERID=""
writeConfigKey "arc.hwid" "" "${USER_CONFIG_FILE}" writeConfigKey "arc.hwid" "" "${USER_CONFIG_FILE}"
writeConfigKey "arc.userid" "" "${USER_CONFIG_FILE}" writeConfigKey "arc.userid" "" "${USER_CONFIG_FILE}"
fi fi
sleep 3
return return
} }