From 6ba9dea640ec33f8e50f700cd6a189caa034e50e Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Mon, 16 May 2011 06:17:37 +0000 Subject: [PATCH] just in case for trimmed output --- lib/techniques/inband/union/use.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/techniques/inband/union/use.py b/lib/techniques/inband/union/use.py index 19749c106..f7458f3ba 100644 --- a/lib/techniques/inband/union/use.py +++ b/lib/techniques/inband/union/use.py @@ -269,7 +269,10 @@ def unionUse(expression, unpack=True, dump=False): value += output if conf.verbose == 1: - items = extractRegexResult(r'%s(?P.*?)%s' % (kb.misc.start, kb.misc.stop), output, re.DOTALL | re.IGNORECASE).split(kb.misc.delimiter) + if all(map(lambda x: x in output, [kb.misc.start, kb.misc.stop])): + items = extractRegexResult(r'%s(?P.*?)%s' % (kb.misc.start, kb.misc.stop), output, re.DOTALL | re.IGNORECASE).split(kb.misc.delimiter) + else: + items = output.replace(kb.misc.start, "").replace(kb.misc.stop, "").split(kb.misc.delimiter) status = "[%s] [INFO] retrieved: %s\r\n" % (time.strftime("%X"), safecharencode(",".join(map(lambda x: "\"%s\"" % x, items)))) if len(status) > width: status = "%s..." % status[:width - 3]