mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-08-04 14:55:40 +00:00
some update regarding common tables
This commit is contained in:
parent
895efd28a6
commit
d75578c81f
4 changed files with 63 additions and 7 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue