prlayer.vbs
' -----------------
' 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()
unsniff/samples/prlayer/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