From f74ab34881f576fb034d28f772db9276d8012e6c Mon Sep 17 00:00:00 2001 From: jvazquez-r7 Date: Mon, 24 Nov 2014 11:50:41 -0600 Subject: [PATCH] Delente unnecessary check --- .../mssql/mssql_enum_windows_domain_accounts.rb | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/modules/auxiliary/admin/mssql/mssql_enum_windows_domain_accounts.rb b/modules/auxiliary/admin/mssql/mssql_enum_windows_domain_accounts.rb index ed9c7a5b92..fb0dd90ffd 100644 --- a/modules/auxiliary/admin/mssql/mssql_enum_windows_domain_accounts.rb +++ b/modules/auxiliary/admin/mssql/mssql_enum_windows_domain_accounts.rb @@ -118,15 +118,12 @@ class Metasploit3 < Msf::Auxiliary end # Create output file - this_service = nil - if framework.db and framework.db.active - this_service = report_service( - :host => rhost, - :port => rport, - :name => 'mssql', - :proto => 'tcp' - ) - end + this_service = report_service( + :host => rhost, + :port => rport, + :name => 'mssql', + :proto => 'tcp' + ) filename= "#{datastore['RHOST']}-#{datastore['RPORT']}_windows_domain_accounts.csv" path = store_loot("windows_domain_accounts", "text/plain", datastore['RHOST'], windows_domain_login_table.to_csv, filename, "SQL Server query results",this_service) print_status("Query results have been saved to: #{path}")