Skip to content

Instantly share code, notes, and snippets.

@hi-ko
Last active May 3, 2021 09:23
Show Gist options
  • Save hi-ko/ce794a70645660c56bdcd6cc20f21127 to your computer and use it in GitHub Desktop.
Save hi-ko/ce794a70645660c56bdcd6cc20f21127 to your computer and use it in GitHub Desktop.
generate initial password for alfresco admin (by mt and AFaust from discord)
#!/usr/bin/python3
import hashlib
import sys
# import os
#hash = hashlib.new('md4', os.environ['ALF_ADMIN_PASS'].encode('utf-16le')).digest()
hash = hashlib.new('md4', sys.argv[1].encode('utf-16le')).digest()
print(bytes.hex(hash))
#!/bin/bash
echo -n "$1" | iconv -t utf16le | openssl md4 | cut -d ' ' -f 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment