Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- printf " \n"
- printf " \n"
- printf " _____ _ _ _ \n"
- printf "/__ /(_)_ __ ___ _ __ | | ___ / \ ___ ___ ___ \n"
- printf "\___ \| | '_ _ \| '_ \| |/ _ \ / _ \ / __/ __/ __| \n"
- printf " ___) | | | | | | | |_) | | __/ / ___ \ (_| (__\__ | \n"
- printf "|____/|_|_| |_| |_| .__/|_|\___/ / / \_\___\___|___/ \n"
- printf " | | \n"
- printf " |_| Author: @ihatemodels (Github) \n"
- printf " Gergin Darakov \n"
- printf " \n"
- printf "[*] Simple password generator with username and location assign\n"
- printf " \n"
- printf "[+] Hint: encrypt the output if you plan to store virtual ;) \n"
- printf " \n"
- printf " \n"
- read -p $'[+] Please enter how many accounts you want to assign with a passwords:\n' ACCOUNTS
- read -p $'[+] Do you want to store the log-in location of your Accounts [y/n]:\n' CHECK_LOCATION
- declare -i y=ACCOUNTS
- counter=1
- function generate () {
- PASS=$(pwgen -n -y -c $PASSLENGHT 1)
- echo $PASS
- }
- if test $y == 1
- then
- read -p $'[+]Please enter the password length:\n' PASSLENGHT
- read -p $'[+]Please enter email or username to assign the generated password:\n ' USERNAME
- PASSWORD=$(generate)
- if [ "$CHECK_LOCATION" == "y" ]
- then
- read -p $'[+]Please enter the url for the generated pair: \n ' LOCATION
- echo "[+]The password $PASSWORD is assign to $USERNAME for $LOCATION "
- echo "Location: $LOCATION Username: $USERNAME Password: $PASSWORD" >> Accounts.txt
- else
- echo "[+]The password $PASSWORD is assign to $USERNAME "
- echo "Username: $USERNAME Password: $PASSWORD" >> Accounts.txt
- fi
- elif test $y > 1
- then
- while [[ $y > 0 ]]; do
- printf "[*][*] Setting account $counter [*][*]\n *...........................*\n"
- if [ "$CHECK_LOCATION" == "y" ]
- then
- read -p $'[+]Please enter the password length: \n ' PASSLENGHT ;
- PASSWORD_MORE=$(generate)
- read -p $'[+]Please enter email or username to assign the generated password:\n ' USERNAME
- read -p $'[+]Please enter the url for the generated pair:\n ' LOCATION
- echo "[+]The password $PASSWORD_MORE is assign to $USERNAME for $LOCATION"
- echo "Location: $LOCATION Username: $USERNAME Password: $PASSWORD_MORE" >> Accounts.txt
- else
- read -p $'[+]Please enter the password length: \n ' PASSLENGHT ;
- PASSWORD_MORE=$(generate)
- read -p $'[+]Please enter email or username to assign the generated password: \n' USERNAME
- echo "[+]The password $PASSWORD_MORE is assign to $USERNAME "
- echo "Username: $USERNAME Password: $PASSWORD_MORE" >> Accounts.txt
- fi
- ((y--))
- ((counter++))
- done
- else
- exit
- fi
Add Comment
Please, Sign In to add comment