move wait_status to a mixin

bug/bundler_fix
Brent Cook 2017-05-08 12:23:27 -05:00
parent f213482659
commit a2ce3743a2
2 changed files with 25 additions and 22 deletions

View File

@ -0,0 +1,23 @@
module Msf::Module::External
def wait_status(mod)
while mod.running
m = mod.get_status
if m
case m['level']
when 'error'
print_error m['message']
when 'warning'
print_warning m['message']
when 'good'
print_good m['message']
when 'info'
print_status m['message']
when 'debug'
vprint_status m['message']
else
print_status m['message']
end
end
end
end
end

View File

@ -1,8 +1,10 @@
require 'msf/core/modules/external/bridge' require 'msf/core/modules/external/bridge'
require 'msf/core/module/external'
class MetasploitModule < Msf::Exploit::Remote class MetasploitModule < Msf::Exploit::Remote
Rank = ExcellentRanking Rank = ExcellentRanking
include Msf::Module::External
include Msf::Exploit::CmdStager include Msf::Exploit::CmdStager
def initialize(info = {}) def initialize(info = {})
@ -49,26 +51,4 @@ class MetasploitModule < Msf::Exploit::Remote
print_status("Exploiting...") print_status("Exploiting...")
execute_cmdstager({:flavor => :wget}) execute_cmdstager({:flavor => :wget})
end end
def wait_status(mod)
while mod.running
m = mod.get_status
if m
case m['level']
when 'error'
print_error m['message']
when 'warning'
print_warning m['message']
when 'good'
print_good m['message']
when 'info'
print_status m['message']
when 'debug'
vprint_status m['message']
else
print_status m['message']
end
end
end
end
end end