Created
November 27, 2018 15:51
-
-
Save randombit/0f2e8c994d7ac4418743197035d9d2a3 to your computer and use it in GitHub Desktop.
Generate secrets for wordpress
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
#!/usr/bin/python | |
import os | |
import binascii | |
keys = [ | |
'AUTH_KEY', | |
'SECURE_AUTH_KEY', | |
'LOGGED_IN_KEY', | |
'NONCE_KEY', | |
'AUTH_SALT', | |
'SECURE_AUTH_SALT', | |
'LOGGED_IN_SALT', | |
'NONCE_SALT' | |
] | |
for k in keys: | |
print("define('%s', '%s');" % (k, binascii.b2a_base64(os.urandom(36)).decode('ascii').strip())) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment