Land #9308, Ensure tab completion in HWBridge sessions works
commit
32c486023c
|
@ -1,7 +1,7 @@
|
||||||
# -*- coding: binary -*-
|
# -*- coding: binary -*-
|
||||||
|
|
||||||
require 'msf/base'
|
require 'msf/base'
|
||||||
|
require 'msf/base/sessions/scriptable'
|
||||||
require 'rex/post/hwbridge'
|
require 'rex/post/hwbridge'
|
||||||
|
|
||||||
module Msf
|
module Msf
|
||||||
|
@ -24,6 +24,7 @@ class HWBridge < Rex::Post::HWBridge::Client
|
||||||
# This interface supports interactive commands.
|
# This interface supports interactive commands.
|
||||||
#
|
#
|
||||||
include Msf::Session::Interactive
|
include Msf::Session::Interactive
|
||||||
|
include Msf::Session::Scriptable
|
||||||
|
|
||||||
#
|
#
|
||||||
# Initialize the HWBridge console
|
# Initialize the HWBridge console
|
||||||
|
|
|
@ -414,11 +414,11 @@ class Console::CommandDispatcher::Core
|
||||||
if !words[1] || !words[1].match(/^\//)
|
if !words[1] || !words[1].match(/^\//)
|
||||||
begin
|
begin
|
||||||
if msf_loaded?
|
if msf_loaded?
|
||||||
tabs << tab_complete_postmods
|
tabs = tab_complete_postmods
|
||||||
end
|
end
|
||||||
[ # We can just use Meterpreters script path
|
[ # We can just use Meterpreters script path
|
||||||
::Msf::Sessions::Meterpreter.script_base,
|
::Msf::Sessions::HWBridge.script_base,
|
||||||
::Msf::Sessions::Meterpreter.user_script_base
|
::Msf::Sessions::HWBridge.user_script_base
|
||||||
].each do |dir|
|
].each do |dir|
|
||||||
next unless ::File.exist? dir
|
next unless ::File.exist? dir
|
||||||
tabs += ::Dir.new(dir).find_all { |e|
|
tabs += ::Dir.new(dir).find_all { |e|
|
||||||
|
|
Loading…
Reference in New Issue