From aad860a3101651dea25e25cf43a7c00e65bf6555 Mon Sep 17 00:00:00 2001 From: jvazquez-r7 Date: Tue, 25 Nov 2014 13:54:08 -0600 Subject: [PATCH] Make conditional easier --- .../admin/mssql/mssql_enum_domain_accounts_sqli.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/modules/auxiliary/admin/mssql/mssql_enum_domain_accounts_sqli.rb b/modules/auxiliary/admin/mssql/mssql_enum_domain_accounts_sqli.rb index 3dbcbe20d0..443ddd8268 100644 --- a/modules/auxiliary/admin/mssql/mssql_enum_domain_accounts_sqli.rb +++ b/modules/auxiliary/admin/mssql/mssql_enum_domain_accounts_sqli.rb @@ -199,11 +199,9 @@ class Metasploit3 < Msf::Auxiliary if result && result.body && result.body =~ /#{clue_start}([^>]*)#{clue_end}/ windows_login = $1 - if windows_login.length != 0 - print_status("#{peer} - #{windows_login}") - windows_logins.push(windows_login) unless windows_logins.include?(windows_login) - # Verbose output - vprint_status("#{peer} - Test sid: #{win_sid}") + unless windows_login.empty? || windows_logins.include?(windows_login) + windows_logins.push(windows_login) + print_good("#{peer} - #{windows_login}") end end