Sha256: 16a700f28850b5d6e4ed745306c92a61b629bb69734986cec3e4b6c9cff3be73
Contents?: true
Size: 614 Bytes
Versions: 2
Compression:
Stored size: 614 Bytes
Contents
#!/usr/bin/env ruby # -*- coding: binary -*- 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 < 1) $stderr.puts "usage: dir <file>" exit(1) end document = ARGV.shift # recursive printer :) def show_entries(ent, spaces=0) spstr = " " * spaces puts "%s + #{ent.name}" % spstr ent.each { |el| show_entries(el, spaces+2) } end if (stg = Rex::OLE::Storage.new(document)) show_entries(stg) stg.close end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
librex-0.0.68 | lib/rex/ole/samples/dir.rb |
librex-0.0.66 | lib/rex/ole/samples/dir.rb |