' ' stmdrill - Drilldown show segments in the stream ' ' ----------------------- ' Check usage & arguments ' ----------------------- Set Sout = WScript.StdOut if WScript.Arguments.Count <> 2 then Sout.WriteLine "Usage: stmdrill <filename> <stmid>" WScript.Quit end if InputFile = WScript.Arguments.Item(0) StmID = WScript.Arguments.Item(1) Set UnsniffDB = CreateObject("Unsniff.Database") UnsniffDB.Open(InputFile) Dim StmIndex Set StmIndex = UnsniffDB.StreamIndex Set STM = StmIndex(StmID) Set Packets = STM.Packets Sout.WriteLine "----- STREAM INFO -------" Sout.WriteLine STM.ID & vbTab & STM.StartTimestamp & vbTab &_ STM.SourceAddress & vbTab & STM.DestinationAddress &_ STM.InByteCount & vbTab & STM.OutByteCount & vbTab & STM.Description Sout.WriteLine "----- STREAM CONTENTS (Packets in Stream) -------" For Each Packet In Packets Sout.WriteLine Packet.ID & vbTAB & Packet.Timestamp & vbTab & _ Packet.Length & vbTAB & Packet.Type & vbTAB & _ Packet.Description Next UnsniffDB.Close()