From 5774abe9383f8bc98ea04749337b6ff251aee9fd Mon Sep 17 00:00:00 2001 From: thek4n Date: Mon, 28 Apr 2025 21:50:44 +0300 Subject: [PATCH] genpass --- home/user/.local/bin/genpass | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/home/user/.local/bin/genpass b/home/user/.local/bin/genpass index 4398f2c..1f7fae9 100755 --- a/home/user/.local/bin/genpass +++ b/home/user/.local/bin/genpass @@ -2,4 +2,6 @@ set -ue -openssl rand -base64 12 \ No newline at end of file +len="${1:-20}" + +LC_ALL=C tr -dc 'A-Za-z0-9@#%^&*()_+=-{}[]:;<>,.?/' < /dev/urandom | head -c "${len}"| xargs echo