tcount2.vbs
' 
' TCOUNT2 - Simpler version of TCOUNT
'

' -----------------------
' Check usage & arguments
' -----------------------
Set Stdout = WScript.StdOut
 
if WScript.Arguments.Count <> 1 then
	Stdout.WriteLine "Usage: tcount <filename>"
	WScript.Quit
end if
 
InputFile  = WScript.Arguments.Item(0)
Set UnsniffDB = CreateObject("Unsniff.Database")
 
UnsniffDB.Open(InputFile)
Count = UnsniffDB.PacketCount
UnsniffDB.Close()
 
Stdout.WriteLine "Filename is " & InputFile
Stdout.WriteLine "Number of packets = " & Count