- bookanno.vbs
'-------------------------------------------------------
' bookanno.vbs
' Demonstrates bookmakrs and annotations
'
' usage : bookanno <capture-filename>
'-------------------------------------------------------
' Check usage & arguments
Set Sout = WScript.Stdout
if WScript.Arguments.Count <> 1 then
Sout.Writeline "Usage: bookanno <filename>"
WScript.Quit
end if
ArgFile = WScript.Arguments.Item(0)
Set UnsniffDB = CreateObject("Unsniff.Database")
UnsniffDB.Open(ArgFile)
Set PacketStore = UnsniffDB.PacketIndex
For Each Packet In PacketStore
If Packet.Length > 1000 Then
Packet.IsBookmarked = True
Elseif Packet.Length > 500 Then
Packet.Annotation = "Medium Sized Packet"
End If
Next
UnsniffDB.Save