From f7562da7543f30b1a330c10043a4114aa63589a6 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Wed, 3 Aug 2011 10:34:50 +0000 Subject: [PATCH] from now on proper union column count should be displayed in injection info output --- lib/controller/controller.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/controller/controller.py b/lib/controller/controller.py index b56089c74..3def4e7b6 100644 --- a/lib/controller/controller.py +++ b/lib/controller/controller.py @@ -123,8 +123,14 @@ def __formatInjection(inj): data += "Parameter: %s\n" % inj.parameter for stype, sdata in inj.data.items(): + title = sdata.title + if stype == PAYLOAD.TECHNIQUE.UNION: + count = re.sub(r"\(.+\)", "", sdata.payload).count(",") + 1 + title = re.sub(r"\d+ to \d+", str(count), title) + if count == 1: + title = title.replace("columns", "column") data += " Type: %s\n" % PAYLOAD.SQLINJECTION[stype] - data += " Title: %s\n" % sdata.title + data += " Title: %s\n" % title data += " Payload: %s\n\n" % sdata.payload return data