Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4d4b9a1

Browse files
committed
Potential (hide the cause) patch for #4367
1 parent 133e2c8 commit 4d4b9a1

2 files changed

Lines changed: 19 additions & 17 deletions

File tree

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from thirdparty.six import unichr as _unichr
1919

2020
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
21-
VERSION = "1.5.3.14"
21+
VERSION = "1.5.3.15"
2222
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2323
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
2424
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

lib/utils/hash.py

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,6 @@
1313
from thirdparty.fcrypt.fcrypt import crypt
1414

1515
_multiprocessing = None
16-
try:
17-
import multiprocessing
18-
19-
# problems on FreeBSD (Reference: https://web.archive.org/web/20110710041353/http://www.eggheadcafe.com/microsoft/Python/35880259/multiprocessing-on-freebsd.aspx)
20-
_ = multiprocessing.Queue()
21-
22-
# problems with ctypes (Reference: https://github.com/sqlmapproject/sqlmap/issues/2952)
23-
_ = multiprocessing.Value('i')
24-
except (ImportError, OSError, AttributeError):
25-
pass
26-
else:
27-
try:
28-
if multiprocessing.cpu_count() > 1:
29-
_multiprocessing = multiprocessing
30-
except NotImplementedError:
31-
pass
3216

3317
import base64
3418
import binascii
@@ -983,6 +967,24 @@ def dictionaryAttack(attack_dict):
983967

984968
if conf.disableMulti:
985969
_multiprocessing = None
970+
else:
971+
# Note: https://github.com/sqlmapproject/sqlmap/issues/4367
972+
try:
973+
import multiprocessing
974+
975+
# problems on FreeBSD (Reference: https://web.archive.org/web/20110710041353/http://www.eggheadcafe.com/microsoft/Python/35880259/multiprocessing-on-freebsd.aspx)
976+
_ = multiprocessing.Queue()
977+
978+
# problems with ctypes (Reference: https://github.com/sqlmapproject/sqlmap/issues/2952)
979+
_ = multiprocessing.Value('i')
980+
except (ImportError, OSError, AttributeError):
981+
pass
982+
else:
983+
try:
984+
if multiprocessing.cpu_count() > 1:
985+
_multiprocessing = multiprocessing
986+
except NotImplementedError:
987+
pass
986988

987989
for (_, hashes) in attack_dict.items():
988990
for hash_ in hashes:

0 commit comments

Comments
 (0)