prpidx.rb
require 'win32ole'
 
USAGE = "prpidx <capture-filename>"
endl  = "\n"
tab   = "\t"
 
 
def printPacket(packet)
endl  = "\n"
tab   = "\t"
	$stdout << packet.ID << tab << packet.Timestamp << tab \
	        << packet.Length << tab << packet.Type << tab \
		<< packet.Description << endl
end
 
 
if ARGV.length != 1
	puts USAGE
	exit 1
end
 
InputFile = ARGV[0]
UnsniffDB = WIN32OLE.new("Unsniff.Database")
UnsniffDB.Open(InputFile)
Count = UnsniffDB.PacketCount
$stdout << "Number of Packets = " <<  Count << endl
 
PacketStore = UnsniffDB['PacketIndex']
(0..Count-1).each{ |idx| printPacket(PacketStore.Item(idx)) }
 
UnsniffDB.Close()
unsniff/samples/prpidx/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