Simple but funny and flexible password generator.
###Features:
#####Password generation:
- It allows you to specify the character set:
- by enabling/disabling character classes:
- emojis (Using this charset: ๐๐คฃ๐ค๐๐ฅต๐ฅถ๐คฎ๐คฏ๐ท๐ป๐พ๐ค๐ต๐๐๐๐๐ฆ ๐ข๐ธ๐ฆ๐ณ๐๐๐๐๐ฅ๐๐๐๐ฉ๐ฅจ๐ง๐ฅ๐บ๐ฌ ๐ซ๐ฏ๐ญ๐ฎ๐๐ฅ๐๐ช๐นโฝ๐๐๐ณ๐๐ฑ๐ธ๐จ๐ฅ ๐ฎ๐ฒ๐๐๐ฅ๐ ๐๐ฅ๐๐ฃโฐ๐๐งธ๐พ๐ก๐ท๐๐)
- uppercase ASCII letters
A-Z
- lowercase ASCII letters
a-z
- digits
0-9
- punctuation
!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~
- space
- by adding custom characters
- by blacklisting custom characters
- by enabling/disabling character classes:
- It allows you to specify any desired length of the password.
- It allows you to limit the maximum allowed number of occurrences of the same character, but still takes care that the password length can be reached.
#####Usage
-
######Interactive mode:
Run the script without any arguments and you get to the interactive mode which looks like this example:
$ ./pwgen.py ***** Password Generator - ยฉ 2016 ByteCommander ***** The default character set to generate passwords is this (not including the arrows): โ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~โฐโฝ๐๐๐ญ๐ฎ๐๐ ๐๐๐๐๐๐๐๐ฉ๐ช๐ซ๐ฌ๐ฏ๐บ๐๐๐จ๐ฎ๐ฑ๐ฒ๐ณ๐ธ๐๐๐๐๐๐ข๐ณ๐ต๐ธ๐ป๐พ๐๐๐ก๐ฃ๐พ๐ท๐๐ฅ๐๐๐ท๐๐๐๐น๐ค๐ค๐คฃ๐คฎ๐คฏ๐ฅ๐ฅ๐ฅ๐ฅ๐ฅ๐ฅจ๐ฅต๐ฅถ๐ฆ๐ฆ๐ง๐งธโ Do you want to change the character set? (y/N) y Do you want to allow emoji characters '๐๐คฃ๐ค๐๐ฅต๐ฅถ๐คฎ๐คฏ๐ท๐ป๐พ๐ค๐ต๐๐๐๐๐ฆ๐ข๐ธ๐ฆ๐ณ๐๐๐๐๐ฅ๐๐๐๐ฉ๐ฅจ๐ง๐ฅ๐บ๐ฌ๐ซ๐ฏ๐ญ๐ฎ๐๐ฅ๐๐ช๐นโฝ๐๐๐ณ๐๐ฑ๐ธ๐จ๐ฅ๐ฎ๐ฒ๐๐๐ฅ๐ ๐๐ฅ๐๐ฃโฐ๐๐งธ๐พ๐ก๐ท๐๐'? (Y/n) y Do you want to allow uppercase letters 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'? (Y/n) y Do you want to allow lowercase letters 'abcdefghijklmnopqrstuvwxyz'? (Y/n) y Do you want to allow digits '0123456789'? (Y/n) y Do you want to allow punctuation '!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~'? (Y/n) n Do you want to allow space ' '? (Y/n) n Please enter additional characters you want to allow (if any): -_ Please enter characters you want to blacklist (if any): Xx0๐๐ฃ The default password length is 12 characters. Enter your desired length or leave it blank to use the default: 20 By default, there is no limit how often a character may appear in the password. Enter your desired maximum duplicate character limit or leave it blank to use the default. A value of 0 means no limit: 1 And your new password is: +----------------------+ | jJ-USo๐ซDig7๐ค3eO2๐ฆREd | +----------------------+ Generate another password with the same settings? (Y/n) And your new password is: +----------------------+ | VZC๐KuQFI๐ขHjqSB๐gN9M | +----------------------+ Generate another password with the same settings? (Y/n) n Thank you for using this password generator. Have a nice day!
-
######Command-line mode:
Run the script with the command-line arguments described in its help (type
pwgen.py --help
orpwgen.py -h
or see the block below) and you use it in command-line mode. This is useful to embed this tool into your own scripts, create your personal shortcuts for it or quickly launch it with a specific configuration.Help screen:
$ ./pwgen.py -h usage: pwgen.py [-h] [-n AMOUNT] [-m LIMIT] [-e] [-q] [-u] [-l] [-d] [-p] [-s] [-a ADDITIONAL] [-b BLACKLIST] length usage: Highly customizable random password generator. ๐ค Try the emoji mode to generate random emoji-passwords ๐. positional arguments: length length of the password to generate optional arguments: -h, --help show this help message and exit -n AMOUNT, --amount AMOUNT how many passwords to create -m LIMIT, --max-duplicate-chars LIMIT limits how often the same character may occur in a password at most -e, --emoji Use the emoji mode to generate passwords with emojis ๐ -q, --quiet print only one password per line, nothing else Character set specification: -u, --uppercase include uppercase letters A-Z into the available character set -l, --lowercase include lowercase letters a-z into the available character set -d, --digits include digits 0-9 into the available character set -p, --punctuation include punctuation into the available character set -s, --space include the standard space into the available character set -a ADDITIONAL, --additional ADDITIONAL additional characters to include into the available character set -b BLACKLIST, --blacklist BLACKLIST characters to exclude from the available character set Run it without any arguments for interactive mode.
Example run:
$ ./pwgen.py 10 -ulde -a'-_' -n6 .----------------------------------------. | ๐๐ช๐ท Emoji Password Generator ๐ฎ๐น๐๐ป๐ช | | ๐ฏ 2020 Chococoin Powered by Ethturin | *----------------------------------------* Using this character set (excluding the arrows): โ-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyzโฐโฝ๐๐๐ญ๐ฎ๐๐ ๐๐๐๐๐๐๐๐ฉ๐ช๐ซ๐ฌ๐ฏ๐บ๐๐๐จ๐ฎ๐ฑ๐ฒ๐ณ๐ธ๐๐๐๐๐๐ข๐ณ๐ต๐ธ๐ป๐พ๐๐๐ก๐ฃ๐พ๐ท๐๐ฅ๐๐๐ท๐๐๐๐น๐ค๐ค๐คฃ๐คฎ๐คฏ๐ฅ๐ฅ๐ฅ๐ฅ๐ฅ๐ฅจ๐ฅต๐ฅถ๐ฆ๐ฆ๐ง๐งธโ There are no duplicate character limits. Generating 6 passwords of length 10: ๐ขX6๐๐คฏV3H๐f U๐พFA๐ฅ8kF8p ๐O5Z๐iAb๐๐พ 0๐ฎhLU๐q๐๐๐ฅจ g๐ฒ๐e๐ธM๐คฃโฝI๐ฅจ gcH๐๐พ๐ทatv๐ญ
A Project inspired by Password Generator ยฉ 2016 of ByteCommander [https://github.com/ByteCommander/PasswordGenerator]