mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-28 18:39:04 +00:00
Some more drei updates
This commit is contained in:
@@ -20,6 +20,7 @@ import tempfile
|
||||
import time
|
||||
|
||||
from lib.core.common import dataToStdout
|
||||
from lib.core.common import decodeBase64
|
||||
from lib.core.common import getSafeExString
|
||||
from lib.core.common import saveConfig
|
||||
from lib.core.common import unArrayizeValue
|
||||
@@ -294,7 +295,7 @@ def check_authentication():
|
||||
request.environ["PATH_INFO"] = "/error/401"
|
||||
|
||||
try:
|
||||
creds = match.group(1).decode("base64")
|
||||
creds = decodeBase64(match.group(1), binary=False)
|
||||
except:
|
||||
request.environ["PATH_INFO"] = "/error/401"
|
||||
else:
|
||||
|
||||
@@ -50,6 +50,7 @@ from lib.core.common import Backend
|
||||
from lib.core.common import checkFile
|
||||
from lib.core.common import clearConsoleLine
|
||||
from lib.core.common import dataToStdout
|
||||
from lib.core.common import decodeBase64
|
||||
from lib.core.common import getBytes
|
||||
from lib.core.common import getFileItems
|
||||
from lib.core.common import getPublicTypeMembers
|
||||
@@ -915,15 +916,15 @@ def dictionaryAttack(attack_dict):
|
||||
hash_ = hash_.lower()
|
||||
|
||||
if hash_regex in (HASH.MD5_BASE64, HASH.SHA1_BASE64, HASH.SHA256_BASE64, HASH.SHA512_BASE64):
|
||||
item = [(user, hash_.decode("base64").encode("hex")), {}]
|
||||
item = [(user, decodeBase64(hash_, binary=False).encode("hex")), {}]
|
||||
elif hash_regex in (HASH.MYSQL, HASH.MYSQL_OLD, HASH.MD5_GENERIC, HASH.SHA1_GENERIC, HASH.SHA224_GENERIC, HASH.SHA256_GENERIC, HASH.SHA384_GENERIC, HASH.SHA512_GENERIC, HASH.APACHE_SHA1):
|
||||
item = [(user, hash_), {}]
|
||||
elif hash_regex in (HASH.SSHA,):
|
||||
item = [(user, hash_), {"salt": hash_.decode("base64")[20:]}]
|
||||
item = [(user, hash_), {"salt": decodeBase64(hash_, binary=False)[20:]}]
|
||||
elif hash_regex in (HASH.SSHA256,):
|
||||
item = [(user, hash_), {"salt": hash_.decode("base64")[32:]}]
|
||||
item = [(user, hash_), {"salt": decodeBase64(hash_, binary=False)[32:]}]
|
||||
elif hash_regex in (HASH.SSHA512,):
|
||||
item = [(user, hash_), {"salt": hash_.decode("base64")[64:]}]
|
||||
item = [(user, hash_), {"salt": decodeBase64(hash_, binary=False)[64:]}]
|
||||
elif hash_regex in (HASH.ORACLE_OLD, HASH.POSTGRES):
|
||||
item = [(user, hash_), {'username': user}]
|
||||
elif hash_regex in (HASH.ORACLE,):
|
||||
|
||||
@@ -33,6 +33,7 @@ from lib.core.settings import MAX_INT
|
||||
from lib.core.settings import NULL
|
||||
from lib.core.unescaper import unescaper
|
||||
from lib.request import inject
|
||||
from thirdparty import six
|
||||
|
||||
def pivotDumpTable(table, colList, count=None, blind=True, alias=None):
|
||||
lengths = {}
|
||||
@@ -142,7 +143,7 @@ def pivotDumpTable(table, colList, count=None, blind=True, alias=None):
|
||||
if column == colList[0]:
|
||||
if isNoneValue(value):
|
||||
try:
|
||||
for pivotValue in filterNone((" " if pivotValue == " " else None, "%s%s" % (pivotValue[0], unichr(ord(pivotValue[1]) + 1)) if len(pivotValue) > 1 else None, unichr(ord(pivotValue[0]) + 1))):
|
||||
for pivotValue in filterNone((" " if pivotValue == " " else None, "%s%s" % (pivotValue[0], six.unichr(ord(pivotValue[1]) + 1)) if len(pivotValue) > 1 else None, six.unichr(ord(pivotValue[0]) + 1))):
|
||||
value = _(column, pivotValue)
|
||||
if not isNoneValue(value):
|
||||
break
|
||||
|
||||
@@ -7,6 +7,8 @@ See the file 'LICENSE' for copying permission
|
||||
|
||||
import numbers
|
||||
|
||||
from lib.core.compat import cmp
|
||||
|
||||
class xrange(object):
|
||||
"""
|
||||
Advanced (re)implementation of xrange (supports slice/copy/etc.)
|
||||
|
||||
Reference in New Issue
Block a user