Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 28d6af6 commit 69cdad4Copy full SHA for 69cdad4
1 file changed
lib/core/common.py
@@ -992,10 +992,22 @@ def sanitizeStr(value):
992
993
def checkFile(filename):
994
"""
995
- Checks for file existence
+ Checks for file existence and readability
996
997
998
+ valid = True
999
+
1000
if filename is None or not os.path.isfile(filename):
1001
+ valid = False
1002
1003
+ if valid:
1004
+ try:
1005
+ with open(filename, "rb") as f:
1006
+ pass
1007
+ except:
1008
1009
1010
+ if not valid:
1011
raise SqlmapSystemException("unable to read file '%s'" % filename)
1012
1013
def banner():
0 commit comments