mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-29 04:53:48 +03:00
More flexible --sql-file
This commit is contained in:
parent
337eb9861a
commit
76c8ce0e70
|
@ -120,9 +120,12 @@ class Custom:
|
|||
if not sfile:
|
||||
continue
|
||||
|
||||
query = getSQLSnippet(Backend.getDbms(), sfile)
|
||||
|
||||
infoMsg = "executing SQL statement%s from file '%s'" % ("s" if ";" in query else "", sfile)
|
||||
logger.info(infoMsg)
|
||||
snippet = getSQLSnippet(Backend.getDbms(), sfile)
|
||||
|
||||
if snippet and all(query.strip().upper().startswith("SELECT") for query in filter(None, snippet.split(';' if ';' in snippet else '\n'))):
|
||||
for query in filter(None, snippet.split(';' if ';' in snippet else '\n')):
|
||||
query = query.strip()
|
||||
if query:
|
||||
conf.dumper.query(query, self.sqlQuery(query))
|
||||
else:
|
||||
conf.dumper.query(snippet, self.sqlQuery(snippet))
|
||||
|
|
Loading…
Reference in New Issue
Block a user