Class: Rex::Proto::DRDA::SECMEC_PARAM

Inherits:
Struct
  • Object
show all
Defined in:
lib/rex/proto/drda/packet.rb

Overview

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args = {}) ⇒ SECMEC_PARAM

Returns a new instance of SECMEC_PARAM.



51
52
53
54
55
# File 'lib/rex/proto/drda/packet.rb', line 51

def initialize(args={})
  self[:length] = 6
  self[:codepoint] = Constants::SECMEC
  self[:payload] = 3 # Plaintext username and password.
end

Instance Attribute Details

#codepointObject

Returns the value of attribute codepoint

Returns:

  • (Object)

    the current value of codepoint



50
51
52
# File 'lib/rex/proto/drda/packet.rb', line 50

def codepoint
  @codepoint
end

#lengthObject

Returns the value of attribute length

Returns:

  • (Object)

    the current value of length



50
51
52
# File 'lib/rex/proto/drda/packet.rb', line 50

def length
  @length
end

#payloadObject

Returns the value of attribute payload

Returns:

  • (Object)

    the current value of payload



50
51
52
# File 'lib/rex/proto/drda/packet.rb', line 50

def payload
  @payload
end

Instance Method Details

#to_sObject



56
57
58
# File 'lib/rex/proto/drda/packet.rb', line 56

def to_s
  self.to_a.pack("nnn")
end