diff --git a/lib/msf/ui/console/command_dispatcher/core.rb b/lib/msf/ui/console/command_dispatcher/core.rb index 363a3eb2f7..7661b45448 100644 --- a/lib/msf/ui/console/command_dispatcher/core.rb +++ b/lib/msf/ui/console/command_dispatcher/core.rb @@ -224,7 +224,9 @@ class Core driver.destack_dispatcher # Restore the prompt - driver.update_prompt('') + prompt = framework.datastore['Prompt'] + prompt_char = framework.datastore['PromptChar'] + driver.update_prompt("#{prompt}", prompt_char, true) end end @@ -1966,7 +1968,9 @@ class Core mod.init_ui(driver.input, driver.output) # Update the command prompt - driver.update_prompt("#{mod.type}(%bld%red#{mod.shortname}%clr) ") + prompt = framework.datastore['Prompt'] + prompt_char = framework.datastore['PromptChar'] + driver.update_prompt("#{prompt} #{mod.type}(%bld%red#{mod.shortname}%clr) ", prompt_char, true) end # diff --git a/lib/rex/ui/text/shell.rb b/lib/rex/ui/text/shell.rb index d9a5d66bb4..9d38da143f 100644 --- a/lib/rex/ui/text/shell.rb +++ b/lib/rex/ui/text/shell.rb @@ -244,7 +244,7 @@ module Shell if mode new_prompt = prompt + (new_prompt_char || prompt_char) + ' ' - end + end # Save the prompt before any substitutions self.prompt = new_prompt