Class: PacketGen::Plugin::SMB::Negotiate::Response

Inherits:
Blocks
  • Object
show all
Defined in:
lib/packetgen/plugin/smb/negotiate/response.rb

Overview

SMB Negotiation Response header.

See also Blocks, as Response is a specialization of Blocks#words and Blocks#bytes.

Author:

  • Sylvain Daubert

Instance Attribute Summary

Attributes inherited from Blocks

#byte_count, #bytes, #word_count, #words

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Blocks

#protocol_name

Class Method Details

.protocol_nameObject



23
24
25
# File 'lib/packetgen/plugin/smb/negotiate/response.rb', line 23

def self.protocol_name
  'SMB::Negotiate::Response'
end

Instance Method Details

#dialect_indexInteger

Get index of the dialect selected by the server from the list presented in the request.

Returns:

  • (Integer)


19
20
21
# File 'lib/packetgen/plugin/smb/negotiate/response.rb', line 19

def dialect_index
  words.first.to_i
end