minor refactoring, issue #51

This commit is contained in:
Bernardo Damele 2012-07-02 12:50:26 +01:00
parent 8eefe4b71f
commit b7d2680e55
3 changed files with 4 additions and 3 deletions

View File

@ -76,10 +76,9 @@ class xp_cmdshell:
logger.debug(debugMsg)
if mode == 1:
cmd = "EXEC master..sp_addextendedproc 'xp_cmdshell', "
cmd += "@dllname='xplog70.dll'"
cmd = getSPQLSnippet(DBMS.MSSQL, "enable_xp_cmdshell_2000", ENABLE=str(mode))
else:
cmd = "EXEC master..sp_dropextendedproc 'xp_cmdshell'"
cmd = getSPQLSnippet(DBMS.MSSQL, "disable_xp_cmdshell_2000", ENABLE=str(mode))
return cmd

View File

@ -0,0 +1 @@
EXEC master..sp_dropextendedproc 'xp_cmdshell';

View File

@ -0,0 +1 @@
EXEC master..sp_addextendedproc 'xp_cmdshell', @dllname='xplog70.dll';