Freitag, 26. Mai 2023

SAH512 password in python

 in case you need to update a mysql db with a SHA512 password:


Install the correct lib: sudo apt-get install -y python-passlib


then:

python -c "from passlib.hash import sha512_crypt; import getpass; print sha512_crypt.encrypt(getpass.getpass())"