Last active
August 29, 2015 14:26
-
-
Save maoo/bf0c0fa33a1c5d077532 to your computer and use it in GitHub Desktop.
Encrypt password for alfresco-global.properties
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
# Taken from http://www.giuseppeurso.eu/en/alfresco-tips-and-tricks-1-reset-the-admin-password/ | |
import sys | |
import hashlib | |
if len(sys.argv) > 1: | |
passwd = sys.argv[1] | |
print "Encrypting password '%s'" % passwd | |
passwd.encode('utf-16le') | |
print "Encryped password is '%s'" % hashlib.new('md4', passwd.encode('utf-16le')).hexdigest() | |
else: | |
print "Usage: python encrypt-md4.py my_password" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment