Enable running scripts independent of console state. Fixes issue with running scripts from GUI while shell/channel is active.
git-svn-id: file:///home/svn/framework3/trunk@10872 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
8e44f66d31
commit
90500eebd1
|
@ -145,7 +145,14 @@ class Session < Base
|
||||||
end
|
end
|
||||||
|
|
||||||
def meterpreter_script(token, sid, data)
|
def meterpreter_script(token, sid, data)
|
||||||
meterpreter_write(token, sid, ["run #{data}"].pack("m*"))
|
s = _valid_session(token,sid,"meterpreter")
|
||||||
|
|
||||||
|
if not s.user_output.respond_to? :dump_buffer
|
||||||
|
s.init_ui(Rex::Ui::Text::Input::Buffer.new, Rex::Ui::Text::Output::Buffer.new)
|
||||||
|
end
|
||||||
|
|
||||||
|
Thread.new(s) { |sess| sess.console.run_single("run #{data}") }
|
||||||
|
{}
|
||||||
end
|
end
|
||||||
|
|
||||||
protected
|
protected
|
||||||
|
|
Loading…
Reference in New Issue