mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-11-19 06:30:23 +00:00
Minor patches
This commit is contained in:
parent
39d22d26c3
commit
3a680be4eb
11 changed files with 42 additions and 28 deletions
|
|
@ -875,7 +875,8 @@ def download(taskid, target, filename):
|
|||
|
||||
if os.path.isfile(path):
|
||||
logger.debug("(%s) Retrieved content of file %s" % (taskid, target))
|
||||
content = openFile(path, "rb").read()
|
||||
with openFile(path, "rb") as f:
|
||||
content = f.read()
|
||||
return jsonize({"success": True, "file": encodeBase64(content, binary=False)})
|
||||
else:
|
||||
logger.warning("[%s] File does not exist %s" % (taskid, target))
|
||||
|
|
|
|||
|
|
@ -1117,7 +1117,7 @@ def _bruteProcessVariantA(attack_info, hash_regex, suffix, retVal, proc_id, proc
|
|||
word = word + suffix
|
||||
|
||||
try:
|
||||
current = __functions__[hash_regex](password=word, uppercase=False)
|
||||
current = __functions__[hash_regex](password=getBytes(word, unsafe=False), uppercase=False)
|
||||
|
||||
if current in hashes:
|
||||
for item in attack_info[:]:
|
||||
|
|
@ -1195,7 +1195,7 @@ def _bruteProcessVariantB(user, hash_, kwargs, hash_regex, suffix, retVal, found
|
|||
word = word + suffix
|
||||
|
||||
try:
|
||||
current = __functions__[hash_regex](password=word, uppercase=False, **kwargs)
|
||||
current = __functions__[hash_regex](password=getBytes(word, unsafe=False), uppercase=False, **kwargs)
|
||||
|
||||
if hash_ == current:
|
||||
if hash_regex == HASH.ORACLE_OLD: # only for cosmetic purposes
|
||||
|
|
@ -1285,7 +1285,7 @@ def _bruteProcessVariantSalted(attack_info, hash_regex, suffix, retVal, proc_id,
|
|||
((user, hash_), kwargs) = item
|
||||
|
||||
try:
|
||||
current = __functions__[hash_regex](password=word, uppercase=False, **kwargs)
|
||||
current = __functions__[hash_regex](password=getBytes(word, unsafe=False), uppercase=False, **kwargs)
|
||||
|
||||
if hash_ == current:
|
||||
retVal.put((user, hash_, word))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue