diff --git a/lib/core/settings.py b/lib/core/settings.py index 314d46b3c..d8f724dd6 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -18,7 +18,7 @@ from lib.core.enums import OS from thirdparty.six import unichr as _unichr # sqlmap version (...) -VERSION = "1.3.8.26" +VERSION = "1.3.8.27" TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable" TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34} VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE) diff --git a/lib/utils/hash.py b/lib/utils/hash.py index 8bd7c2aaf..72f2f2e49 100644 --- a/lib/utils/hash.py +++ b/lib/utils/hash.py @@ -33,6 +33,7 @@ else: import base64 import binascii import gc +import hashlib import os import re import tempfile @@ -247,6 +248,18 @@ def oracle_old_passwd(password, username, uppercase=True): # prior to version ' return retVal.upper() if uppercase else retVal.lower() +def md4_generic_passwd(password, uppercase=False): + """ + >>> md4_generic_passwd(password='testpass', uppercase=False) + '5b4d300688f19c8fd65b8d6ccf98e0ae' + """ + + password = getBytes(password) + + retVal = hashlib.new("md4", password).hexdigest() + + return retVal.upper() if uppercase else retVal.lower() + def md5_generic_passwd(password, uppercase=False): """ >>> md5_generic_passwd(password='testpass', uppercase=False)