mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-08-03 22:31:34 +00:00
minor improvement
This commit is contained in:
parent
22ce464efc
commit
a555d1ad68
2 changed files with 8 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue