Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 35fa214

Browse files
committed
minor update (it was working before too, but this is cleaner)
1 parent 1c44d6d commit 35fa214

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

lib/takeover/xp_cmdshell.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,10 @@ def __xpCmdshellConfigure2005(self, mode):
6262

6363
cmd = "EXEC master..sp_configure 'show advanced options', 1; "
6464
cmd += "RECONFIGURE WITH OVERRIDE; "
65-
cmd += "EXEC master..sp_configure 'xp_cmdshell', %d " % mode
65+
cmd += "EXEC master..sp_configure 'xp_cmdshell', %d; " % mode
66+
cmd += "RECONFIGURE WITH OVERRIDE; "
67+
cmd += "EXEC sp_configure 'show advanced options', 0; "
6668
cmd += "RECONFIGURE WITH OVERRIDE; "
67-
cmd += "EXEC sp_configure 'show advanced options', 0"
6869

6970
return cmd
7071

0 commit comments

Comments
 (0)