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

Skip to content

Commit 3140fd0

Browse files
committed
Fixes #2495
1 parent 5bcbf63 commit 3140fd0

3 files changed

Lines changed: 19 additions & 19 deletions

File tree

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from lib.core.enums import OS
2020

2121
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
22-
VERSION = "1.1.4.41"
22+
VERSION = "1.1.4.42"
2323
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2424
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
2525
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: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ def hashRecognition(value):
529529

530530
return retVal
531531

532-
def _bruteProcessVariantA(attack_info, hash_regex, suffix, retVal, proc_id, proc_count, wordlists, custom_wordlist):
532+
def _bruteProcessVariantA(attack_info, hash_regex, suffix, retVal, proc_id, proc_count, wordlists, custom_wordlist, api):
533533
if IS_WIN:
534534
coloramainit()
535535

@@ -583,7 +583,7 @@ def _bruteProcessVariantA(attack_info, hash_regex, suffix, retVal, proc_id, proc
583583

584584
status = 'current status: %s... %s' % (word.ljust(5)[:5], ROTATING_CHARS[rotator])
585585

586-
if not conf.api:
586+
if not api:
587587
dataToStdout("\r[%s] [INFO] %s" % (time.strftime("%X"), status))
588588

589589
except KeyboardInterrupt:
@@ -605,7 +605,7 @@ def _bruteProcessVariantA(attack_info, hash_regex, suffix, retVal, proc_id, proc
605605
with proc_count.get_lock():
606606
proc_count.value -= 1
607607

608-
def _bruteProcessVariantB(user, hash_, kwargs, hash_regex, suffix, retVal, found, proc_id, proc_count, wordlists, custom_wordlist):
608+
def _bruteProcessVariantB(user, hash_, kwargs, hash_regex, suffix, retVal, found, proc_id, proc_count, wordlists, custom_wordlist, api):
609609
if IS_WIN:
610610
coloramainit()
611611

@@ -657,7 +657,7 @@ def _bruteProcessVariantB(user, hash_, kwargs, hash_regex, suffix, retVal, found
657657
if user and not user.startswith(DUMMY_USER_PREFIX):
658658
status += ' (user: %s)' % user
659659

660-
if not conf.api:
660+
if not api:
661661
dataToStdout("\r[%s] [INFO] %s" % (time.strftime("%X"), status))
662662

663663
except KeyboardInterrupt:
@@ -842,12 +842,12 @@ def dictionaryAttack(attack_dict):
842842
count = _multiprocessing.Value('i', _multiprocessing.cpu_count())
843843

844844
for i in xrange(_multiprocessing.cpu_count()):
845-
p = _multiprocessing.Process(target=_bruteProcessVariantA, args=(attack_info, hash_regex, suffix, retVal, i, count, kb.wordlists, custom_wordlist))
846-
processes.append(p)
845+
process = _multiprocessing.Process(target=_bruteProcessVariantA, args=(attack_info, hash_regex, suffix, retVal, i, count, kb.wordlists, custom_wordlist, conf.api))
846+
processes.append(process)
847847

848-
for p in processes:
849-
p.daemon = True
850-
p.start()
848+
for process in processes:
849+
process.daemon = True
850+
process.start()
851851

852852
while count.value > 0:
853853
time.sleep(0.5)
@@ -858,7 +858,7 @@ def dictionaryAttack(attack_dict):
858858
singleTimeWarnMessage(warnMsg)
859859

860860
retVal = Queue()
861-
_bruteProcessVariantA(attack_info, hash_regex, suffix, retVal, 0, 1, kb.wordlists, custom_wordlist)
861+
_bruteProcessVariantA(attack_info, hash_regex, suffix, retVal, 0, 1, kb.wordlists, custom_wordlist, conf.api)
862862

863863
except KeyboardInterrupt:
864864
print
@@ -926,12 +926,12 @@ def dictionaryAttack(attack_dict):
926926
count = _multiprocessing.Value('i', _multiprocessing.cpu_count())
927927

928928
for i in xrange(_multiprocessing.cpu_count()):
929-
p = _multiprocessing.Process(target=_bruteProcessVariantB, args=(user, hash_, kwargs, hash_regex, suffix, retVal, found_, i, count, kb.wordlists, custom_wordlist))
930-
processes.append(p)
929+
process = _multiprocessing.Process(target=_bruteProcessVariantB, args=(user, hash_, kwargs, hash_regex, suffix, retVal, found_, i, count, kb.wordlists, custom_wordlist, conf.api))
930+
processes.append(process)
931931

932-
for p in processes:
933-
p.daemon = True
934-
p.start()
932+
for process in processes:
933+
process.daemon = True
934+
process.start()
935935

936936
while count.value > 0:
937937
time.sleep(0.5)
@@ -950,7 +950,7 @@ class Value():
950950
found_ = Value()
951951
found_.value = False
952952

953-
_bruteProcessVariantB(user, hash_, kwargs, hash_regex, suffix, retVal, found_, 0, 1, kb.wordlists, custom_wordlist)
953+
_bruteProcessVariantB(user, hash_, kwargs, hash_regex, suffix, retVal, found_, 0, 1, kb.wordlists, custom_wordlist, conf.api)
954954

955955
found = found_.value
956956

txt/checksum.md5

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ ebb778c2d26eba8b34d7d8658e4105a6 lib/core/optiondict.py
4646
d8e9250f3775119df07e9070eddccd16 lib/core/replication.py
4747
785f86e3f963fa3798f84286a4e83ff2 lib/core/revision.py
4848
40c80b28b3a5819b737a5a17d4565ae9 lib/core/session.py
49-
50c380893e7e1cf3f8f703de4fe23fc9 lib/core/settings.py
49+
5c0309b56aaa28782f85c32bcd6a3086 lib/core/settings.py
5050
d91291997d2bd2f6028aaf371bf1d3b6 lib/core/shell.py
5151
2ad85c130cc5f2b3701ea85c2f6bbf20 lib/core/subprocessng.py
5252
155e2d3fda87b2e3ffa4f7a770513946 lib/core/target.py
@@ -104,7 +104,7 @@ d3da4c7ceaf57c4687a052d58722f6bb lib/techniques/dns/use.py
104104
ba12c69a90061aa14d848b8396e79191 lib/utils/deps.py
105105
3b9fd519164e0bf275d5fd361c3f11ff lib/utils/getch.py
106106
ccfdad414ce2ec0c394c3deaa39a82bf lib/utils/hashdb.py
107-
ff3b7796590db894a3686b3b67037b37 lib/utils/hash.py
107+
12e0e0ab70c6fe5786bc561c35dc067f lib/utils/hash.py
108108
e76a08237ee6a4cd6855af79610ea8a5 lib/utils/htmlentities.py
109109
310efc965c862cfbd7b0da5150a5ad36 lib/utils/__init__.py
110110
9d8c858417d356e49e1959ba253aede4 lib/utils/pivotdumptable.py

0 commit comments

Comments
 (0)