passhash
Generate password hashes based on various standards. Most UNIX crypt standards are supported, along with a selection of Microsoft, Cisco, and LDAP-based standards.
Installation
pipx install passhash
Usage
By default, passhash will prompt for a password and generate a UNIX-style SHA2-512 hash:
passhash
Password:
โโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโณโโโโโโโโโ
โ Method โ Hash โ Time โ
โกโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฉ
โ sha512_crypt โ $6$rounds=656000$ohgWV4S9N2wPmYsN$7ZR6zmTAy5ePkrjnEnOUyOuF3pRE4TLvucwSs4AewUcOC59YawNkXap โ 0.559s โ
โ โ AkqqUNJfcHuo0es6mGRQJO36EGz3aY/ โ โ
โโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโ
A random password can be generated instead with the --generate
option:
passhash --generate
Password: am3YVAbcMxK
โโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโณโโโโโโโโโ
โ Method โ Hash โ Time โ
โกโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฉ
โ sha512_crypt โ $6$rounds=656000$M4iIIAbmfVYVytIF$/MrspoGH6PMDq7IeS3RFPFhedUdGoYIddq7KAuYXAH4pYRI1Ge.3ykb โ 0.580s โ
โ โ yO2PrTleh4kna.t22CnjefckO5XlyJ1 โ โ
โโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโ
Additional parameters such as the salt can be specified, see passhash --help
for the full list:
passhash --generate --unix-md5 --salt secret
Password: RvkrpxCR3uv
โโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโณโโโโโโโโโ
โ Method โ Hash โ Time โ
โกโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฉ
โ md5_crypt โ $1$secret$SmI5vW6El8fsZHapctHAl. โ 0.008s โ
โโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโ
If a selected hash algorithm requires a username it will prompt for it:
passhash --generate --windows-msdcc2
Username: jsmith
Password: baQpwMueTKm
โโโโโโโโโโณโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโณโโโโโโโโโ
โ Method โ Hash โ Time โ
โกโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฉ
โ msdcc2 โ 254bbbbd2da9a0bd48681f9a67e3ca44 โ 0.003s โ
โโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโ
One or more algorithms can be specified as runtime, see passhash --help
for the full list:
passhash --generate --unix-md5 --ldap-md5
Password: aHMHCAXJMmP
โโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโณโโโโโโโโโ
โ Method โ Hash โ Time โ
โกโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฉ
โ ldap_md5 โ {MD5}8o3o/NROgZ6U55wxjuLoDw== โ 0.000s โ
โ md5_crypt โ $1$lUpHRYmh$yvlUtIwPk5p5kXoW6kJpu/ โ 0.001s โ
โโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโ
Use --all
to generate all supported hash algorithms:
passhash --generate --all
Development Environment
git clone https://github.com/ReK42/passhash.git
cd passhash
pre-commit install
pip install -e .[tests]