mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-08 21:51:29 +00:00
Minor patching
This commit is contained in:
@@ -132,6 +132,17 @@ class BigArray(list):
|
||||
|
||||
return ValueError, "%s is not in list" % value
|
||||
|
||||
def close(self):
|
||||
while self.filenames:
|
||||
filename = self.filenames.pop()
|
||||
try:
|
||||
self._os_remove(filename)
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
def __del__(self):
|
||||
self.close()
|
||||
|
||||
def _dump(self, chunk):
|
||||
try:
|
||||
handle, filename = tempfile.mkstemp(prefix=MKSTEMP_PREFIX.BIG_ARRAY)
|
||||
@@ -170,8 +181,12 @@ class BigArray(list):
|
||||
self.chunks, self.filenames = state
|
||||
|
||||
def __getitem__(self, y):
|
||||
length = len(self)
|
||||
if length == 0:
|
||||
raise IndexError("BigArray index out of range")
|
||||
|
||||
while y < 0:
|
||||
y += len(self)
|
||||
y += length
|
||||
|
||||
index = y // self.chunk_length
|
||||
offset = y % self.chunk_length
|
||||
|
||||
@@ -19,7 +19,7 @@ from lib.core.enums import OS
|
||||
from thirdparty import six
|
||||
|
||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||
VERSION = "1.9.5.18"
|
||||
VERSION = "1.9.5.19"
|
||||
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