From 9f68e54fff048eb988693a6c49b37e159c42ce40 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Thu, 22 Dec 2011 10:59:28 +0000 Subject: [PATCH] minor cleanup --- lib/core/common.py | 4 ++-- lib/core/settings.py | 2 +- lib/request/inject.py | 1 - lib/techniques/error/use.py | 2 -- lib/utils/resume.py | 1 - 5 files changed, 3 insertions(+), 7 deletions(-) diff --git a/lib/core/common.py b/lib/core/common.py index 1cb613a6a..83468b666 100644 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -93,13 +93,13 @@ from lib.core.settings import REFERER_ALIASES from lib.core.settings import USER_AGENT_ALIASES from lib.core.settings import ERROR_PARSING_REGEXES from lib.core.settings import PRINTABLE_CHAR_REGEX +from lib.core.settings import DUMP_DEL_MARKER from lib.core.settings import SQL_STATEMENTS from lib.core.settings import SUPPORTED_DBMS from lib.core.settings import UNKNOWN_DBMS_VERSION from lib.core.settings import DEFAULT_MSSQL_SCHEMA from lib.core.settings import DUMP_NEWLINE_MARKER from lib.core.settings import DUMP_CR_MARKER -from lib.core.settings import DUMP_DEL_MARKER from lib.core.settings import DUMP_TAB_MARKER from lib.core.settings import ML from lib.core.settings import MIN_TIME_RESPONSES @@ -1350,7 +1350,7 @@ def parseUnionPage(output, unique=True): continue entry = safecharencode(entry) if kb.safeCharEncode else entry - entry = entry.split(DUMP_DEL_MARKER if DUMP_DEL_MARKER in entry else kb.chars.delimiter) + entry = entry.split(kb.chars.delimiter) data.append(entry[0] if len(entry) == 1 else entry) else: diff --git a/lib/core/settings.py b/lib/core/settings.py index 64092edff..563825058 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -48,8 +48,8 @@ LOGGER.setLevel(logging.WARN) # dump markers DUMP_NEWLINE_MARKER = "__NEWLINE__" DUMP_CR_MARKER = "__CARRIAGE_RETURN__" -DUMP_DEL_MARKER = "__DEL__" DUMP_TAB_MARKER = "__TAB__" +DUMP_DEL_MARKER = "__DEL__" URI_QUESTION_MARKER = "__QUESTION_MARK__" diff --git a/lib/request/inject.py b/lib/request/inject.py index 5516d7f1b..6126117c6 100644 --- a/lib/request/inject.py +++ b/lib/request/inject.py @@ -26,7 +26,6 @@ from lib.core.common import popValue from lib.core.common import pushValue from lib.core.common import randomInt from lib.core.common import readInput -from lib.core.common import replaceNewlineTabs from lib.core.common import safeStringFormat from lib.core.data import conf from lib.core.data import kb diff --git a/lib/techniques/error/use.py b/lib/techniques/error/use.py index a745316fb..627db3362 100644 --- a/lib/techniques/error/use.py +++ b/lib/techniques/error/use.py @@ -24,7 +24,6 @@ from lib.core.common import initTechnique from lib.core.common import isNumPosStrValue from lib.core.common import listToStrValue from lib.core.common import randomInt -from lib.core.common import replaceNewlineTabs from lib.core.common import safeStringFormat from lib.core.convert import htmlunescape from lib.core.convert import safecharencode @@ -129,7 +128,6 @@ def __oneShotErrorUse(expression, field): retVal = __errorReplaceChars(retVal) - #dataToSessionFile("[%s][%s][%s][%s][%s]\n" % (conf.url, kb.injection.place, conf.parameters[kb.injection.place], expression, replaceNewlineTabs(retVal))) conf.hashDB.write(expression, retVal) return safecharencode(retVal) if kb.safeCharEncode else retVal diff --git a/lib/utils/resume.py b/lib/utils/resume.py index 74f13114a..706f13961 100644 --- a/lib/utils/resume.py +++ b/lib/utils/resume.py @@ -27,7 +27,6 @@ from lib.core.enums import DBMS from lib.core.enums import PAYLOAD from lib.core.unescaper import unescaper from lib.techniques.blind.inference import bisection -from lib.core.settings import DUMP_DEL_MARKER def queryOutputLength(expression, payload): """