From 03207b611740fc889d050d7a2dbd3bdddd30bd98 Mon Sep 17 00:00:00 2001 From: jetfir3 Date: Wed, 29 Jul 2026 15:38:54 -0400 Subject: [PATCH] Add binary validation --- spotx.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/spotx.sh b/spotx.sh index ad60cdf..2440fdf 100644 --- a/spotx.sh +++ b/spotx.sh @@ -940,6 +940,7 @@ run_cache_check() { final_setup_check() { [[ "${notInstalled}" ]] && { echo -e "${red}Error:${clr} Client not found\n" >&2; exit 1; } + [[ ! -f "${appBinary}" || ! -s "${appBinary}" || ! -r "${appBinary}" || ! -x "${appBinary}" ]] && { echo -e "${red}Error:${clr} Client executable not found or invalid.\nReinstall client then try again.\n" >&2; exit 1; } [[ ! -f "${xpuiSpa}" ]] && { echo -e "${red}Error:${clr} Detected a modified client installation!\nReinstall client then try again.\n" >&2; exit 1; } [[ "${clientVer}" ]] && (($(ver "${clientVer}") < $(ver "1.1.59.710"))) && { echo -e "${red}Error:${clr} ${clientVer} not supported by SpotX-Bash\n" >&2; exit 1; } }