mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-01-23 15:54:24 +03:00
Patch for an Issue #1057
This commit is contained in:
parent
f93bca4564
commit
59a3407322
|
@ -52,8 +52,13 @@ class BigArray(list):
|
|||
def pop(self):
|
||||
if len(self.chunks[-1]) < 1:
|
||||
self.chunks.pop()
|
||||
with open(self.chunks[-1], "rb") as fp:
|
||||
self.chunks[-1] = pickle.load(fp)
|
||||
try:
|
||||
with open(self.chunks[-1], "rb") as fp:
|
||||
self.chunks[-1] = pickle.load(fp)
|
||||
except IOError, ex:
|
||||
errMsg = "exception occurred while retrieving data "
|
||||
errMsg += "from a temporary file ('%s')" % ex
|
||||
raise SqlmapSystemException, errMsg
|
||||
return self.chunks[-1].pop()
|
||||
|
||||
def index(self, value):
|
||||
|
@ -80,8 +85,13 @@ class BigArray(list):
|
|||
filename = self._dump(self.cache.data)
|
||||
self.chunks[self.cache.index] = filename
|
||||
if not (self.cache and self.cache.index == index):
|
||||
with open(self.chunks[index], "rb") as fp:
|
||||
self.cache = Cache(index, pickle.load(fp), False)
|
||||
try:
|
||||
with open(self.chunks[index], "rb") as fp:
|
||||
self.cache = Cache(index, pickle.load(fp), False)
|
||||
except IOError, ex:
|
||||
errMsg = "exception occurred while retrieving data "
|
||||
errMsg += "from a temporary file ('%s')" % ex
|
||||
raise SqlmapSystemException, errMsg
|
||||
|
||||
def __getstate__(self):
|
||||
return self.chunks, self.filenames
|
||||
|
|
Loading…
Reference in New Issue
Block a user