mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-02-16 19:40:37 +03:00
little precaution
This commit is contained in:
parent
4af000e699
commit
78024eafe0
|
@ -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)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user