tcount.rb
require 'win32ole'
 
USAGE = "tcount <capture-filename>"
 
if ARGV.length != 1
	puts USAGE
	exit 1
end
 
InputFile = ARGV[0]
UnsniffDB = WIN32OLE.new("Unsniff.Database")
UnsniffDB.Open(InputFile)
Count = UnsniffDB.PacketCount
UnsniffDB.Close
 
 
endl="\n"
$stdout << "Filename is " <<  InputFile << endl
$stdout << "Number of Packets = " <<  Count << endl