mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-01-24 00:04:23 +03:00
Patch for #2827
This commit is contained in:
parent
b1662f54c8
commit
310a82933c
|
@ -19,7 +19,7 @@ from lib.core.enums import DBMS_DIRECTORY_NAME
|
||||||
from lib.core.enums import OS
|
from lib.core.enums import OS
|
||||||
|
|
||||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||||
VERSION = "1.1.12.15"
|
VERSION = "1.1.12.16"
|
||||||
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
|
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
|
||||||
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
|
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)
|
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)
|
||||||
|
|
|
@ -81,6 +81,7 @@ from lib.core.settings import UNICODE_ENCODING
|
||||||
from lib.core.settings import ROTATING_CHARS
|
from lib.core.settings import ROTATING_CHARS
|
||||||
from lib.core.wordlist import Wordlist
|
from lib.core.wordlist import Wordlist
|
||||||
from thirdparty.colorama.initialise import init as coloramainit
|
from thirdparty.colorama.initialise import init as coloramainit
|
||||||
|
from thirdparty.oset.pyoset import oset
|
||||||
from thirdparty.pydes.pyDes import des
|
from thirdparty.pydes.pyDes import des
|
||||||
from thirdparty.pydes.pyDes import CBC
|
from thirdparty.pydes.pyDes import CBC
|
||||||
|
|
||||||
|
@ -555,24 +556,8 @@ def storeHashesToFile(attack_dict):
|
||||||
if not attack_dict:
|
if not attack_dict:
|
||||||
return
|
return
|
||||||
|
|
||||||
if kb.storeHashesChoice is None:
|
items = oset()
|
||||||
message = "do you want to store hashes to a temporary file "
|
|
||||||
message += "for eventual further processing with other tools [y/N] "
|
|
||||||
|
|
||||||
kb.storeHashesChoice = readInput(message, default='N', boolean=True)
|
|
||||||
|
|
||||||
if not kb.storeHashesChoice:
|
|
||||||
return
|
|
||||||
|
|
||||||
handle, filename = tempfile.mkstemp(prefix=MKSTEMP_PREFIX.HASHES, suffix=".txt")
|
|
||||||
os.close(handle)
|
|
||||||
|
|
||||||
infoMsg = "writing hashes to a temporary file '%s' " % filename
|
|
||||||
logger.info(infoMsg)
|
|
||||||
|
|
||||||
items = set()
|
|
||||||
|
|
||||||
with open(filename, "w+") as f:
|
|
||||||
for user, hashes in attack_dict.items():
|
for user, hashes in attack_dict.items():
|
||||||
for hash_ in hashes:
|
for hash_ in hashes:
|
||||||
hash_ = hash_.split()[0] if hash_ and hash_.strip() else hash_
|
hash_ = hash_.split()[0] if hash_ and hash_.strip() else hash_
|
||||||
|
@ -584,9 +569,25 @@ def storeHashesToFile(attack_dict):
|
||||||
item = "%s\n" % hash_.encode(UNICODE_ENCODING)
|
item = "%s\n" % hash_.encode(UNICODE_ENCODING)
|
||||||
|
|
||||||
if item and item not in items:
|
if item and item not in items:
|
||||||
f.write(item)
|
|
||||||
items.add(item)
|
items.add(item)
|
||||||
|
|
||||||
|
if kb.storeHashesChoice is None:
|
||||||
|
message = "do you want to store hashes to a temporary file "
|
||||||
|
message += "for eventual further processing with other tools [y/N] "
|
||||||
|
|
||||||
|
kb.storeHashesChoice = readInput(message, default='N', boolean=True)
|
||||||
|
|
||||||
|
if kb.storeHashesChoice:
|
||||||
|
handle, filename = tempfile.mkstemp(prefix=MKSTEMP_PREFIX.HASHES, suffix=".txt")
|
||||||
|
os.close(handle)
|
||||||
|
|
||||||
|
infoMsg = "writing hashes to a temporary file '%s' " % filename
|
||||||
|
logger.info(infoMsg)
|
||||||
|
|
||||||
|
with open(filename, "w+") as f:
|
||||||
|
for item in items:
|
||||||
|
f.write(item)
|
||||||
|
|
||||||
def attackCachedUsersPasswords():
|
def attackCachedUsersPasswords():
|
||||||
if kb.data.cachedUsersPasswords:
|
if kb.data.cachedUsersPasswords:
|
||||||
results = dictionaryAttack(kb.data.cachedUsersPasswords)
|
results = dictionaryAttack(kb.data.cachedUsersPasswords)
|
||||||
|
|
|
@ -46,7 +46,7 @@ f872699e948d0692ce11b54781da814c lib/core/log.py
|
||||||
760d9df2a27ded29109b390ab202e72d lib/core/replication.py
|
760d9df2a27ded29109b390ab202e72d lib/core/replication.py
|
||||||
a2466b62e67f8b31736bac4dac590e51 lib/core/revision.py
|
a2466b62e67f8b31736bac4dac590e51 lib/core/revision.py
|
||||||
02d4762140a72fd44668d3dab5eabda9 lib/core/session.py
|
02d4762140a72fd44668d3dab5eabda9 lib/core/session.py
|
||||||
6c29683312b1a40cdf81fa378efc9fc2 lib/core/settings.py
|
6c134f0e75978056a01a6442bbef1ac8 lib/core/settings.py
|
||||||
35bffbad762eb9e03db9e93b1c991103 lib/core/shell.py
|
35bffbad762eb9e03db9e93b1c991103 lib/core/shell.py
|
||||||
a59ec28371ae067a6fdd8f810edbee3d lib/core/subprocessng.py
|
a59ec28371ae067a6fdd8f810edbee3d lib/core/subprocessng.py
|
||||||
d93501771b41315f9fb949305b6ed257 lib/core/target.py
|
d93501771b41315f9fb949305b6ed257 lib/core/target.py
|
||||||
|
@ -105,7 +105,7 @@ a2d2087353fb64a8441c3247ae0ad719 lib/utils/deps.py
|
||||||
b806de9710a02436e576ac9065816021 lib/utils/getch.py
|
b806de9710a02436e576ac9065816021 lib/utils/getch.py
|
||||||
fe3a38f820ae05a95f92ab53e22b46d0 lib/utils/har.py
|
fe3a38f820ae05a95f92ab53e22b46d0 lib/utils/har.py
|
||||||
1bdd3e6483d3d7c4fd6ec59e9526b542 lib/utils/hashdb.py
|
1bdd3e6483d3d7c4fd6ec59e9526b542 lib/utils/hashdb.py
|
||||||
193c294d960c310808495a63167eab00 lib/utils/hash.py
|
148ab1b7662d441a2e5537ebc8dcb755 lib/utils/hash.py
|
||||||
f20ae1aa6a8d1d5373ace1f7ed3476a7 lib/utils/htmlentities.py
|
f20ae1aa6a8d1d5373ace1f7ed3476a7 lib/utils/htmlentities.py
|
||||||
5fb9aaf874daa47ea2b672a22740e56b lib/utils/__init__.py
|
5fb9aaf874daa47ea2b672a22740e56b lib/utils/__init__.py
|
||||||
67dbbf9cc9aa9665c1efcebdba5b1559 lib/utils/pivotdumptable.py
|
67dbbf9cc9aa9665c1efcebdba5b1559 lib/utils/pivotdumptable.py
|
||||||
|
|
Loading…
Reference in New Issue
Block a user