File tree Expand file tree Collapse file tree 3 files changed +16
-5
lines changed
ui/console/command_dispatcher Expand file tree Collapse file tree 3 files changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,10 @@ def fullname
24
24
type + '/' + refname
25
25
end
26
26
27
+ def promptname
28
+ refname
29
+ end
30
+
27
31
def shortname
28
32
refname . split ( '/' ) . last
29
33
end
@@ -55,9 +59,16 @@ def refname
55
59
end
56
60
57
61
#
58
- # Returns the module's framework short name. This is a
59
- # possibly conflicting name used for things like console
60
- # prompts.
62
+ # Returns the module's framework prompt-friendly name.
63
+ #
64
+ # reverse_tcp
65
+ #
66
+ def promptname
67
+ self . class . promptname
68
+ end
69
+
70
+ #
71
+ # Returns the module's framework short name.
61
72
#
62
73
# reverse_tcp
63
74
#
Original file line number Diff line number Diff line change @@ -1107,7 +1107,7 @@ def cmd_spool(*args)
1107
1107
if active_module
1108
1108
# intentionally += and not << because we don't want to modify
1109
1109
# datastore or the constant DefaultPrompt
1110
- prompt += " #{ active_module . type } (%bld%red#{ active_module . shortname } %clr)"
1110
+ prompt += " #{ active_module . type } (%bld%red#{ active_module . promptname } %clr)"
1111
1111
end
1112
1112
prompt_char = framework . datastore [ 'PromptChar' ] || Msf ::Ui ::Console ::Driver ::DefaultPromptChar
1113
1113
driver . update_prompt ( "#{ prompt } " , prompt_char , true )
Original file line number Diff line number Diff line change @@ -661,7 +661,7 @@ def cmd_use(*args)
661
661
# Update the command prompt
662
662
prompt = framework . datastore [ 'Prompt' ] || Msf ::Ui ::Console ::Driver ::DefaultPrompt
663
663
prompt_char = framework . datastore [ 'PromptChar' ] || Msf ::Ui ::Console ::Driver ::DefaultPromptChar
664
- driver . update_prompt ( "#{ prompt } #{ mod . type } (%bld%red#{ mod . shortname } %clr) " , prompt_char , true )
664
+ driver . update_prompt ( "#{ prompt } #{ mod . type } (%bld%red#{ mod . promptname } %clr) " , prompt_char , true )
665
665
end
666
666
667
667
#
You can’t perform that action at this time.
0 commit comments