fixed prompt issue, still need to restore context

see line 2519 area.
msf  exploit(psexec) > grep -i -A 2 encoding show
<snip>
msf>
unstable
kernelsmith 2013-01-15 17:57:28 -06:00
parent 4d33742482
commit ad8516eacf
1 changed files with 7 additions and 4 deletions

View File

@ -315,8 +315,8 @@ class Core
driver.destack_dispatcher
# Restore the prompt
prompt = framework.datastore['Prompt'] || "%undmsf%clr "
prompt_char = framework.datastore['PromptChar'] || ">"
prompt = framework.datastore['Prompt'] || Msf::Ui::Console::Driver::DefaultPrompt
prompt_char = framework.datastore['PromptChar'] || Msf::Ui::Console::Driver::DefaultPromptChar
driver.update_prompt("#{prompt}", prompt_char, true)
end
end
@ -2512,8 +2512,11 @@ class Core
orig_driver.run_single(cmd)
# restore original output
orig_driver.init_ui(orig_driver_input,orig_driver_output)
# @todo fix the prompt so we don't get "msf > >". I've tried everything to fix this... nada
# orig_driver.update_prompt(orig_prompt,orig_prompt_char,true) # <-- dependent on other code I added & removed
# restore the prompt so we don't get "msf > >".
prompt = framework.datastore['Prompt'] || Msf::Ui::Console::Driver::DefaultPrompt
prompt_char = framework.datastore['PromptChar'] || Msf::Ui::Console::Driver::DefaultPromptChar
driver.update_prompt("#{prompt}", prompt_char, true)
#@todo restore the prompt context
# dump the command's output so we can grep it
cmd_output = temp_output.dump_buffer
# put lines into an array so we can access them more easily and split('\n') doesn't work on the output obj.