Minor patching

This commit is contained in:
Miroslav Stampar
2025-05-13 13:52:08 +02:00
parent 5622a261cd
commit bbfcf81c25
3 changed files with 19 additions and 4 deletions

View File

@@ -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

View File

@@ -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)