mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-08-28 04:33:16 +00:00
Falling back to web backdoor if UDF fails
This commit is contained in:
parent
1c3982c32d
commit
9a624605b6
5 changed files with 22 additions and 6 deletions
|
|
@ -2012,6 +2012,7 @@ def _setKnowledgeBaseAttributes(flushAll=True):
|
|||
kb.threadException = False
|
||||
kb.tableExistsChoice = None
|
||||
kb.uChar = NULL
|
||||
kb.udfFail = False
|
||||
kb.unionDuplicates = False
|
||||
kb.wizardMode = False
|
||||
kb.xpCmdshellAvailable = False
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ from lib.core.enums import OS
|
|||
from thirdparty.six import unichr as _unichr
|
||||
|
||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||
VERSION = "1.3.10.21"
|
||||
VERSION = "1.3.10.22"
|
||||
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
|
||||
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
|
||||
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ from lib.core.common import isStackingAvailable
|
|||
from lib.core.common import readInput
|
||||
from lib.core.convert import getUnicode
|
||||
from lib.core.data import conf
|
||||
from lib.core.data import kb
|
||||
from lib.core.data import logger
|
||||
from lib.core.enums import AUTOCOMPLETE_TYPE
|
||||
from lib.core.enums import DBMS
|
||||
|
|
@ -48,7 +49,7 @@ class Abstraction(Web, UDF, XP_cmdshell):
|
|||
if Backend.isDbms(DBMS.PGSQL) and self.checkCopyExec():
|
||||
self.copyExecCmd(cmd)
|
||||
|
||||
elif self.webBackdoorUrl and not isStackingAvailable():
|
||||
elif self.webBackdoorUrl and (not isStackingAvailable() or kb.udfFail):
|
||||
self.webBackdoorRunCmd(cmd)
|
||||
|
||||
elif Backend.getIdentifiedDbms() in (DBMS.MYSQL, DBMS.PGSQL):
|
||||
|
|
@ -67,7 +68,7 @@ class Abstraction(Web, UDF, XP_cmdshell):
|
|||
if Backend.isDbms(DBMS.PGSQL) and self.checkCopyExec():
|
||||
retVal = self.copyExecCmd(cmd)
|
||||
|
||||
elif self.webBackdoorUrl and not isStackingAvailable():
|
||||
elif self.webBackdoorUrl and (not isStackingAvailable() or kb.udfFail):
|
||||
retVal = self.webBackdoorRunCmd(cmd)
|
||||
|
||||
elif Backend.getIdentifiedDbms() in (DBMS.MYSQL, DBMS.PGSQL):
|
||||
|
|
@ -104,7 +105,7 @@ class Abstraction(Web, UDF, XP_cmdshell):
|
|||
self.execCmd(cmd)
|
||||
|
||||
def shell(self):
|
||||
if self.webBackdoorUrl and not isStackingAvailable():
|
||||
if self.webBackdoorUrl and (not isStackingAvailable() or kb.udfFail):
|
||||
infoMsg = "calling OS shell. To quit type "
|
||||
infoMsg += "'x' or 'q' and press ENTER"
|
||||
logger.info(infoMsg)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue