mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-03-03 19:55:47 +03:00
Patch for an Issue #958
This commit is contained in:
parent
28d6af6237
commit
69cdad4148
|
@ -992,10 +992,22 @@ def sanitizeStr(value):
|
||||||
|
|
||||||
def checkFile(filename):
|
def checkFile(filename):
|
||||||
"""
|
"""
|
||||||
Checks for file existence
|
Checks for file existence and readability
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
valid = True
|
||||||
|
|
||||||
if filename is None or not os.path.isfile(filename):
|
if filename is None or not os.path.isfile(filename):
|
||||||
|
valid = False
|
||||||
|
|
||||||
|
if valid:
|
||||||
|
try:
|
||||||
|
with open(filename, "rb") as f:
|
||||||
|
pass
|
||||||
|
except:
|
||||||
|
valid = False
|
||||||
|
|
||||||
|
if not valid:
|
||||||
raise SqlmapSystemException("unable to read file '%s'" % filename)
|
raise SqlmapSystemException("unable to read file '%s'" % filename)
|
||||||
|
|
||||||
def banner():
|
def banner():
|
||||||
|
|
Loading…
Reference in New Issue
Block a user