Fix tests
This commit is contained in:
parent
ad9763763d
commit
c0912b358c
|
@ -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
|
||||
|
|
|
@ -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
|
|
@ -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
|
|
@ -1,6 +1,7 @@
|
|||
# -*- coding: binary -*-
|
||||
|
||||
require 'rex/parser/arguments'
|
||||
require 'msf/util/exe'
|
||||
|
||||
module Msf
|
||||
module Ui
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
# -*- coding: binary -*-
|
||||
require 'msf/ui/console/command_dispatcher'
|
||||
require 'rex/parser/arguments'
|
||||
|
||||
module Msf
|
||||
module Ui
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
# Current source: https://github.com/rapid7/metasploit-framework
|
||||
##
|
||||
|
||||
|
||||
module MetasploitModule
|
||||
include Msf::Payload::Linux
|
||||
include Msf::Sessions::CommandShellOptions
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue