mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 09:36:35 +03:00
minor refactoring
This commit is contained in:
parent
02924eb345
commit
2223c884e5
|
@ -242,6 +242,13 @@ class Agent:
|
||||||
|
|
||||||
return payload
|
return payload
|
||||||
|
|
||||||
|
def adjustSleepTime(self, payload):
|
||||||
|
"""
|
||||||
|
Returns payload with a replaced tag for SLEEPTIME
|
||||||
|
"""
|
||||||
|
|
||||||
|
return payload.replace("[SLEEPTIME]", str(conf.timeSec)) if payload else payload
|
||||||
|
|
||||||
def getComment(self, request):
|
def getComment(self, request):
|
||||||
"""
|
"""
|
||||||
Returns comment form for the given request
|
Returns comment form for the given request
|
||||||
|
|
|
@ -521,7 +521,7 @@ class Connect:
|
||||||
|
|
||||||
raise404 = place != PLACE.URI if raise404 is None else raise404
|
raise404 = place != PLACE.URI if raise404 is None else raise404
|
||||||
|
|
||||||
value = value.replace("[SLEEPTIME]", str(conf.timeSec)) if value else value
|
value = agent.adjustSleepTime(value)
|
||||||
payload = agent.extractPayload(value)
|
payload = agent.extractPayload(value)
|
||||||
threadData = getCurrentThreadData()
|
threadData = getCurrentThreadData()
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ from lib.utils.timeout import timeout
|
||||||
def direct(query, content=True):
|
def direct(query, content=True):
|
||||||
select = True
|
select = True
|
||||||
query = agent.payloadDirect(query)
|
query = agent.payloadDirect(query)
|
||||||
query = query.replace("[SLEEPTIME]", str(conf.timeSec))
|
query = agent.adjustSleepTime(query)
|
||||||
threadData = getCurrentThreadData()
|
threadData = getCurrentThreadData()
|
||||||
|
|
||||||
if Backend.isDbms(DBMS.ORACLE) and query.startswith("SELECT ") and " FROM " not in query:
|
if Backend.isDbms(DBMS.ORACLE) and query.startswith("SELECT ") and " FROM " not in query:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user