@@ -315,8 +315,8 @@ def cmd_back(*args)
315
315
driver . destack_dispatcher
316
316
317
317
# Restore the prompt
318
- prompt = framework . datastore [ 'Prompt' ] || "%undmsf%clr "
319
- prompt_char = framework . datastore [ 'PromptChar' ] || ">"
318
+ prompt = framework . datastore [ 'Prompt' ] || Msf :: Ui :: Console :: Driver :: DefaultPrompt
319
+ prompt_char = framework . datastore [ 'PromptChar' ] || Msf :: Ui :: Console :: Driver :: DefaultPromptChar
320
320
driver . update_prompt ( "#{ prompt } " , prompt_char , true )
321
321
end
322
322
end
@@ -2512,8 +2512,11 @@ def temp_output.write(msg = '')
2512
2512
orig_driver . run_single ( cmd )
2513
2513
# restore original output
2514
2514
orig_driver . init_ui ( orig_driver_input , orig_driver_output )
2515
- # @todo fix the prompt so we don't get "msf > >". I've tried everything to fix this... nada
2516
- # orig_driver.update_prompt(orig_prompt,orig_prompt_char,true) # <-- dependent on other code I added & removed
2515
+ # restore the prompt so we don't get "msf > >".
2516
+ prompt = framework . datastore [ 'Prompt' ] || Msf ::Ui ::Console ::Driver ::DefaultPrompt
2517
+ prompt_char = framework . datastore [ 'PromptChar' ] || Msf ::Ui ::Console ::Driver ::DefaultPromptChar
2518
+ driver . update_prompt ( "#{ prompt } " , prompt_char , true )
2519
+ #@todo restore the prompt context
2517
2520
# dump the command's output so we can grep it
2518
2521
cmd_output = temp_output . dump_buffer
2519
2522
# put lines into an array so we can access them more easily and split('\n') doesn't work on the output obj.
0 commit comments