2012-06-29 05:18:28 +00:00
|
|
|
# -*- coding: binary -*-
|
2010-02-11 18:36:38 +00:00
|
|
|
|
|
|
|
##
|
|
|
|
# Rex::OLE - an OLE implementation
|
|
|
|
# written in 2010 by Joshua J. Drake <jduck [at] metasploit.com>
|
|
|
|
##
|
|
|
|
|
|
|
|
module Rex
|
|
|
|
module OLE
|
|
|
|
|
|
|
|
class SubStorage < DirEntry
|
|
|
|
|
2013-08-30 21:28:33 +00:00
|
|
|
def initialize(stg)
|
|
|
|
super
|
2010-02-11 18:36:38 +00:00
|
|
|
|
2013-08-30 21:28:33 +00:00
|
|
|
@_mse = STGTY_STORAGE
|
|
|
|
end
|
2010-02-11 18:36:38 +00:00
|
|
|
|
|
|
|
|
2013-08-30 21:28:33 +00:00
|
|
|
def close
|
|
|
|
end
|
2010-02-11 18:36:38 +00:00
|
|
|
|
|
|
|
|
2013-08-30 21:28:33 +00:00
|
|
|
# stream handling stuff
|
|
|
|
def create_stream(name, mode=STGM_WRITE)
|
|
|
|
@stg.create_stream(name, mode, self)
|
|
|
|
end
|
2010-02-11 18:36:38 +00:00
|
|
|
|
2013-08-30 21:28:33 +00:00
|
|
|
def open_stream(name, mode=STGM_READ)
|
|
|
|
@stg.open_stream(name, mode, self)
|
|
|
|
end
|
2010-02-11 18:36:38 +00:00
|
|
|
|
|
|
|
|
2013-08-30 21:28:33 +00:00
|
|
|
# storage handling stuff
|
|
|
|
def create_storage(name, mode=STGM_WRITE)
|
|
|
|
@stg.create_storage(name, mode, self)
|
|
|
|
end
|
2010-02-11 18:36:38 +00:00
|
|
|
|
2013-08-30 21:28:33 +00:00
|
|
|
def open_storage(name, mode=STGM_WRITE)
|
|
|
|
@stg.open_storage(name, mode, self)
|
|
|
|
end
|
2010-02-11 18:36:38 +00:00
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|