mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-01-23 15:54:24 +03:00
Patch for an Issue #944
This commit is contained in:
parent
bb56eb583a
commit
733e06e31f
|
@ -13,6 +13,7 @@ except:
|
||||||
import os
|
import os
|
||||||
import tempfile
|
import tempfile
|
||||||
|
|
||||||
|
from lib.core.exception import SqlmapSystemException
|
||||||
from lib.core.settings import BIGARRAY_CHUNK_LENGTH
|
from lib.core.settings import BIGARRAY_CHUNK_LENGTH
|
||||||
|
|
||||||
class Cache(object):
|
class Cache(object):
|
||||||
|
@ -63,12 +64,17 @@ class BigArray(list):
|
||||||
return ValueError, "%s is not in list" % value
|
return ValueError, "%s is not in list" % value
|
||||||
|
|
||||||
def _dump(self, value):
|
def _dump(self, value):
|
||||||
handle, filename = tempfile.mkstemp(prefix="sqlmapba-")
|
try:
|
||||||
self.filenames.add(filename)
|
handle, filename = tempfile.mkstemp(prefix="sqlmapba-")
|
||||||
os.close(handle)
|
self.filenames.add(filename)
|
||||||
with open(filename, "w+b") as fp:
|
os.close(handle)
|
||||||
pickle.dump(value, fp, pickle.HIGHEST_PROTOCOL)
|
with open(filename, "w+b") as fp:
|
||||||
return filename
|
pickle.dump(value, fp, pickle.HIGHEST_PROTOCOL)
|
||||||
|
return filename
|
||||||
|
except IOError, ex:
|
||||||
|
errMsg = "exception occurred while storing data "
|
||||||
|
errMsg += "to a temporary file ('%s')" % ex
|
||||||
|
raise SqlmapSystemException, errMsg
|
||||||
|
|
||||||
def _checkcache(self, index):
|
def _checkcache(self, index):
|
||||||
if (self.cache and self.cache.index != index and self.cache.dirty):
|
if (self.cache and self.cache.index != index and self.cache.dirty):
|
||||||
|
|
|
@ -53,6 +53,9 @@ class SqlmapShellQuitException(SqlmapBaseException):
|
||||||
class SqlmapSyntaxException(SqlmapBaseException):
|
class SqlmapSyntaxException(SqlmapBaseException):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
class SqlmapSystemException(SqlmapBaseException):
|
||||||
|
pass
|
||||||
|
|
||||||
class SqlmapThreadException(SqlmapBaseException):
|
class SqlmapThreadException(SqlmapBaseException):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user