From 24d9ed7bb37d453973d3807f4c598149aa583b0e Mon Sep 17 00:00:00 2001 From: AuxXxilium Date: Sun, 10 Nov 2024 18:44:21 +0100 Subject: [PATCH] arc-functions: make hwid unique Signed-off-by: AuxXxilium --- files/initrd/opt/arc/arc-functions.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/initrd/opt/arc/arc-functions.sh b/files/initrd/opt/arc/arc-functions.sh index 89b3afde..c22cc98b 100755 --- a/files/initrd/opt/arc/arc-functions.sh +++ b/files/initrd/opt/arc/arc-functions.sh @@ -2198,7 +2198,7 @@ function getpatfiles() { # Generate HardwareID function genHardwareID() { while true; do - HWID="$(echo $(ifconfig | grep eth0 | awk '{print $NF}' | sed 's/://g') | sha256sum | awk '{print $1}' | cut -c1-16)" 2>/dev/null + HWID="$(echo $(ifconfig | grep eth0 | awk '{print $NF}' | sed 's/://g') $(cat /proc/cpuinfo | grep "model name" | cut -d':' -f2 | head -1) | sha256sum | awk '{print $1}' | cut -c1-16)" 2>/dev/null if [ -n "${HWID}" ]; then USERID="$(curl -skL "https://arc.auxxxilium.tech?hwid=${HWID}")" if echo "${USERID}" | grep -vq "Hardware ID"; then @@ -2228,7 +2228,7 @@ function genHardwareID() { ############################################################################### # Check HardwareID function checkHardwareID() { - HWID="$(echo $(ifconfig | grep eth0 | awk '{print $NF}' | sed 's/://g') | sha256sum | awk '{print $1}' | cut -c1-16)" 2>/dev/null + HWID="$(echo $(ifconfig | grep eth0 | awk '{print $NF}' | sed 's/://g') $(cat /proc/cpuinfo | grep "model name" | cut -d':' -f2 | head -1) | sha256sum | awk '{print $1}' | cut -c1-16)" 2>/dev/null USERID="$(curl -skL "https://arc.auxxxilium.tech?hwid=${HWID}")" if echo "${USERID}" | grep -vq "Hardware ID"; then writeConfigKey "arc.hwid" "${HWID}" "${USER_CONFIG_FILE}"