From 3f596cda8530d966849c5c7996633a57b20b0fbc Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Mon, 22 Oct 2012 11:49:23 +0200 Subject: [PATCH] Minor fix for --dump --technique=B when empty strings are returned --- lib/request/inject.py | 2 +- plugins/generic/entries.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/request/inject.py b/lib/request/inject.py index 36c76efed..fe7c3d1e5 100644 --- a/lib/request/inject.py +++ b/lib/request/inject.py @@ -437,7 +437,7 @@ def getValue(expression, blind=True, inband=True, error=True, time=True, fromUse value = __goInferenceProxy(query, fromUser, batch, unpack, charsetType, firstChar, lastChar, dump) if value and isinstance(value, basestring): - value = value.strip() + value = value.strip() if value.strip() else value[:1] else: errMsg = "none of the injection types identified can be " errMsg += "leveraged to retrieve queries output" diff --git a/plugins/generic/entries.py b/plugins/generic/entries.py index c85a2c97c..df5413ea3 100644 --- a/plugins/generic/entries.py +++ b/plugins/generic/entries.py @@ -285,6 +285,7 @@ class Entries: query = rootQuery.blind.query % (index, column, tbl) value = NULL if column in emptyColumns else inject.getValue(query, inband=False, error=False, dump=True) + value = '' if value is None else value _ = DUMP_REPLACEMENTS.get(getUnicode(value), getUnicode(value)) lengths[column] = max(lengths[column], len(_))