Cleaning/refactoring of bunch of stacked/suffix/comment stuff (e.g.

This commit is contained in:
Miroslav Stampar
2012-09-26 11:27:43 +02:00
parent 6bc5f44b20
commit 687f3991de
6 changed files with 47 additions and 45 deletions

View File

@@ -128,12 +128,15 @@ def __formatInjection(inj):
for stype, sdata in inj.data.items():
title = sdata.title
vector = sdata.vector
comment = sdata.comment
if stype == PAYLOAD.TECHNIQUE.UNION:
count = re.sub(r"(?i)(\(.+\))|(\blimit[^A-Za-z]+)", "", sdata.payload).count(',') + 1
title = re.sub(r"\d+ to \d+", str(count), title)
vector = agent.forgeInbandQuery("[QUERY]", vector[0], vector[1], vector[2], None, None, vector[5], vector[6])
if count == 1:
title = title.replace("columns", "column")
elif comment:
vector = "%s%s" % (vector, comment)
data += " Type: %s\n" % PAYLOAD.SQLINJECTION[stype]
data += " Title: %s\n" % title
data += " Payload: %s\n" % agent.adjustLateValues(sdata.payload)