More drei stuff

This commit is contained in:
Miroslav Stampar 2019-05-02 10:22:44 +02:00
parent d465007dfe
commit 6dbf24531c
8 changed files with 15 additions and 15 deletions

View file

@ -75,7 +75,7 @@ def setHandler():
(DBMS.INFORMIX, INFORMIX_ALIASES, InformixMap, InformixConn),
]
_ = max(_ if (conf.get("dbms") or Backend.getIdentifiedDbms() or kb.heuristicExtendedDbms or "").lower() in _[1] else "" for _ in items) or None
_ = max(_ if (conf.get("dbms") or Backend.getIdentifiedDbms() or kb.heuristicExtendedDbms or "").lower() in _[1] else () for _ in items)
if _:
items.remove(_)
items.insert(0, _)

View file

@ -34,7 +34,7 @@ def _size_of(object_):
if isinstance(object_, dict):
retval += sum(_size_of(_) for _ in itertools.chain.from_iterable(object_.items()))
elif hasattr(object_, "__iter__"):
retval += sum(_size_of(_) for _ in object_)
retval += sum(_size_of(_) for _ in object_ if _ != object_)
return retval
@ -55,7 +55,7 @@ class BigArray(list):
def __init__(self, items=[]):
self.chunks = [[]]
self.chunk_length = sys.maxint
self.chunk_length = sys.maxsize
self.cache = None
self.filenames = set()
self._os_remove = os.remove
@ -67,7 +67,7 @@ class BigArray(list):
def append(self, value):
self.chunks[-1].append(value)
if self.chunk_length == sys.maxint:
if self.chunk_length == sys.maxsize:
self._size_counter += _size_of(value)
if self._size_counter >= BIGARRAY_CHUNK_SIZE:
self.chunk_length = len(self.chunks[-1])

View file

@ -17,7 +17,7 @@ from lib.core.enums import DBMS_DIRECTORY_NAME
from lib.core.enums import OS
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
VERSION = "1.3.5.0"
VERSION = "1.3.5.1"
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)

View file

@ -1349,6 +1349,9 @@ class Connect(object):
kb.permissionFlag = True
singleTimeWarnMessage("potential permission problems detected ('%s')" % message)
if not hasattr(headers, "headers"):
headers.headers = ["%s: %s\r\n" % (header, headers[header]) for header in headers]
if content or response:
return page, headers, code

View file

@ -168,7 +168,7 @@ def _unionPosition(comment, place, parameter, prefix, suffix, count, where=PAYLO
validPayload = None
vector = None
positions = range(0, count)
positions = [_ for _ in xrange(0, count)]
# Unbiased approach for searching appropriate usable column
random.shuffle(positions)