The password-generator
script generates a password based on given needs.
php password-generator --length=<length> --chars=<character-mapping-key>
To pass the desired password length, use the --length
option as shown in the example above.
A valid integer should be used. If an invalid integer is passed (or no length is passed at all),
the default of 12
will be used instead.
The character mapping keys are defined as follows:
numeric
- Numbers onlylowercase
- Lowercase letters onlyuppercase
- Uppercase letters onlyalpha
- Letters onlyalphanumeric
- Numbers and letters onlyspecial
- Special characters only
If no mapping is specified, the script will generate a password using all characters.
php password-generator --length=32 --chars=uppercase
Which would output something similar to:
FHNXIJNOCCBFLTJXWEWFQWMVQCOIQMOK