Differences

This shows you the differences between two versions of the page.

Link to this comparison view

unsniff:samples:stmdrill:vbs [2014/09/11 23:23] (current)
Line 1: Line 1:
 +<file vb stmdrill.vbs>
 +
 +' 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()
 +</file>
unsniff/samples/stmdrill/vbs.txt · Last modified: 2014/09/11 23:23 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki