Class: RubySMB::SMB1::Packet::EmptyPacket

Inherits:
GenericPacket
  • Object
show all
Defined in:
lib/ruby_smb/smb1/packet/empty_packet.rb

Overview

This packet represent an SMB1 Error Response Packet when the parameter and data blocks will be empty.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from GenericPacket

describe, #display, fields_hashed, format_field, #initialize_instance, #packet_smb_version, read, #status_code, walk_fields

Instance Attribute Details

#original_commandObject

Returns the value of attribute original_command.



7
8
9
# File 'lib/ruby_smb/smb1/packet/empty_packet.rb', line 7

def original_command
  @original_command
end

Instance Method Details

#valid?Boolean

Returns:

  • (Boolean)


13
14
15
16
17
18
# File 'lib/ruby_smb/smb1/packet/empty_packet.rb', line 13

def valid?
  return smb_header.protocol == RubySMB::SMB1::SMB_PROTOCOL_ID &&
         smb_header.command == @original_command &&
         parameter_block.word_count == 0 &&
         data_block.byte_count == 0
end