Created
October 27, 2023 07:46
-
-
Save Yeeb1/a88e23239cf7fb72dff74b28d9a7282e to your computer and use it in GitHub Desktop.
smal script to convert a password to NTLM
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/env python3 | |
import hashlib | |
import sys | |
def compute_ntlm_hash(password): | |
password = password.encode('utf-16-le') | |
return hashlib.new('md4', password).hexdigest().lower() | |
if __name__ == '__main__': | |
if len(sys.argv) != 2: | |
print("Usage: ntlm_hasher.py <password>") | |
sys.exit(1) | |
password = sys.argv[1] | |
ntlm_hash = compute_ntlm_hash(password) | |
print("NTLM Hash:", ntlm_hash) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment