diff --git a/lib/msf/core/db_manager/cred.rb b/lib/msf/core/db_manager/cred.rb index ad23f14a14..efffd84622 100644 --- a/lib/msf/core/db_manager/cred.rb +++ b/lib/msf/core/db_manager/cred.rb @@ -29,12 +29,12 @@ module Msf::DBManager::Cred if opts[:user].present? # If we have a user regex, only include those that match - query = query.where('"metasploit_credential_publics"."username" ~* ?', opts[:user]) + query = query.where('"metasploit_credential_publics"."username" = ?', opts[:user]) end if opts[:pass].present? # If we have a password regex, only include those that match - query = query.where('"metasploit_credential_privates"."data" ~* ?', opts[:pass]) + query = query.where('"metasploit_credential_privates"."data" = ?', opts[:pass]) end if opts[:host_ranges] || opts[:ports] || opts[:svcs] diff --git a/lib/msf/ui/console/command_dispatcher/creds.rb b/lib/msf/ui/console/command_dispatcher/creds.rb index 49937e33f4..3901fc44c0 100644 --- a/lib/msf/ui/console/command_dispatcher/creds.rb +++ b/lib/msf/ui/console/command_dispatcher/creds.rb @@ -172,10 +172,10 @@ class Creds print_line " -d,--delete Delete one or more credentials" print_line print_line "Filter options for listing" - print_line " -P,--password List passwords that match this regex" + print_line " -P,--password List passwords that match this text" print_line " -p,--port List creds with logins on services matching this port spec" print_line " -s List creds matching comma-separated service names" - print_line " -u,--user List users that match this regex" + print_line " -u,--user List users that match this text" print_line " -t,--type List creds that match the following types: #{allowed_cred_types.join(',')}" print_line " -O,--origins List creds that match these origins" print_line " -R,--rhosts Set RHOSTS from the results of the search"