mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-06 20:51:31 +00:00
minor improvement
This commit is contained in:
@@ -1355,7 +1355,7 @@ def initCommonOutputs():
|
||||
|
||||
cfile.close()
|
||||
|
||||
def getFileItems(filename, commentPrefix='#', unicode_=True):
|
||||
def getFileItems(filename, commentPrefix='#', unicode_=True, lowercase=False, unique=False):
|
||||
retVal = []
|
||||
|
||||
checkFile(filename)
|
||||
@@ -1376,6 +1376,10 @@ def getFileItems(filename, commentPrefix='#', unicode_=True):
|
||||
except UnicodeDecodeError:
|
||||
continue
|
||||
if line:
|
||||
if lowercase:
|
||||
line = line.lower()
|
||||
if unique and line in retVal:
|
||||
continue
|
||||
retVal.append(line)
|
||||
|
||||
return retVal
|
||||
|
||||
Reference in New Issue
Block a user