Skip to content

Instantly share code, notes, and snippets.

@msuksong
Created April 1, 2023 17:03
Show Gist options
  • Save msuksong/59516eceb97f951d0efb1e12ebabbcc8 to your computer and use it in GitHub Desktop.
Save msuksong/59516eceb97f951d0efb1e12ebabbcc8 to your computer and use it in GitHub Desktop.
Simple NTLM hash generator
#!/usr/bin/env python
import hashlib
import getpass
def main():
password = getpass.getpass("Password:")
print("NTLM hash: " + hashlib.new('md4', password.encode('utf-16le')).hexdigest())
if __name__ == "__main__":
main()
@msuksong
Copy link
Author

msuksong commented Apr 1, 2023

Example

$ python ntlm_hash.py
Password: test
NTLM hash: 0cb6948805f797bf2a82807973b89537

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment