From 4348140a781e2fa6ca86beed35a98dd9d21080a9 Mon Sep 17 00:00:00 2001 From: Kookiejarz Date: Sun, 8 Mar 2026 20:08:36 -0400 Subject: [PATCH] update gen_random_string for all three scripts --- install.sh | 1 - update.sh | 5 +++-- x-ui.sh | 5 +++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/install.sh b/install.sh index 8b9aed57..af6b8a51 100644 --- a/install.sh +++ b/install.sh @@ -105,7 +105,6 @@ install_base() { gen_random_string() { local length="$1" - # openssl output base64, no need /dev/urandom + tr openssl rand -base64 $(( length * 2 )) \ | tr -dc 'a-zA-Z0-9' \ | head -c "$length" diff --git a/update.sh b/update.sh index 5dce0ce3..9365bf8a 100755 --- a/update.sh +++ b/update.sh @@ -100,8 +100,9 @@ is_port_in_use() { gen_random_string() { local length="$1" - local random_string=$(LC_ALL=C tr -dc 'a-zA-Z0-9'