From f5902a82f9521f00913ed34a1bfff907b76204e9 Mon Sep 17 00:00:00 2001 From: Stephen Bradshaw Date: Tue, 1 Aug 2023 12:16:17 +1000 Subject: [PATCH] Update pythonsnippets.md --- writeups/pythonsnippets.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/writeups/pythonsnippets.md b/writeups/pythonsnippets.md index 87f8dfb..8d89ed1 100644 --- a/writeups/pythonsnippets.md +++ b/writeups/pythonsnippets.md @@ -281,6 +281,13 @@ Adding error handling to prevent exceptions in case of lookup failures: ntlm('password_to_hash') +On newer Pythons that dont include md4 in hashlib, install pycryptodome and try this + + from Crypto.Hash import MD4 + ntlm = lambda pwd : MD4.new(pwd.encode('utf-16le')).hexdigest() + + + ## Get all permutations of a given input list The following will get all combinations of the given list, including combinations of items of list length n-1 to 2.