From 9b56fbafbe28f30b1bd8216ad229c17130adf216 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Mon, 25 Oct 2010 21:43:13 +0000 Subject: [PATCH] that Sybase is going to be pain in the ass --- plugins/generic/enumeration.py | 5 ++++- xml/queries.xml | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins/generic/enumeration.py b/plugins/generic/enumeration.py index 3a5bc039c..817b291b8 100644 --- a/plugins/generic/enumeration.py +++ b/plugins/generic/enumeration.py @@ -20,6 +20,7 @@ from lib.core.common import getUnicode from lib.core.common import parsePasswordHash from lib.core.common import popValue from lib.core.common import pushValue +from lib.core.common import randomStr from lib.core.common import readInput from lib.core.common import safeStringFormat from lib.core.convert import urlencode @@ -165,7 +166,9 @@ class Enumeration: indexRange = getRange(count, plusOne=plusOne) for index in indexRange: - if condition: + if kb.dbms == "Sybase": + query = rootQuery.blind.query % (','.join(map(lambda x: "'%s'" % x, kb.data.cachedUsers)) if kb.data.cachedUsers else "'%s'" % randomStr()) + elif condition: query = rootQuery.blind.query2 % index else: query = rootQuery.blind.query % index diff --git a/xml/queries.xml b/xml/queries.xml index 22f638c01..22750830d 100644 --- a/xml/queries.xml +++ b/xml/queries.xml @@ -473,7 +473,7 @@ - +