Sha256: dde5da3788323a88f2c48b090008f65a706bba5e67d6add54adf1c3ec8658656
Contents?: true
Size: 761 Bytes
Versions: 42
Compression:
Stored size: 761 Bytes
Contents
#!/usr/bin/env ruby msfbase = __FILE__ while File.symlink?(msfbase) msfbase = File.expand_path(File.readlink(msfbase), File.dirname(msfbase)) end path = File.expand_path(File.dirname(msfbase)) path += "/../../../" $:.unshift(path) require 'rex/ole' if (ARGV.length < 2) $stderr.puts "usage: dump_stream <file> <stream>" exit(1) end document = ARGV.shift stream = ARGV.shift if (stg = Rex::OLE::Storage.new(document)) if (stm = stg.open_stream(stream)) data = stm.read(stm.length) data ||= "" $stderr.puts "Successfully opened the \"%s\" stream (%u bytes)" % [stream, data.length] $stdout.print data stm.close else $stderr.puts "Unable to open stream: #{stream}" end stg.close else $stderr.puts "Unable to open storage: #{document}" end
Version data entries
42 entries across 42 versions & 1 rubygems