mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 01:26:42 +03:00
Potential (hide the cause) patch for #4367
This commit is contained in:
parent
133e2c8c61
commit
4d4b9a1175
|
@ -18,7 +18,7 @@ from lib.core.enums import OS
|
|||
from thirdparty.six import unichr as _unichr
|
||||
|
||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||
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)
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue
Block a user