mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-07 21:21:33 +00:00
minor refactoring, issue #51
This commit is contained in:
@@ -76,10 +76,9 @@ class xp_cmdshell:
|
|||||||
logger.debug(debugMsg)
|
logger.debug(debugMsg)
|
||||||
|
|
||||||
if mode == 1:
|
if mode == 1:
|
||||||
cmd = "EXEC master..sp_addextendedproc 'xp_cmdshell', "
|
cmd = getSPQLSnippet(DBMS.MSSQL, "enable_xp_cmdshell_2000", ENABLE=str(mode))
|
||||||
cmd += "@dllname='xplog70.dll'"
|
|
||||||
else:
|
else:
|
||||||
cmd = "EXEC master..sp_dropextendedproc 'xp_cmdshell'"
|
cmd = getSPQLSnippet(DBMS.MSSQL, "disable_xp_cmdshell_2000", ENABLE=str(mode))
|
||||||
|
|
||||||
return cmd
|
return cmd
|
||||||
|
|
||||||
|
|||||||
1
procs/mssqlserver/disable_xp_cmdshell_2000.txt
Normal file
1
procs/mssqlserver/disable_xp_cmdshell_2000.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
EXEC master..sp_dropextendedproc 'xp_cmdshell';
|
||||||
1
procs/mssqlserver/enable_xp_cmdshell_2000.txt
Normal file
1
procs/mssqlserver/enable_xp_cmdshell_2000.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
EXEC master..sp_addextendedproc 'xp_cmdshell', @dllname='xplog70.dll';
|
||||||
Reference in New Issue
Block a user