mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-02-16 19:40:37 +03:00
Minor bug fix to properly handle in -d data retrieval statement not starting with SELECT
This commit is contained in:
parent
f1b402b103
commit
97573693be
|
@ -23,7 +23,7 @@ from lib.utils.timeout import timeout
|
|||
|
||||
def direct(query, content=True):
|
||||
output = None
|
||||
select = False
|
||||
select = True
|
||||
query = agent.payloadDirect(query)
|
||||
|
||||
if backend.getIdentifiedDbms() == DBMS.ORACLE and query.startswith("SELECT ") and " FROM " not in query:
|
||||
|
@ -31,10 +31,13 @@ def direct(query, content=True):
|
|||
|
||||
for sqlTitle, sqlStatements in SQL_STATEMENTS.items():
|
||||
for sqlStatement in sqlStatements:
|
||||
if query.lower().startswith(sqlStatement) and sqlTitle == "SQL SELECT statement":
|
||||
select = True
|
||||
if query.lower().startswith(sqlStatement) and sqlTitle != "SQL SELECT statement":
|
||||
select = False
|
||||
break
|
||||
|
||||
if select and not query.upper().startswith("SELECT "):
|
||||
query = "SELECT " + query
|
||||
|
||||
logger.log(9, query)
|
||||
|
||||
if not select:
|
||||
|
|
Loading…
Reference in New Issue
Block a user