Created
June 11, 2018 02:24
-
-
Save kyl191/a06fa26f7cd1f7752e88c1e69c5069c7 to your computer and use it in GitHub Desktop.
ZenGallery password reset
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# connect to db using mysql | |
$ mysql | |
MariaDB [(none)]> use zen_gallery_db; | |
MariaDB [zen_gallery_db]> select value from zp_options where name = 'extra_auth_hash_text'; | |
(keep this value!) | |
# separate python process | |
import hashlib | |
hashlib.sha1('{username}{password}{value_from_above}'.encode('utf-8')).hexdigest() | |
# back to mysql | |
MariaDB [zen_gallery_db]> select * from zp_administrators; | |
# (find your id in this list) | |
MariaDB [zen_gallery_db]> update zp_administrators set pass='{python_output}' where id='{yourid}'; | |
MariaDB [zen_gallery_db]> update zp_administrators set passhash=1 where id='{yourid}'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment