Sha256: 4829d575d438660d9eef44f0534bc17d0255d4ef5c04029768fbc8a8f22ff1c3

Contents?: true

Size: 1.2 KB

Versions: 10

Compression:

Stored size: 1.2 KB

Contents

module RubySMB
  module SMB1
    module Packet

      # This class represents an SMB1 TreeConnect Request Packet as defined in
      # [2.2.4.7.1 Client Request Extensions](https://msdn.microsoft.com/en-us/library/cc246330.aspx)
      class TreeConnectRequest < RubySMB::GenericPacket

        # A SMB1 Parameter Block as defined by the {TreeConnectRequest}
        class ParameterBlock < RubySMB::SMB1::ParameterBlock
          and_x_block          :andx_block
          tree_connect_flags   :flags
          uint16               :password_length, label: 'Password Length', initial_value: 0x01
        end

        class DataBlock < RubySMB::SMB1::DataBlock
          stringz  :password, label: 'Password Field', initial_value: '',    length: lambda { self.parent.parameter_block.password_length }
          stringz  :path,     label: 'Resource Path'
          stringz  :service,  label: 'Resource Type',  initial_value: '?????'
        end

        smb_header        :smb_header
        parameter_block   :parameter_block
        data_block        :data_block

        def initialize_instance
          super
          smb_header.command = RubySMB::SMB1::Commands::SMB_COM_TREE_CONNECT
        end

      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
ruby_smb-0.0.18 lib/ruby_smb/smb1/packet/tree_connect_request.rb
ruby_smb-0.0.17 lib/ruby_smb/smb1/packet/tree_connect_request.rb
ruby_smb-0.0.16 lib/ruby_smb/smb1/packet/tree_connect_request.rb
ruby_smb-0.0.15 lib/ruby_smb/smb1/packet/tree_connect_request.rb
ruby_smb-0.0.14 lib/ruby_smb/smb1/packet/tree_connect_request.rb
ruby_smb-0.0.13 lib/ruby_smb/smb1/packet/tree_connect_request.rb
ruby_smb-0.0.12 lib/ruby_smb/smb1/packet/tree_connect_request.rb
ruby_smb-0.0.11 lib/ruby_smb/smb1/packet/tree_connect_request.rb
ruby_smb-0.0.10 lib/ruby_smb/smb1/packet/tree_connect_request.rb
ruby_smb-0.0.9 lib/ruby_smb/smb1/packet/tree_connect_request.rb