Sha256: 098cb6369cb71d587542efabfd6fa9251f05da4312294023724222cc8d886b3a

Contents?: true

Size: 589 Bytes

Versions: 43

Compression:

Stored size: 589 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 < 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

43 entries across 43 versions & 1 rubygems

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