mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-06 12:41:30 +00:00
little precaution
This commit is contained in:
@@ -1343,6 +1343,11 @@ def getFileItems(filename, commentPrefix='#', unicode_=True):
|
|||||||
if line.find(commentPrefix) != -1:
|
if line.find(commentPrefix) != -1:
|
||||||
line = line[:line.find(commentPrefix)]
|
line = line[:line.find(commentPrefix)]
|
||||||
line = line.strip()
|
line = line.strip()
|
||||||
|
if not unicode_:
|
||||||
|
try:
|
||||||
|
str.encode(line)
|
||||||
|
except UnicodeDecodeError:
|
||||||
|
continue
|
||||||
if line:
|
if line:
|
||||||
retVal.append(line)
|
retVal.append(line)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user