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.
30 31 32 33 34 35 36 37 38 |
# File 'lib/rex/proto/drda/packet.rb', line 30 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
27 28 29 |
# File 'lib/rex/proto/drda/packet.rb', line 27 def codepoint @codepoint end |
#correlid ⇒ Object
Returns the value of attribute correlid
27 28 29 |
# File 'lib/rex/proto/drda/packet.rb', line 27 def correlid @correlid end |
#format ⇒ Object
Returns the value of attribute format
27 28 29 |
# File 'lib/rex/proto/drda/packet.rb', line 27 def format @format end |
#length ⇒ Object
Returns the value of attribute length
27 28 29 |
# File 'lib/rex/proto/drda/packet.rb', line 27 def length @length end |
#length2 ⇒ Object
Returns the value of attribute length2
27 28 29 |
# File 'lib/rex/proto/drda/packet.rb', line 27 def length2 @length2 end |
#magic ⇒ Object
Returns the value of attribute magic
27 28 29 |
# File 'lib/rex/proto/drda/packet.rb', line 27 def magic @magic end |
#mgrlvlls ⇒ Object
Returns the value of attribute mgrlvlls
27 28 29 |
# File 'lib/rex/proto/drda/packet.rb', line 27 def mgrlvlls @mgrlvlls end |
Instance Method Details
#to_s ⇒ Object
40 41 42 43 44 |
# File 'lib/rex/proto/drda/packet.rb', line 40 def to_s packstr = "nCCnnn" packstr += "a*" # Pack smarter as more params are added. self.to_a.pack(packstr) end |