xp_cmdshell

Rédigé par M Sozezzo - - Aucun commentaire

We can spawn a Windows command shell and passes in a string for execution. Any output is returned as rows of text. (msdn)
ex:

xp_cmdshell 'dir C:\'


Set configuration

-- --------------------------------
-- Set Configuration
-- --------------------------------
--

-- To allow advanced options to be changed.
EXEC sp_configure 'show advanced options', 1;
GO
-- To update the currently configured value for advanced options.
RECONFIGURE
GO
-- To enable the feature.
EXEC sp_configure 'xp_cmdshell', 1
GO
-- To update the currently configured value for this feature.
RECONFIGURE
--

 

but, we can do more...

Lire la suite de xp_cmdshell

Fil RSS des articles de ce mot clé