mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-06 12:41:30 +00:00
some update regarding common tables
This commit is contained in:
@@ -1309,15 +1309,16 @@ def initCommonOutputs():
|
||||
|
||||
cfile.close()
|
||||
|
||||
def getFileItems(filename):
|
||||
def getFileItems(filename, commentPrefix='#'):
|
||||
retVal = []
|
||||
|
||||
checkFile(filename)
|
||||
ifile = codecs.open(filename, 'r', conf.dataEncoding)
|
||||
|
||||
for line in ifile.readlines(): # xreadlines doesn't return unicode strings when codec.open() is used
|
||||
if line.find('#') != -1:
|
||||
line = line[:line.find('#')]
|
||||
if commentPrefix:
|
||||
if line.find(commentPrefix) != -1:
|
||||
line = line[:line.find(commentPrefix)]
|
||||
line = line.strip()
|
||||
if line:
|
||||
retVal.append(line)
|
||||
|
||||
Reference in New Issue
Block a user