Skip to content

Commit f142c0f

Browse files
committed
minor update
1 parent 22b3fa0 commit f142c0f

File tree

5 files changed

+5
-26
lines changed

5 files changed

+5
-26
lines changed

lib/controller/checks.py

-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@
4949
from lib.core.exception import sqlmapNoneDataException
5050
from lib.core.exception import sqlmapSilentQuitException
5151
from lib.core.exception import sqlmapUserQuitException
52-
from lib.core.session import setDynamicMarkings
5352
from lib.core.settings import CONSTANT_RATIO
5453
from lib.core.settings import UNKNOWN_DBMS_VERSION
5554
from lib.core.settings import LOWER_RATIO_BOUND

lib/controller/controller.py

+3
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,9 @@ def __saveToHashDB():
192192
if not hashDBRetrieve(HASHDB_KEYS.KB_CHARS):
193193
hashDBWrite(HASHDB_KEYS.KB_CHARS, kb.chars, True)
194194

195+
if not hashDBRetrieve(HASHDB_KEYS.KB_DYNAMIC_MARKINGS):
196+
hashDBWrite(HASHDB_KEYS.KB_DYNAMIC_MARKINGS, kb.dynamicMarkings, True)
197+
195198
def __saveToResultsFile():
196199
if not conf.resultsFP:
197200
return

lib/core/enums.py

+1
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ class HASHDB_KEYS:
142142
CONF_TMP_PATH = "CONF_TMP_PATH"
143143
KB_XP_CMDSHELL_AVAILABLE = "KB_XP_CMDSHELL_AVAILABLE"
144144
KB_INJECTIONS = "KB_INJECTIONS"
145+
KB_DYNAMIC_MARKINGS = "KB_DYNAMIC_MARKINGS"
145146

146147
class REDIRECTION:
147148
FOLLOW = "1"

lib/core/session.py

-25
Original file line numberDiff line numberDiff line change
@@ -36,22 +36,6 @@ def unSafeFormatString(value):
3636
retVal = retVal.replace("__LEFT_SQUARE_BRACKET__", "[").replace("__RIGHT_SQUARE_BRACKET__", "]")
3737
return retVal
3838

39-
def setDynamicMarkings(markings):
40-
"""
41-
Save information retrieved about dynamic markings to the
42-
session file.
43-
"""
44-
45-
condition = (
46-
( not kb.resumedQueries
47-
or ( kb.resumedQueries.has_key(conf.url) and
48-
not kb.resumedQueries[conf.url].has_key("Dynamic markings")
49-
) )
50-
)
51-
52-
if condition:
53-
dataToSessionFile("[%s][%s][%s][Dynamic markings][%s]\n" % (conf.url, None, None, base64pickle(markings)))
54-
5539
def setDbms(dbms):
5640
"""
5741
@param dbms: database management system to be set into the knowledge
@@ -124,15 +108,6 @@ def setOs():
124108
if condition:
125109
dataToSessionFile("[%s][%s][%s][OS][%s]\n" % (conf.url, kb.injection.place, safeFormatString(conf.parameters[kb.injection.place]), Backend.getOs()))
126110

127-
def setXpCmdshellAvailability(available):
128-
condition = (
129-
not kb.resumedQueries or ( kb.resumedQueries.has_key(conf.url) and
130-
not kb.resumedQueries[conf.url].has_key("xp_cmdshell availability") )
131-
)
132-
133-
if condition:
134-
dataToSessionFile("[%s][%s][%s][xp_cmdshell availability][%s]\n" % (conf.url, kb.injection.place, safeFormatString(conf.parameters[kb.injection.place]), str(available).lower()))
135-
136111
def resumeConfKb(expression, url, value):
137112
if expression == "Dynamic markings" and url == conf.url:
138113
kb.dynamicMarkings = base64unpickle(value[:-1])

lib/core/target.py

+1
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ def __resumeHashDBValues():
211211

212212
kb.absFilePaths = hashDBRetrieve(HASHDB_KEYS.KB_ABS_FILE_PATHS, True) or kb.absFilePaths
213213
kb.chars = hashDBRetrieve(HASHDB_KEYS.KB_CHARS, True) or kb.chars
214+
kb.dynamicMarkings = hashDBRetrieve(HASHDB_KEYS.KB_DYNAMIC_MARKINGS, True) or kb.dynamicMarkings
214215
kb.brute.tables = hashDBRetrieve(HASHDB_KEYS.KB_BRUTE_TABLES, True) or kb.brute.tables
215216
kb.brute.columns = hashDBRetrieve(HASHDB_KEYS.KB_BRUTE_COLUMNS, True) or kb.brute.columns
216217
kb.xpCmdshellAvailable = hashDBRetrieve(HASHDB_KEYS.KB_XP_CMDSHELL_AVAILABLE) or kb.xpCmdshellAvailable

0 commit comments

Comments
 (0)