Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 45caadb

Browse files
committed
important update - finally found what was causing headache for UNION payloads in noticeable number of cases
1 parent 97bd535 commit 45caadb

3 files changed

Lines changed: 14 additions & 1 deletion

File tree

lib/controller/checks.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,8 @@ def genCmpPayload():
414414
# by unionTest() directly
415415
where = vector[6]
416416

417+
kb.previousMethod = method
418+
417419
# If the injection test was successful feed the injection
418420
# object with the test's details
419421
if injectable is True:

lib/core/enums.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ class WARNFLAGS:
100100
DATA_TO_STDOUT = 'dataToStdout'
101101
THREADS = 'threads'
102102
PIVOT_LIMIT = 'pivotLimit'
103+
TIME_UNRECOVERED = 'timeUnrecovered'
103104

104105
class EXPECTED:
105106
BOOL = "bool"

lib/request/connect.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
from lib.core.enums import HTTPHEADER
4343
from lib.core.enums import HTTPMETHOD
4444
from lib.core.enums import NULLCONNECTION
45+
from lib.core.enums import PAYLOAD
4546
from lib.core.enums import PLACE
4647
from lib.core.enums import WARNFLAGS
4748
from lib.core.exception import sqlmapConnectionException
@@ -397,7 +398,16 @@ def getPage(**kwargs):
397398
warnMsg += ", sqlmap is going to retry the request"
398399
logger.critical(warnMsg)
399400

400-
if kb.originalPage is None:
401+
if kb.testMode and kb.previousMethod == PAYLOAD.METHOD.TIME:
402+
# timed based payloads can cause web server unresponsiveness
403+
# if the injectable piece of code is some kind of JOIN-like query
404+
warnMsg = "most probably web server instance hasn't recovered yet "
405+
warnMsg += "from previous timed based payload. if the problem "
406+
warnMsg += "persists please wait for few minutes and rerun "
407+
warnMsg += "without flag T in --technique option "
408+
warnMsg += "(e.g. --technique=BEUS)"
409+
singleTimeLogMessage(warnMsg, logging.WARN, WARNFLAGS.TIME_UNRECOVERED)
410+
elif kb.originalPage is None:
401411
warnMsg = "if the problem persists please try to rerun "
402412
warnMsg += "with the --random-agent switch turned on "
403413
warnMsg += "and/or try to use proxy switches (--ignore-proxy, --proxy,...)"

0 commit comments

Comments
 (0)