Move SMB mixins into their own directory

bug/bundler_fix
James Lee 2013-02-19 12:55:06 -06:00
parent ede804e6af
commit 4703278183
5 changed files with 29 additions and 22 deletions

View File

@ -21,7 +21,7 @@ module Exploit::Remote::DCERPC
DCERPCPacket = Rex::Proto::DCERPC::Packet DCERPCPacket = Rex::Proto::DCERPC::Packet
DCERPCClient = Rex::Proto::DCERPC::Client DCERPCClient = Rex::Proto::DCERPC::Client
DCERPCResponse = Rex::Proto::DCERPC::Response DCERPCResponse = Rex::Proto::DCERPC::Response
DCERPCUUID = Rex::Proto::DCERPC::UUID DCERPCUUID = Rex::Proto::DCERPC::UUID
NDR = Rex::Encoder::NDR NDR = Rex::Encoder::NDR

View File

@ -4,7 +4,6 @@ require 'rex/proto/ntlm'
require 'rex/proto/dcerpc' require 'rex/proto/dcerpc'
require 'rex/encoder/ndr' require 'rex/encoder/ndr'
module Msf module Msf
### ###
@ -18,7 +17,8 @@ module Msf
module Exploit::Remote::SMB module Exploit::Remote::SMB
require 'msf/core/exploit/psexec' require 'msf/core/exploit/smb/authenticated'
require 'msf/core/exploit/smb/psexec'
include Exploit::Remote::Tcp include Exploit::Remote::Tcp
include Exploit::Remote::NTLM::Client include Exploit::Remote::NTLM::Client
@ -35,20 +35,6 @@ module Exploit::Remote::SMB
DCERPCUUID = Rex::Proto::DCERPC::UUID DCERPCUUID = Rex::Proto::DCERPC::UUID
NDR = Rex::Encoder::NDR NDR = Rex::Encoder::NDR
# Mini-mixin for making SMBUser/SMBPass/SMBDomain regular options vs advanced
# Included when the module needs credentials to function
module Authenticated
def initialize(info = {})
super
register_options(
[
OptString.new('SMBUser', [ false, 'The username to authenticate as', '']),
OptString.new('SMBPass', [ false, 'The password for the specified username', '']),
OptString.new('SMBDomain', [ false, 'The Windows domain to use for authentication', 'WORKGROUP']),
], Msf::Exploit::Remote::SMB::Authenticated)
end
end
def initialize(info = {}) def initialize(info = {})
super super

View File

@ -0,0 +1,22 @@
# -*- coding: binary -*-
module Msf
# Mini-mixin for making SMBUser/SMBPass/SMBDomain regular options vs advanced
# Included when the module needs credentials to function
module Exploit::Remote::SMB::Authenticated
include Msf::Exploit::Remote::SMB
def initialize(info = {})
super
register_options(
[
OptString.new('SMBUser', [ false, 'The username to authenticate as', '']),
OptString.new('SMBPass', [ false, 'The password for the specified username', '']),
OptString.new('SMBDomain', [ false, 'The Windows domain to use for authentication', 'WORKGROUP']),
], Msf::Exploit::Remote::SMB::Authenticated)
end
end
end

View File

@ -1,3 +1,4 @@
# -*- coding: binary -*-
require 'msf/core' require 'msf/core'
require 'msf/core/exploit/dcerpc' require 'msf/core/exploit/dcerpc'
@ -11,10 +12,10 @@ module Msf
# and runing a binary. # and runing a binary.
#### ####
module Exploit::Remote::Psexec module Exploit::Remote::SMB::Psexec
include Msf::Exploit::Remote::DCERPC include Msf::Exploit::Remote::DCERPC
include Msf::Exploit::Remote::SMB include Msf::Exploit::Remote::SMB::Authenticated
# Retrives output from the executed command # Retrives output from the executed command
# #

View File

@ -5,9 +5,7 @@ require 'msf/core'
class Metasploit3 < Msf::Auxiliary class Metasploit3 < Msf::Auxiliary
include Msf::Exploit::Remote::DCERPC include Msf::Exploit::Remote::DCERPC
include Msf::Exploit::Remote::SMB include Msf::Exploit::Remote::SMB::Psexec
include Msf::Exploit::Remote::SMB::Authenticated
include Msf::Exploit::Remote::Psexec
include Msf::Auxiliary::Report include Msf::Auxiliary::Report
include Msf::Auxiliary::Scanner include Msf::Auxiliary::Scanner