Class: RubySMB::SMB1::Packet::NegotiateRequest
- Inherits:
-
GenericPacket
- Object
- BinData::Record
- GenericPacket
- RubySMB::SMB1::Packet::NegotiateRequest
- Defined in:
- lib/ruby_smb/smb1/packet/negotiate_request.rb
Overview
A SMB1 SMB_COM_NEGOTIATE Request Packet as defined in 2.2.4.52.1
Defined Under Namespace
Classes: DataBlock
Instance Method Summary collapse
-
#add_dialect(dialect_string) ⇒ BinData::Array
Add an individual Dialect string to the list of Dialects in the packet.
-
#dialects ⇒ Array<Hash>
Returns the Dialects array as a normal Ruby Array.
- #initialize_instance ⇒ Object
-
#set_dialects(dialect_array) ⇒ BinData::Array
Sets the entire list of dialects for the Negotiate Request.
Methods inherited from GenericPacket
describe, #display, #packet_smb_version, #status_code
Instance Method Details
#add_dialect(dialect_string) ⇒ BinData::Array
Add an individual Dialect string to the list of Dialects in the packet.
26 27 28 29 |
# File 'lib/ruby_smb/smb1/packet/negotiate_request.rb', line 26 def add_dialect(dialect_string) new_dialect = Dialect.new(dialect_string: dialect_string) data_block.dialects << new_dialect end |
#dialects ⇒ Array<Hash>
Returns the Dialects array as a normal Ruby Array.
34 35 36 |
# File 'lib/ruby_smb/smb1/packet/negotiate_request.rb', line 34 def dialects data_block.dialects.to_a end |
#initialize_instance ⇒ Object
16 17 18 19 |
# File 'lib/ruby_smb/smb1/packet/negotiate_request.rb', line 16 def initialize_instance super smb_header.command = RubySMB::SMB1::Commands::SMB_COM_NEGOTIATE end |
#set_dialects(dialect_array) ⇒ BinData::Array
Sets the entire list of dialects for the Negotiate Request.
42 43 44 45 46 47 48 |
# File 'lib/ruby_smb/smb1/packet/negotiate_request.rb', line 42 def set_dialects(dialect_array) data_block.dialects.clear dialect_array.each do |dialect_string| add_dialect(dialect_string) end data_block.dialects end |