mirror of
https://github.com/MrUnknownDE/linux-script.git
synced 2026-04-09 18:03:49 +02:00
add password-generator with nice function lul
This commit is contained in:
10
README.md
10
README.md
@@ -76,4 +76,12 @@ Version: 3.9.2
|
||||
|
||||
## (L)inux(A)pache(M)ysql(P)HP
|
||||
  <br>
|
||||
<code>bash <(wget -O - 'https://git.io/xxxxxx')</code>
|
||||
<code>bash <(wget -O - 'https://git.io/xxxxxx')</code>
|
||||
|
||||
|
||||
----
|
||||
|
||||
|
||||
## Password-Generator
|
||||
   <br>
|
||||
<code>bash <(wget -O - 'https://git.io/JYA1y')</code>
|
||||
@@ -1,5 +1,33 @@
|
||||
#!/usr/bin/env sh
|
||||
echo 'Generating 32-character passwords'
|
||||
for ((n=0;n<100;n++))
|
||||
GEN_PW_SSH=$(for ((n=0;n<1;n++))
|
||||
do dd if=/dev/urandom count=1 2> /dev/null | uuencode -m - | sed -ne 2p | cut -c-32
|
||||
done)
|
||||
GEN_PW_SSH_KEY=$(for ((n=0;n<1;n++))
|
||||
do dd if=/dev/urandom count=1 2> /dev/null | uuencode -m - | sed -ne 2p | cut -c-128
|
||||
done
|
||||
done)
|
||||
GEN_PW_FTP=$(for ((n=0;n<1;n++))
|
||||
do dd if=/dev/urandom count=1 2> /dev/null | uuencode -m - | sed -ne 2p | cut -c-32
|
||||
done)
|
||||
GEN_PW_MYSQL=$(for ((n=0;n<1;n++))
|
||||
do dd if=/dev/urandom count=1 2> /dev/null | uuencode -m - | sed -ne 2p | cut -c-32
|
||||
done)
|
||||
GEN_PW_MAIL=$(for ((n=0;n<1;n++))
|
||||
do dd if=/dev/urandom count=1 2> /dev/null | uuencode -m - | sed -ne 2p | cut -c-32
|
||||
done)
|
||||
|
||||
if [[ -f $(which uuencode 2>/dev/null) ]]
|
||||
then
|
||||
echo "SSH-Password: $GEN_PW_SSH"
|
||||
echo "SSH-KEY-Password: $GEN_PW_SSH_KEY"
|
||||
echo "FTP User Password: $GEN_PW_FTP"
|
||||
echo "MYSQL User Password: $GEN_PW_MYSQL"
|
||||
echo "e-Mail User Password: $GEN_PW_MAIL"
|
||||
else
|
||||
apt update && apt install sharutils
|
||||
echo "SSH-Password: $GEN_PW_SSH"
|
||||
echo "SSH-KEY-Password: $GEN_PW_SSH_KEY"
|
||||
echo "FTP User Password: $GEN_PW_FTP"
|
||||
echo "MYSQL User Password: $GEN_PW_MYSQL"
|
||||
echo "e-Mail User Password: $GEN_PW_MAIL"
|
||||
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user