prpup.rb
#----------------------------------------------------------
# prpuo.rb -  Print all the user objects in the capture file
#
#  usage: prpuo <capture-filename>
#
#---------------------------------------------------------
require 'win32ole'
 
USAGE = "prpuo <capture-filename>"
 
if ARGV.length != 1
	puts USAGE
	exit 1
end
 
UnsniffDB = WIN32OLE.new("Unsniff.Database")
UnsniffDB.Open(ARGV[0])
UOIndex = UnsniffDB.UserObjectsIndex
(0..UOIndex.Count-1).each  do |idx|
	uo = UOIndex.Item(idx)
	if ! uo.HasError
		print "#{uo.ID}\t#{uo.Type}\t#{uo.SenderAddress}\t"
		print "#{uo.ReceiverAddress}\t#{uo.Length}\t"
		print "#{uo.Name}\t#{uo.Description}\n"
	end
 
end
 
print "\nTotal User Objects = #{UOIndex.Count}\n"
 
UnsniffDB.Close
unsniff/samples/prpup/ruby.txt · Last modified: 2014/09/11 23:23 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki