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.



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

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



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

def codepoint
  @codepoint
end

#lengthObject

Returns the value of attribute length

Returns:

  • (Object)

    the current value of length



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

def length
  @length
end

#payloadObject

Returns the value of attribute payload

Returns:

  • (Object)

    the current value of payload



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

def payload
  @payload
end

Instance Method Details

#to_sObject



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

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