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.
13 14 15 16 17 |
# File 'lib/rex/ole/propset.rb', line 13 def initialize(id, type, data) @id = id @type = type @data = data end |
Instance Method Details
#pack_data ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/rex/ole/propset.rb', line 23 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
19 20 21 |
# File 'lib/rex/ole/propset.rb', line 19 def pack_pio(off = 0) [ @id, off ].pack('V*') end |
#to_s ⇒ Object
35 36 37 |
# File 'lib/rex/ole/propset.rb', line 35 def to_s "Rex::OLE::Property - to_s unimplemented" end |