diff --git a/lib/core/settings.py b/lib/core/settings.py index 6157a1170..d5bbbe044 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.5.3.14" +VERSION = "1.5.3.15" 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 7510104a5..6dec9745b 100644 --- a/lib/utils/hash.py +++ b/lib/utils/hash.py @@ -13,22 +13,6 @@ except: # removed ImportError because of https://github.com/sqlmapproject/sqlma from thirdparty.fcrypt.fcrypt import crypt _multiprocessing = None -try: - import multiprocessing - - # problems on FreeBSD (Reference: https://web.archive.org/web/20110710041353/http://www.eggheadcafe.com/microsoft/Python/35880259/multiprocessing-on-freebsd.aspx) - _ = multiprocessing.Queue() - - # problems with ctypes (Reference: https://github.com/sqlmapproject/sqlmap/issues/2952) - _ = multiprocessing.Value('i') -except (ImportError, OSError, AttributeError): - pass -else: - try: - if multiprocessing.cpu_count() > 1: - _multiprocessing = multiprocessing - except NotImplementedError: - pass import base64 import binascii @@ -983,6 +967,24 @@ def dictionaryAttack(attack_dict): if conf.disableMulti: _multiprocessing = None + else: + # Note: https://github.com/sqlmapproject/sqlmap/issues/4367 + try: + import multiprocessing + + # problems on FreeBSD (Reference: https://web.archive.org/web/20110710041353/http://www.eggheadcafe.com/microsoft/Python/35880259/multiprocessing-on-freebsd.aspx) + _ = multiprocessing.Queue() + + # problems with ctypes (Reference: https://github.com/sqlmapproject/sqlmap/issues/2952) + _ = multiprocessing.Value('i') + except (ImportError, OSError, AttributeError): + pass + else: + try: + if multiprocessing.cpu_count() > 1: + _multiprocessing = multiprocessing + except NotImplementedError: + pass for (_, hashes) in attack_dict.items(): for hash_ in hashes: