mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-01-24 00:04:23 +03:00
Minor update (for newer versions of MsSQL)
This commit is contained in:
parent
2b506d744d
commit
0b1efc0759
|
@ -19,7 +19,7 @@ from lib.core.enums import OS
|
||||||
from lib.core.revision import getRevisionNumber
|
from lib.core.revision import getRevisionNumber
|
||||||
|
|
||||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||||
VERSION = "1.0.5.96"
|
VERSION = "1.0.5.97"
|
||||||
REVISION = getRevisionNumber()
|
REVISION = getRevisionNumber()
|
||||||
STABLE = VERSION.count('.') <= 2
|
STABLE = VERSION.count('.') <= 2
|
||||||
VERSION_STRING = "sqlmap/%s#%s" % (VERSION, "stable" if STABLE else "dev")
|
VERSION_STRING = "sqlmap/%s#%s" % (VERSION, "stable" if STABLE else "dev")
|
||||||
|
|
|
@ -45,7 +45,7 @@ class Xp_cmdshell:
|
||||||
def _xpCmdshellCreate(self):
|
def _xpCmdshellCreate(self):
|
||||||
cmd = ""
|
cmd = ""
|
||||||
|
|
||||||
if Backend.isVersionWithin(("2005", "2008", "2012")):
|
if not Backend.isVersionWithin(("2000",)):
|
||||||
logger.debug("activating sp_OACreate")
|
logger.debug("activating sp_OACreate")
|
||||||
|
|
||||||
cmd = getSQLSnippet(DBMS.MSSQL, "activate_sp_oacreate")
|
cmd = getSQLSnippet(DBMS.MSSQL, "activate_sp_oacreate")
|
||||||
|
@ -56,7 +56,7 @@ class Xp_cmdshell:
|
||||||
|
|
||||||
cmd = getSQLSnippet(DBMS.MSSQL, "create_new_xp_cmdshell", RANDSTR=self._randStr)
|
cmd = getSQLSnippet(DBMS.MSSQL, "create_new_xp_cmdshell", RANDSTR=self._randStr)
|
||||||
|
|
||||||
if Backend.isVersionWithin(("2005", "2008")):
|
if not Backend.isVersionWithin(("2000",)):
|
||||||
cmd += ";RECONFIGURE WITH OVERRIDE"
|
cmd += ";RECONFIGURE WITH OVERRIDE"
|
||||||
|
|
||||||
inject.goStacked(agent.runAsDBMSUser(cmd))
|
inject.goStacked(agent.runAsDBMSUser(cmd))
|
||||||
|
@ -83,10 +83,10 @@ class Xp_cmdshell:
|
||||||
return cmd
|
return cmd
|
||||||
|
|
||||||
def _xpCmdshellConfigure(self, mode):
|
def _xpCmdshellConfigure(self, mode):
|
||||||
if Backend.isVersionWithin(("2005", "2008")):
|
if Backend.isVersionWithin(("2000",)):
|
||||||
cmd = self._xpCmdshellConfigure2005(mode)
|
|
||||||
else:
|
|
||||||
cmd = self._xpCmdshellConfigure2000(mode)
|
cmd = self._xpCmdshellConfigure2000(mode)
|
||||||
|
else:
|
||||||
|
cmd = self._xpCmdshellConfigure2005(mode)
|
||||||
|
|
||||||
inject.goStacked(agent.runAsDBMSUser(cmd))
|
inject.goStacked(agent.runAsDBMSUser(cmd))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user