minor update

This commit is contained in:
Miroslav Stampar 2012-02-25 10:53:38 +00:00
parent 74b19a0386
commit 06ab3fa134
2 changed files with 5 additions and 3 deletions

View File

@ -213,6 +213,7 @@ def __resumeHashDBValues():
kb.chars = hashDBRetrieve(HASHDB_KEYS.KB_CHARS, True) or kb.chars kb.chars = hashDBRetrieve(HASHDB_KEYS.KB_CHARS, True) or kb.chars
kb.brute.tables = hashDBRetrieve(HASHDB_KEYS.KB_BRUTE_TABLES, True) or kb.brute.tables kb.brute.tables = hashDBRetrieve(HASHDB_KEYS.KB_BRUTE_TABLES, True) or kb.brute.tables
kb.brute.columns = hashDBRetrieve(HASHDB_KEYS.KB_BRUTE_COLUMNS, True) or kb.brute.columns kb.brute.columns = hashDBRetrieve(HASHDB_KEYS.KB_BRUTE_COLUMNS, True) or kb.brute.columns
kb.xpCmdshellAvailable = hashDBRetrieve(HASHDB_KEYS.XP_CMDSHELL_AVAILABLE) or kb.xpCmdshellAvailable
conf.tmpPath = conf.tmpPath or hashDBRetrieve(HASHDB_KEYS.CONF_TMP_PATH) conf.tmpPath = conf.tmpPath or hashDBRetrieve(HASHDB_KEYS.CONF_TMP_PATH)

View File

@ -9,6 +9,7 @@ See the file 'doc/COPYING' for copying permission
from lib.core.common import Backend from lib.core.common import Backend
from lib.core.common import getSPLSnippet from lib.core.common import getSPLSnippet
from lib.core.common import hashDBWrite
from lib.core.common import randomStr from lib.core.common import randomStr
from lib.core.common import readInput from lib.core.common import readInput
from lib.core.common import wasLastRequestDelayed from lib.core.common import wasLastRequestDelayed
@ -16,8 +17,8 @@ from lib.core.data import conf
from lib.core.data import kb from lib.core.data import kb
from lib.core.data import logger from lib.core.data import logger
from lib.core.enums import DBMS from lib.core.enums import DBMS
from lib.core.enums import HASHDB_KEYS
from lib.core.exception import sqlmapUnsupportedFeatureException from lib.core.exception import sqlmapUnsupportedFeatureException
from lib.core.session import setXpCmdshellAvailability
from lib.core.unescaper import unescaper from lib.core.unescaper import unescaper
from lib.request import inject from lib.request import inject
@ -145,7 +146,7 @@ class xp_cmdshell:
return output return output
def xpCmdshellInit(self): def xpCmdshellInit(self):
if kb.xpCmdshellAvailable is False: if not kb.xpCmdshellAvailable:
infoMsg = "checking if xp_cmdshell extended procedure is " infoMsg = "checking if xp_cmdshell extended procedure is "
infoMsg += "available, please wait.." infoMsg += "available, please wait.."
logger.info(infoMsg) logger.info(infoMsg)
@ -185,7 +186,7 @@ class xp_cmdshell:
warnMsg += "because sp_OACreate is disabled" warnMsg += "because sp_OACreate is disabled"
logger.warn(warnMsg) logger.warn(warnMsg)
setXpCmdshellAvailability(kb.xpCmdshellAvailable) hashDBWrite(HASHDB_KEYS.XP_CMDSHELL_AVAILABLE, kb.xpCmdshellAvailable)
if not kb.xpCmdshellAvailable: if not kb.xpCmdshellAvailable:
errMsg = "unable to proceed without xp_cmdshell" errMsg = "unable to proceed without xp_cmdshell"