mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-08-04 14:55:40 +00:00
Potential (hide the cause) patch for #4367
This commit is contained in:
parent
133e2c8c61
commit
4d4b9a1175
2 changed files with 19 additions and 17 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue