From 7e3048d2f723ad6d55b68c67b23dfd0899ff2fd4 Mon Sep 17 00:00:00 2001 From: Dean Welch Date: Wed, 20 Mar 2024 15:45:07 +0000 Subject: [PATCH] Grammar --- modules/auxiliary/scanner/mssql/mssql_login.rb | 4 ++-- modules/auxiliary/scanner/mysql/mysql_login.rb | 4 ++-- modules/auxiliary/scanner/postgres/postgres_login.rb | 4 ++-- modules/auxiliary/scanner/smb/smb_login.rb | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/auxiliary/scanner/mssql/mssql_login.rb b/modules/auxiliary/scanner/mssql/mssql_login.rb index 4da37b65120f..bfaf205cd28e 100644 --- a/modules/auxiliary/scanner/mssql/mssql_login.rb +++ b/modules/auxiliary/scanner/mssql/mssql_login.rb @@ -60,9 +60,9 @@ def run results = super logins = results.flat_map { |_k, v| v[:successful_logins] } sessions = results.flat_map { |_k, v| v[:successful_sessions] } - print_status("Bruteforce completed, #{logins.size} credentials were successful.") + print_status("Bruteforce completed, #{logins.size} #{logins.size == 1 ? 'credential was' : 'credentials were'} successful.") if datastore['CreateSession'] - print_status("#{sessions.size} MSSQL sessions were opened successfully.") + print_status("#{sessions.size} MSSQL #{sessions.size == 1 ? 'session was' : 'sessions were'} opened successfully.") else print_status('You can open an MSSQL session with these credentials and %grnCreateSession%clr set to true') end diff --git a/modules/auxiliary/scanner/mysql/mysql_login.rb b/modules/auxiliary/scanner/mysql/mysql_login.rb index 020577c04d0c..aeaaba020c78 100644 --- a/modules/auxiliary/scanner/mysql/mysql_login.rb +++ b/modules/auxiliary/scanner/mysql/mysql_login.rb @@ -64,9 +64,9 @@ def run results = super logins = results.flat_map { |_k, v| v[:successful_logins] } sessions = results.flat_map { |_k, v| v[:successful_sessions] } - print_status("Bruteforce completed, #{logins.size} credentials were successful.") + print_status("Bruteforce completed, #{logins.size} #{logins.size == 1 ? 'credential was' : 'credentials were'} successful.") if datastore['CreateSession'] - print_status("#{sessions.size} MySQL sessions were opened successfully.") + print_status("#{sessions.size} MySQL #{sessions.size == 1 ? 'session was' : 'sessions were'} opened successfully.") else print_status('You can open an MySQL session with these credentials and %grnCreateSession%clr set to true') end diff --git a/modules/auxiliary/scanner/postgres/postgres_login.rb b/modules/auxiliary/scanner/postgres/postgres_login.rb index fd6b8eb76f43..ea240104dae1 100644 --- a/modules/auxiliary/scanner/postgres/postgres_login.rb +++ b/modules/auxiliary/scanner/postgres/postgres_login.rb @@ -68,9 +68,9 @@ def run results = super logins = results.flat_map { |_k, v| v[:successful_logins] } sessions = results.flat_map { |_k, v| v[:successful_sessions] } - print_status("Bruteforce completed, #{logins.size} credentials were successful.") + print_status("Bruteforce completed, #{logins.size} #{logins.size == 1 ? 'credential was' : 'credentials were'} successful.") if datastore['CreateSession'] - print_status("#{sessions.size} Postgres sessions were opened successfully.") + print_status("#{sessions.size} Postgres #{sessions.size == 1 ? 'session was' : 'sessions were'} opened successfully.") else print_status('You can open a Postgres session with these credentials and %grnCreateSession%clr set to true') end diff --git a/modules/auxiliary/scanner/smb/smb_login.rb b/modules/auxiliary/scanner/smb/smb_login.rb index 98e2296dfa99..effac65894df 100644 --- a/modules/auxiliary/scanner/smb/smb_login.rb +++ b/modules/auxiliary/scanner/smb/smb_login.rb @@ -92,9 +92,9 @@ def run results = super logins = results.flat_map { |_k, v| v[:successful_logins] } sessions = results.flat_map { |_k, v| v[:successful_sessions] } - print_status("Bruteforce completed, #{logins.size} credentials were successful.") + print_status("Bruteforce completed, #{logins.size} #{logins.size == 1 ? 'credential was' : 'credentials were'} successful.") if datastore['CreateSession'] - print_status("#{sessions.size} SMB sessions were opened successfully.") + print_status("#{sessions.size} SMB #{sessions.size == 1 ? 'session was' : 'sessions were'} opened successfully.") else print_status('You can open an SMB session with these credentials and %grnCreateSession%clr set to true') end