now [SLEEPTIME] is changeable properly in vivo

This commit is contained in:
Miroslav Stampar 2012-01-05 14:45:05 +00:00
parent 9d50c806e1
commit 1f085a0241
5 changed files with 9 additions and 4 deletions

View File

@ -464,6 +464,9 @@ def checkSqlInjection(place, parameter, value):
if vector is None and "vector" in test and test.vector is not None:
vector = "%s%s" % (test.vector, comment or "")
if method == PAYLOAD.METHOD.TIME:
reqPayload = reqPayload.replace(test.request.payload.replace("[SLEEPTIME]", str(conf.timeSec)), test.request.payload)
injection.data[stype] = AttribDict()
injection.data[stype].title = title
injection.data[stype].payload = agent.removePayloadDelimiters(reqPayload)

View File

@ -135,7 +135,7 @@ def __formatInjection(inj):
title = title.replace("columns", "column")
data += " Type: %s\n" % PAYLOAD.SQLINJECTION[stype]
data += " Title: %s\n" % title
data += " Payload: %s\n\n" % sdata.payload
data += " Payload: %s\n\n" % (sdata.payload if stype != PAYLOAD.TECHNIQUE.TIME else sdata.payload.replace("[SLEEPTIME]", str(conf.timeSec)))
return data

View File

@ -218,8 +218,7 @@ class Agent:
_ = (
("[RANDNUM]", str(randInt)), ("[RANDNUM1]", str(randInt1)), ("[RANDSTR]", randStr),\
("[RANDSTR1]", randStr1), ("[DELIMITER_START]", kb.chars.start), ("[DELIMITER_STOP]", kb.chars.stop),\
("[AT_REPLACE]", kb.chars.at), ("[SPACE_REPLACE]", kb.chars.space), ("[DOLLAR_REPLACE]", kb.chars.dollar),\
("[SLEEPTIME]", str(conf.timeSec))
("[AT_REPLACE]", kb.chars.at), ("[SPACE_REPLACE]", kb.chars.space), ("[DOLLAR_REPLACE]", kb.chars.dollar)
)
payload = reduce(lambda x, y: x.replace(y[0], y[1]), _, payload)

View File

@ -551,6 +551,9 @@ class Connect:
threadData = getCurrentThreadData()
if payload:
if timeBasedCompare:
payload = payload.replace("[SLEEPTIME]", str(conf.timeSec))
if kb.tamperFunctions:
for function in kb.tamperFunctions:
payload = function(payload)