mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 01:26:42 +03:00
Fixes #4136
This commit is contained in:
parent
111201978c
commit
5fd2598da0
|
@ -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.4.3.5"
|
||||
VERSION = "1.4.3.6"
|
||||
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)
|
||||
|
|
|
@ -761,6 +761,9 @@ def cmdLineParser(argv=None):
|
|||
parser.add_argument("--debug", dest="debug", action="store_true",
|
||||
help=SUPPRESS)
|
||||
|
||||
parser.add_argument("--disable-multi", dest="disableMulti", action="store_true",
|
||||
help=SUPPRESS)
|
||||
|
||||
parser.add_argument("--disable-precon", dest="disablePrecon", action="store_true",
|
||||
help=SUPPRESS)
|
||||
|
||||
|
|
|
@ -913,6 +913,8 @@ def _bruteProcessVariantB(user, hash_, kwargs, hash_regex, suffix, retVal, found
|
|||
proc_count.value -= 1
|
||||
|
||||
def dictionaryAttack(attack_dict):
|
||||
global _multiprocessing
|
||||
|
||||
suffix_list = [""]
|
||||
custom_wordlist = [""]
|
||||
hash_regexes = []
|
||||
|
@ -922,6 +924,9 @@ def dictionaryAttack(attack_dict):
|
|||
processException = False
|
||||
foundHash = False
|
||||
|
||||
if conf.disableMulti:
|
||||
_multiprocessing = None
|
||||
|
||||
for (_, hashes) in attack_dict.items():
|
||||
for hash_ in hashes:
|
||||
if not hash_:
|
||||
|
@ -1108,7 +1113,7 @@ def dictionaryAttack(attack_dict):
|
|||
|
||||
else:
|
||||
warnMsg = "multiprocessing hash cracking is currently "
|
||||
warnMsg += "not supported on this platform"
|
||||
warnMsg += "%s on this platform" % ("not supported" if not conf.disableMulti else "disabled")
|
||||
singleTimeWarnMessage(warnMsg)
|
||||
|
||||
retVal = _queue.Queue()
|
||||
|
@ -1196,7 +1201,7 @@ def dictionaryAttack(attack_dict):
|
|||
|
||||
else:
|
||||
warnMsg = "multiprocessing hash cracking is currently "
|
||||
warnMsg += "not supported on this platform"
|
||||
warnMsg += "%s on this platform" % ("not supported" if not conf.disableMulti else "disabled")
|
||||
singleTimeWarnMessage(warnMsg)
|
||||
|
||||
class Value(object):
|
||||
|
|
|
@ -335,6 +335,12 @@ def main():
|
|||
logger.critical(errMsg)
|
||||
raise SystemExit
|
||||
|
||||
elif all(_ in excMsg for _ in ("Resource temporarily unavailable", "os.fork()", "dictionaryAttack")):
|
||||
errMsg = "there has been a problem while running the multiprocessing hash cracking. "
|
||||
errMsg += "Please rerun with option '--threads=1'"
|
||||
logger.critical(errMsg)
|
||||
raise SystemExit
|
||||
|
||||
elif "can't start new thread" in excMsg:
|
||||
errMsg = "there has been a problem while creating new thread instance. "
|
||||
errMsg += "Please make sure that you are not running too many processes"
|
||||
|
|
Loading…
Reference in New Issue
Block a user