diff --git a/README.md b/README.md index 8905d93..da1909f 100644 --- a/README.md +++ b/README.md @@ -76,4 +76,12 @@ Version: 3.9.2 ## (L)inux(A)pache(M)ysql(P)HP ![](https://img.shields.io/badge/Debian%2010%20-%20error%20-%20red) ![](https://img.shields.io/badge/Debian%209%20-%20error%20-%20red) ![](https://img.shields.io/badge/Ubuntu%2018.04%20-error-%20red)
-bash <(wget -O - 'https://git.io/xxxxxx') \ No newline at end of file +bash <(wget -O - 'https://git.io/xxxxxx') + + +---- + + +## Password-Generator +![](https://img.shields.io/badge/Debian%2010-work!-green) ![](https://img.shields.io/badge/Debian%209-work!-green) ![](https://img.shields.io/badge/Ubuntu%2020.04-work!-green) ![](https://img.shields.io/badge/Ubuntu%2018.04-work!-green)
+bash <(wget -O - 'https://git.io/JYA1y') \ No newline at end of file diff --git a/sh_scripts/password-generator.sh b/sh_scripts/password-generator.sh index deaea88..0e35ad7 100644 --- a/sh_scripts/password-generator.sh +++ b/sh_scripts/password-generator.sh @@ -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 \ No newline at end of file +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