mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-01-29 17:49:09 +00:00
Minor improvement of BigArray
This commit is contained in:
@@ -93,6 +93,10 @@ class BigArray(list):
|
||||
>>> _ = __
|
||||
>>> _[-1]
|
||||
1
|
||||
>>> _.pop()
|
||||
1
|
||||
>>> len(_)
|
||||
100001
|
||||
>>> len([_ for _ in BigArray(xrange(100000))])
|
||||
100000
|
||||
"""
|
||||
@@ -148,8 +152,11 @@ class BigArray(list):
|
||||
if not self.chunks[-1] and len(self.chunks) > 1:
|
||||
self.chunks.pop()
|
||||
try:
|
||||
with open(self.chunks[-1], "rb") as f:
|
||||
filename = self.chunks[-1]
|
||||
with open(filename, "rb") as f:
|
||||
self.chunks[-1] = pickle.loads(zlib.decompress(f.read()))
|
||||
self._os_remove(filename)
|
||||
self.filenames.discard(filename)
|
||||
except IOError as ex:
|
||||
errMsg = "exception occurred while retrieving data "
|
||||
errMsg += "from a temporary file ('%s')" % ex
|
||||
|
||||
@@ -19,7 +19,7 @@ from lib.core.enums import OS
|
||||
from thirdparty import six
|
||||
|
||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||
VERSION = "1.10.1.64"
|
||||
VERSION = "1.10.1.65"
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user