mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-02-02 20:54:13 +03:00
Patch for an Issue #968
This commit is contained in:
parent
2284535267
commit
2f744139fc
|
@ -1930,7 +1930,7 @@ def getFileItems(filename, commentPrefix='#', unicode_=True, lowercase=False, un
|
||||||
retVal[line] = True
|
retVal[line] = True
|
||||||
else:
|
else:
|
||||||
retVal.append(line)
|
retVal.append(line)
|
||||||
except (IOError, OSError), ex:
|
except (IOError, OSError, MemoryError), ex:
|
||||||
errMsg = "something went wrong while trying "
|
errMsg = "something went wrong while trying "
|
||||||
errMsg += "to read the content of file '%s' ('%s')" % (filename, ex)
|
errMsg += "to read the content of file '%s' ('%s')" % (filename, ex)
|
||||||
raise SqlmapSystemException(errMsg)
|
raise SqlmapSystemException(errMsg)
|
||||||
|
|
|
@ -90,6 +90,7 @@ from lib.core.exception import SqlmapMissingMandatoryOptionException
|
||||||
from lib.core.exception import SqlmapMissingPrivileges
|
from lib.core.exception import SqlmapMissingPrivileges
|
||||||
from lib.core.exception import SqlmapSilentQuitException
|
from lib.core.exception import SqlmapSilentQuitException
|
||||||
from lib.core.exception import SqlmapSyntaxException
|
from lib.core.exception import SqlmapSyntaxException
|
||||||
|
from lib.core.exception import SqlmapSystemException
|
||||||
from lib.core.exception import SqlmapUnsupportedDBMSException
|
from lib.core.exception import SqlmapUnsupportedDBMSException
|
||||||
from lib.core.exception import SqlmapUserQuitException
|
from lib.core.exception import SqlmapUserQuitException
|
||||||
from lib.core.log import FORMATTER
|
from lib.core.log import FORMATTER
|
||||||
|
@ -361,9 +362,14 @@ def _feedTargetsDict(reqFile, addedTargetUrls):
|
||||||
kb.targets.add((url, method, data, cookie, tuple(headers)))
|
kb.targets.add((url, method, data, cookie, tuple(headers)))
|
||||||
addedTargetUrls.add(url)
|
addedTargetUrls.add(url)
|
||||||
|
|
||||||
fp = openFile(reqFile, "rb")
|
checkFile(reqFile)
|
||||||
|
try:
|
||||||
content = fp.read()
|
with openFile(reqFile, "rb") as f:
|
||||||
|
content = f.read()
|
||||||
|
except (IOError, OSError, MemoryError), ex:
|
||||||
|
errMsg = "something went wrong while trying "
|
||||||
|
errMsg += "to read the content of file '%s' ('%s')" % (reqFile, ex)
|
||||||
|
raise SqlmapSystemException(errMsg)
|
||||||
|
|
||||||
if conf.scope:
|
if conf.scope:
|
||||||
logger.info("using regular expression '%s' for filtering targets" % conf.scope)
|
logger.info("using regular expression '%s' for filtering targets" % conf.scope)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user