mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-02-02 20:54:13 +03:00
Fixes #1446
This commit is contained in:
parent
53de0e8949
commit
acd6b7797f
|
@ -1875,8 +1875,13 @@ def readCachedFileContent(filename, mode='rb'):
|
||||||
with kb.locks.cache:
|
with kb.locks.cache:
|
||||||
if filename not in kb.cache.content:
|
if filename not in kb.cache.content:
|
||||||
checkFile(filename)
|
checkFile(filename)
|
||||||
with openFile(filename, mode) as f:
|
try:
|
||||||
kb.cache.content[filename] = f.read()
|
with openFile(filename, mode) as f:
|
||||||
|
kb.cache.content[filename] = f.read()
|
||||||
|
except (IOError, OSError, MemoryError), ex:
|
||||||
|
errMsg = "something went wrong while trying "
|
||||||
|
errMsg += "to read the content of file '%s' ('%s')" % (filename, ex)
|
||||||
|
raise SqlmapSystemException(errMsg)
|
||||||
|
|
||||||
return kb.cache.content[filename]
|
return kb.cache.content[filename]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user