- prdidx.vbs
'
' PRPDUIDX - Print the PDU Index
'
' -----------------------
' Check usage & arguments
' -----------------------
Set Stdout = WScript.StdOut
if WScript.Arguments.Count <> 1 then
Stdout.WriteLine "Usage: prpduidx <filename>"
WScript.Quit
end if
InputFile = WScript.Arguments.Item(0)
Set UnsniffDB = CreateObject("Unsniff.Database")
UnsniffDB.Open(InputFile)
Count = UnsniffDB.PDUCount
Stdout.WriteLine "Filename is " & InputFile
Stdout.WriteLine "Number of PDUs = " & Count
Dim PDUIndex
Set PDUIndex = UnsniffDB.PDUIndex
For Each PDU In PDUIndex
StdOut.WriteLine PDU.ID & vbTab & PDU.Timestamp & vbTab &_
PDU.Length & vbTab & PDU.Name & vbTab & PDU.Description
Next
UnsniffDB.Close()