Fix tests

This commit is contained in:
dwelch-r7 2021-01-05 16:20:42 +00:00
parent ad9763763d
commit c0912b358c
7 changed files with 30 additions and 23 deletions

View File

@ -759,25 +759,5 @@ protected
end
end
class CommandShellWindows < CommandShell
def initialize(*args)
self.platform = "windows"
super
end
def shell_command_token(cmd,timeout = 10)
shell_command_token_win32(cmd,timeout)
end
end
class CommandShellUnix < CommandShell
def initialize(*args)
self.platform = "unix"
super
end
def shell_command_token(cmd,timeout = 10)
shell_command_token_unix(cmd,timeout)
end
end
end
end

View File

@ -0,0 +1,13 @@
module Msf::Sessions
class CommandShellUnix < CommandShell
def initialize(*args)
self.platform = "unix"
super
end
def shell_command_token(cmd,timeout = 10)
shell_command_token_unix(cmd,timeout)
end
end
end

View File

@ -0,0 +1,14 @@
module Msf::Sessions
class CommandShellWindows < CommandShell
def initialize(*args)
self.platform = "windows"
super
end
def shell_command_token(cmd,timeout = 10)
shell_command_token_win32(cmd,timeout)
end
end
end

View File

@ -1,6 +1,7 @@
# -*- coding: binary -*-
require 'rex/parser/arguments'
require 'msf/util/exe'
module Msf
module Ui

View File

@ -1,5 +1,6 @@
# -*- coding: binary -*-
require 'msf/ui/console/command_dispatcher'
require 'rex/parser/arguments'
module Msf
module Ui

View File

@ -3,7 +3,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
module MetasploitModule
include Msf::Payload::Linux
include Msf::Sessions::CommandShellOptions

View File

@ -13,7 +13,6 @@ $:.unshift(File.expand_path(File.join(File.dirname(msfbase), '..', '..', 'lib'))
require 'msfenv'
require 'rex'
require 'optparse'
require 'rex/exploitation/egghunter'
module Egghunter
class OptsConsole
@ -128,7 +127,7 @@ module Egghunter
list_formats
return
end
require 'rex/exploitation/egghunter'
egghunter = Rex::Exploitation::Egghunter.new(@opts[:platform], @opts[:arch])
raw_code = egghunter.hunter_stub('', @opts[:badchars], @opts)
output_stream = $stdout