BLOG     |     FORUM
Tool : Length Distribution Chart

Packet Length Distribution Chart

Quick Info This tool demonstrates the following concepts

Using the Unsniff Scripting API  to loop over packets

Using the Fox-Ruby toolkit to create GUI programs

Using the free ruby charting library UnleashCharts to create bar charts

This Ruby script uses the Unsniff Scripting API to create a bar-chart that shows distribution of packet lengths. This utility is written in the Ruby scripting language, using the Fox-Ruby GUI toolkit, and the free UnleashCharts charting library.  

Packet Length Distribution Chart

This script opens a capture file and loops over all captured packets. Each packet is assigned to a bucket based on its length. The rest of the code deals with interfacing with the Fx-Ruby toolkit and the UnleashCharts library.

Download

How to run

  1. Download the two files  (lendist.rb and UnleashCharts.rb) to a folder on your computer
  2. Execute the script on a capture file (see Usage below)

Usage:

lendist <capture-file-name>

capture-file-name : Capture file in Unsniff (*.usnf) format

Example:

c:\RubyTest> ruby lendist.rb   MyLargeCapture.usnf