Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'x-ui.sh')
-rw-r--r--x-ui.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/x-ui.sh b/x-ui.sh
index e9e2d831..e26dcce2 100644
--- a/x-ui.sh
+++ b/x-ui.sh
@@ -243,8 +243,9 @@ reset_user() {
gen_random_string() {
local length="$1"
- local random_string=$(LC_ALL=C tr -dc 'a-zA-Z0-9' </dev/urandom | fold -w "$length" | head -n 1)
- echo "$random_string"
+ openssl rand -base64 $(( length * 2 )) \
+ | tr -dc 'a-zA-Z0-9' \
+ | head -c "$length"
}
reset_webbasepath() {