mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-26 03:23:48 +03:00
Fixes #1484
This commit is contained in:
parent
2c754b57bb
commit
1b81084106
|
@ -69,6 +69,7 @@ class HashDB(object):
|
||||||
|
|
||||||
def retrieve(self, key, unserialize=False):
|
def retrieve(self, key, unserialize=False):
|
||||||
retVal = None
|
retVal = None
|
||||||
|
|
||||||
if key and (self._write_cache or os.path.isfile(self.filepath)):
|
if key and (self._write_cache or os.path.isfile(self.filepath)):
|
||||||
hash_ = HashDB.hashKey(key)
|
hash_ = HashDB.hashKey(key)
|
||||||
retVal = self._write_cache.get(hash_)
|
retVal = self._write_cache.get(hash_)
|
||||||
|
@ -86,7 +87,16 @@ class HashDB(object):
|
||||||
raise SqlmapDataException, errMsg
|
raise SqlmapDataException, errMsg
|
||||||
else:
|
else:
|
||||||
break
|
break
|
||||||
return retVal if not unserialize else unserializeObject(retVal)
|
|
||||||
|
if unserialize:
|
||||||
|
try:
|
||||||
|
retVal = unserializeObject(retVal)
|
||||||
|
except:
|
||||||
|
warnMsg = "error occurred while unserializing value for session key '%s'. " % key
|
||||||
|
warnMsg += "If the problem persists please rerun with `--flush-session`"
|
||||||
|
logger.warn(warnMsg)
|
||||||
|
|
||||||
|
return retVal
|
||||||
|
|
||||||
def write(self, key, value, serialize=False):
|
def write(self, key, value, serialize=False):
|
||||||
if key:
|
if key:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user