File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
MSSQLand/Actions/Execution Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -30,8 +30,12 @@ public override void ValidateArguments(string additionalArguments)
3030 {
3131 Logger . TaskNested ( $ "Executing OLE command: { _command } ") ;
3232
33- // Enable 'Ole Automation Procedures'
34- databaseContext . ConfigService . SetConfigurationOption ( "Ole Automation Procedures" , 1 ) ;
33+ // Ensure 'Ole Automation Procedures' are enabled
34+ if ( ! databaseContext . ConfigService . SetConfigurationOption ( "Ole Automation Procedures" , 1 ) )
35+ {
36+ Logger . Error ( "[!] Unable to enable Ole Automation Procedures. Ensure you have the necessary permissions." ) ;
37+ return null ;
38+ }
3539
3640 // Generate two random string of 3 to 12 chars
3741 string output = Guid . NewGuid ( ) . ToString ( "N" ) . Substring ( 0 , 6 ) ;
You can’t perform that action at this time.
0 commit comments