class Rex::OLE::PropertySetStream
Public Class Methods
new()
click to toggle source
# File lib/rex/ole/propset.rb, line 87 def initialize @byte_order = 0xfffe @ole_version = 0 @os_version = 1 @os_platform = 2 @clsid = CLSID.new @propsets = [] end
Public Instance Methods
<<(ps)
click to toggle source
# File lib/rex/ole/propset.rb, line 97 def <<(ps) @propsets << ps end
pack()
click to toggle source
# File lib/rex/ole/propset.rb, line 101 def pack buf = '' # First, add the header buf << [ @byte_order, @ole_version, @os_version, @os_platform ].pack('vvvv') buf << @clsid.pack buf << [@propsets.length].pack('V') # Pack all the PropertySet children data = [] @propsets.each { |p| data << p.pack_data } # Next, add all the FMTID and Offset headers off = buf.length + (20 * @propsets.length) @propsets.each_with_index { |ps,x| buf << ps.pack_fno(off) off += data[x].length } # Finally, add all the data buf << data.join buf end
to_s()
click to toggle source
# File lib/rex/ole/propset.rb, line 132 def to_s "Rex::OLE::PropertySetStream - to_s unimplemented" end