Sha256: 541ee9de1be82dc71f3e3e18a65215b2cdc5cf1948c097e696c3c8a1bde48946

Contents?: true

Size: 666 Bytes

Versions: 43

Compression:

Stored size: 666 Bytes

Contents

##
# $Id: stream.rb 8457 2010-02-11 18:36:38Z jduck $
# Version: $Revision: 8457 $
##

##
# Rex::OLE - an OLE implementation
# written in 2010 by Joshua J. Drake <jduck [at] metasploit.com>
##

module Rex
module OLE

class Stream < DirEntry

	def initialize(stg)
		super

		# for reading/writing from this
		@offset = 0
		@_mse = STGTY_STREAM
	end

	def close
		@mode = nil
		@offset = nil
	end

	def seek(offset)
		@offset = offset
	end

	def read(len)
		return nil if (not @data)

		ret = @data[@offset, len]
		@offset += len
		ret
	end

	def <<(expr)
		if (not @data)
			@data = expr.dup
		else
			@data << expr
		end
		@_ulSize = @data.length
	end

end

end
end

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
librex-0.0.35 lib/rex/ole/stream.rb
librex-0.0.34 lib/rex/ole/stream.rb
librex-0.0.33 lib/rex/ole/stream.rb
librex-0.0.32 lib/rex/ole/stream.rb
librex-0.0.31 lib/rex/ole/stream.rb
librex-0.0.30 lib/rex/ole/stream.rb
librex-0.0.29 lib/rex/ole/stream.rb
librex-0.0.28 lib/rex/ole/stream.rb
librex-0.0.27 lib/rex/ole/stream.rb
librex-0.0.26 lib/rex/ole/stream.rb
librex-0.0.25 lib/rex/ole/stream.rb
librex-0.0.23 lib/rex/ole/stream.rb
librex-0.0.21 lib/rex/ole/stream.rb
librex-0.0.19 lib/rex/ole/stream.rb
librex-0.0.17 lib/rex/ole/stream.rb
librex-0.0.13 lib/rex/ole/stream.rb
librex-0.0.12 lib/rex/ole/stream.rb
librex-0.0.7 lib/rex/ole/stream.rb
librex-0.0.6 lib/rex/ole/stream.rb
librex-0.0.5 lib/rex/ole/stream.rb