File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
lib/msf/ui/console/command_dispatcher Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -68,6 +68,10 @@ def deprecated_commands
68
68
]
69
69
end
70
70
71
+ def allowed_cred_types
72
+ %w( password ntlm hash )
73
+ end
74
+
71
75
#
72
76
# Returns true if the db is connected, prints an error and returns
73
77
# false if not.
@@ -676,7 +680,7 @@ def cmd_creds_help
676
680
print_line " -p,--port <portspec> List creds with logins on services matching this port spec"
677
681
print_line " -s <svc names> List creds matching comma-separated service names"
678
682
print_line " -u,--user <regex> List users that match this regex"
679
- print_line " -t,--type <type> List creds that match the following types: (password,ntlm,hash) "
683
+ print_line " -t,--type <type> List creds that match the following types: #{ allowed_cred_types . join ( ',' ) } "
680
684
print_line " -R,--rhosts Set RHOSTS from the results of the search"
681
685
682
686
print_line
@@ -838,6 +842,9 @@ def creds_search(*args)
838
842
Metasploit ::Credential ::PasswordHash
839
843
when 'ntlm'
840
844
Metasploit ::Credential ::NTLMHash
845
+ else
846
+ print_error ( "Unrecognized credential type #{ ptype } -- must be one of #{ allowed_cred_types . join ( ',' ) } " )
847
+ return
841
848
end
842
849
end
843
850
You can’t perform that action at this time.
0 commit comments