' ----------------- ' Declare variables ' ----------------- Set Sout = WScript.Stdout ' ----------------------- ' Check usage & arguments ' ----------------------- if WScript.Arguments.Count <> 2 then Sout.Writeline "Usage: prlayer <filename> <pktid>" WScript.Quit end if ArgFile = WScript.Arguments.Item(0) PktIdx = WScript.Arguments.Item(1) Set UnsniffDB = CreateObject("Unsniff.Database") UnsniffDB.Open(ArgFile) Sout.Writeline "Number of packets = " & UnsniffDB.PacketCount Set PacketStore = UnsniffDB.PacketIndex Set Packet = PacketStore(PktIdx) Sout.Writeline "-- " & Packet.Description Sout.Writeline "Layer Count = " & Packet.Layers.Count Sout.Writeline "Layer" & vbTab & vbTab & "Size " & vbTab & vbTab & "ProtID" For Each Layer In Packet.Layers Sout.Writeline Layer.Name & vbTab & vbTab & vbTab & _ Layer.Size & vbTab & vbTab & _ Layer.ProtID Next UnsniffDB.Close()