From fe03497d57e65a7131946252f88dfb87d504f6bf Mon Sep 17 00:00:00 2001 From: Matt Weeks Date: Thu, 4 Nov 2010 23:01:03 +0000 Subject: [PATCH] Make tab completion work for meterpreter sessions over rpc. git-svn-id: file:///home/svn/framework3/trunk@10905 4d416f70-5f16-0410-b530-b9f4589650da --- lib/msf/core/rpc/session.rb | 5 +++++ lib/msf/ui/web/console.rb | 3 +++ 2 files changed, 8 insertions(+) diff --git a/lib/msf/core/rpc/session.rb b/lib/msf/core/rpc/session.rb index 515c4c1b71..de693ce1fc 100644 --- a/lib/msf/core/rpc/session.rb +++ b/lib/msf/core/rpc/session.rb @@ -144,6 +144,11 @@ class Session < Base { "result" => "failure" } end + def meterpreter_tabs(token,sid, line) + s = _valid_session(token,sid,"meterpreter") + { "tabs" => s.tab_complete(line) } + end + def meterpreter_script(token, sid, data) s = _valid_session(token,sid,"meterpreter") diff --git a/lib/msf/ui/web/console.rb b/lib/msf/ui/web/console.rb index 050a12fe73..192aa8fdba 100644 --- a/lib/msf/ui/web/console.rb +++ b/lib/msf/ui/web/console.rb @@ -90,6 +90,9 @@ class WebConsole end def tab_complete(cmd) + if(self.console.active_session) + return self.console.active_session.console.tab_complete(cmd) + end self.console.tab_complete(cmd) end