diff --git a/files/initrd/opt/arc/arc-functions.sh b/files/initrd/opt/arc/arc-functions.sh index 9f741ce4..1a7050d3 100755 --- a/files/initrd/opt/arc/arc-functions.sh +++ b/files/initrd/opt/arc/arc-functions.sh @@ -2313,6 +2313,29 @@ function checkHardwareID() { return } +############################################################################### +# Check HardwareID +function checkHardwareIDsilence() { + HWID="$(genHWID)" + USERID="$(curl -skL -m 10 "https://arc.auxxxilium.tech?hwid=${HWID}" 2>/dev/null)" + [ ! -f "${S_FILE}.bak" ] && cp -f "${S_FILE}" "${S_FILE}.bak" 2>/dev/null || true + if echo "${USERID}" | grep -vq "Hardware ID"; 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 + writeConfigKey "arc.hwid" "" "${USER_CONFIG_FILE}" + writeConfigKey "arc.userid" "" "${USER_CONFIG_FILE}" + mv -f "${S_FILE}.bak" "${S_FILE}" 2>/dev/null + fi + else + USERID="" + writeConfigKey "arc.hwid" "" "${USER_CONFIG_FILE}" + writeConfigKey "arc.userid" "" "${USER_CONFIG_FILE}" + mv -f "${S_FILE}.bak" "${S_FILE}" 2>/dev/null + fi + return +} ############################################################################### # Bootsreen Menu diff --git a/files/initrd/opt/arc/arc.sh b/files/initrd/opt/arc/arc.sh index 5c6c1b19..025adba4 100755 --- a/files/initrd/opt/arc/arc.sh +++ b/files/initrd/opt/arc/arc.sh @@ -92,7 +92,7 @@ function arcModel() { if [ ! -f "${S_FILE}" ] || [ ! -f "${P_FILE}" ]; then updateConfigs else - checkHardwareID + checkHardwareIDsilence fi dialog --backtitle "$(backtitlep)" --title "Model" \ --infobox "Reading Models..." 3 25 @@ -957,7 +957,7 @@ else b) addonMenu; NEXT="b" ;; d) modulesMenu; NEXT="d" ;; e) ONLYVERSION="true" && arcVersion; NEXT="e" ;; - p) ONLYPATCH="true" && checkHardwareID && arcPatch; NEXT="p" ;; + p) ONLYPATCH="true" && checkHardwareIDsilence && arcPatch; NEXT="p" ;; S) storageMenu; NEXT="S" ;; o) dtsMenu; NEXT="o" ;; g) governorMenu; NEXT="g" ;;