Class: Rex::OLE::Property
- Inherits:
-
Object
- Object
- Rex::OLE::Property
- Defined in:
- lib/rex/ole/propset.rb
Instance Method Summary collapse
-
#initialize(id, type, data) ⇒ Property
constructor
A new instance of Property.
- #pack_data ⇒ Object
- #pack_pio(off = 0) ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(id, type, data) ⇒ Property
Returns a new instance of Property.
16 17 18 19 20 |
# File 'lib/rex/ole/propset.rb', line 16 def initialize(id, type, data) @id = id @type = type @data = data end |
Instance Method Details
#pack_data ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/rex/ole/propset.rb', line 26 def pack_data buf = [ @type ].pack('V') case @type when VT_BLOB buf << [ @data.length ].pack('V') when VT_CF buf << [ 4 + @data.length, -1 ].pack('V*') end buf << @data buf end |
#pack_pio(off = 0) ⇒ Object
22 23 24 |
# File 'lib/rex/ole/propset.rb', line 22 def pack_pio(off = 0) [ @id, off ].pack('V*') end |
#to_s ⇒ Object
38 39 40 |
# File 'lib/rex/ole/propset.rb', line 38 def to_s "Rex::OLE::Property - to_s unimplemented" end |