Class: Rex::Proto::DRDA::EXCSAT_DDM
- Inherits:
-
Struct
- Object
- Struct
- Rex::Proto::DRDA::EXCSAT_DDM
- Defined in:
- lib/rex/proto/drda/packet.rb
Overview
Currently, only takes a MGRLVLLS param. Extend the struct when more parameters are defined.
Instance Attribute Summary collapse
-
#codepoint ⇒ Object
Returns the value of attribute codepoint.
-
#correlid ⇒ Object
Returns the value of attribute correlid.
-
#format ⇒ Object
Returns the value of attribute format.
-
#length ⇒ Object
Returns the value of attribute length.
-
#length2 ⇒ Object
Returns the value of attribute length2.
-
#magic ⇒ Object
Returns the value of attribute magic.
-
#mgrlvlls ⇒ Object
Returns the value of attribute mgrlvlls.
Instance Method Summary collapse
-
#initialize(args = {}) ⇒ EXCSAT_DDM
constructor
A new instance of EXCSAT_DDM.
- #to_s ⇒ Object
Constructor Details
#initialize(args = {}) ⇒ EXCSAT_DDM
Returns a new instance of EXCSAT_DDM.
31 32 33 34 35 36 37 38 39 |
# File 'lib/rex/proto/drda/packet.rb', line 31 def initialize(args={}) self[:magic] = 0xd0 self[:format] = 0x41 self[:correlid] = 1 self[:codepoint] = Constants::EXCSAT self[:mgrlvlls] = args[:mgrlvlls] || MGRLVLLS_PARAM.new.to_s self[:length] = (10 + self[:mgrlvlls].to_s.size) self[:length2] = self[:length]-6 end |
Instance Attribute Details
#codepoint ⇒ Object
Returns the value of attribute codepoint
28 29 30 |
# File 'lib/rex/proto/drda/packet.rb', line 28 def codepoint @codepoint end |
#correlid ⇒ Object
Returns the value of attribute correlid
28 29 30 |
# File 'lib/rex/proto/drda/packet.rb', line 28 def correlid @correlid end |
#format ⇒ Object
Returns the value of attribute format
28 29 30 |
# File 'lib/rex/proto/drda/packet.rb', line 28 def format @format end |
#length ⇒ Object
Returns the value of attribute length
28 29 30 |
# File 'lib/rex/proto/drda/packet.rb', line 28 def length @length end |
#length2 ⇒ Object
Returns the value of attribute length2
28 29 30 |
# File 'lib/rex/proto/drda/packet.rb', line 28 def length2 @length2 end |
#magic ⇒ Object
Returns the value of attribute magic
28 29 30 |
# File 'lib/rex/proto/drda/packet.rb', line 28 def magic @magic end |
#mgrlvlls ⇒ Object
Returns the value of attribute mgrlvlls
28 29 30 |
# File 'lib/rex/proto/drda/packet.rb', line 28 def mgrlvlls @mgrlvlls end |
Instance Method Details
#to_s ⇒ Object
41 42 43 44 45 |
# File 'lib/rex/proto/drda/packet.rb', line 41 def to_s packstr = "nCCnnn" packstr += "a*" # Pack smarter as more params are added. self.to_a.pack(packstr) end |