Class: PacketGen::Plugin::SMB::Negotiate::Dialect

Inherits:
Types::Fields
  • Object
show all
Defined in:
lib/packetgen/plugin/smb/negotiate/dialect.rb

Overview

A SMB_Dialect struct containing:

  • a 8-bit #format field, which should be set to 0x02,

  • a null-terminated string identifying a SMB dialect.

Author:

  • Sylvain Daubert

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#dialectString

Null-terminated string identifying a SMB dialect.

Returns:



24
# File 'lib/packetgen/plugin/smb/negotiate/dialect.rb', line 24

define_field :dialect,PacketGen::Types::CString

#formatInteger

8-bit format. Should be 2 to indicate a null-terminated string for #dialect field.

Returns:

  • (Integer)


20
# File 'lib/packetgen/plugin/smb/negotiate/dialect.rb', line 20

define_field :format, PacketGen::Types::Int8, default: 2

Instance Method Details

#to_humanString

Returns:



27
28
29
# File 'lib/packetgen/plugin/smb/negotiate/dialect.rb', line 27

def to_human
  self[:dialect].to_human
end