From ac5b49f5554ed449c3913e007242a72914f7e6f0 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Thu, 13 Jan 2011 11:24:03 +0000 Subject: [PATCH] update --- lib/core/common.py | 9 +++++---- lib/core/enums.py | 8 ++++++++ 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/lib/core/common.py b/lib/core/common.py index 75c9f8a7a..a372038e7 100644 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -50,6 +50,7 @@ from lib.core.convert import urlencode from lib.core.enums import DBMS from lib.core.enums import PLACE from lib.core.enums import PAYLOAD +from lib.core.enums import SORTORDER from lib.core.exception import sqlmapDataException from lib.core.exception import sqlmapFilePathException from lib.core.exception import sqlmapGenericException @@ -1973,16 +1974,16 @@ def getInjectionTests(): retVal = conf.tests def priorityFunction(test): - retVal = 0 + retVal = SORTORDER.FIRST if test.stype == PAYLOAD.TECHNIQUE.UNION: - retVal = 3 + retVal = SORTORDER.LAST elif 'details' in test and 'dbms' in test.details: if test.details.dbms in getErrorParsedDBMSes(): - retVal = 1 + retVal = SORTORDER.SECOND else: - retVal = 2 + retVal = SORTORDER.THIRD return retVal diff --git a/lib/core/enums.py b/lib/core/enums.py index aac274b5a..6e9845aa5 100644 --- a/lib/core/enums.py +++ b/lib/core/enums.py @@ -16,6 +16,14 @@ class PRIORITY: HIGHER = 50 HIGHEST = 100 +class SORTORDER: + FIRST = 0 + SECOND = 1 + THIRD = 2 + FOURTH = 3 + FIFTH = 4 + LAST = 100 + class DBMS: ACCESS = "Microsoft Access" FIREBIRD = "Firebird"