Wireshark-dev: Re: [Wireshark-dev] Help on Wireshark usage through Java script

From: Aaron Turner <synfinatic@xxxxxxxxx>
Date: Mon, 4 May 2009 10:27:00 -0700
On Mon, May 4, 2009 at 9:00 AM, vasudevan chandiramohan
<chandira79@xxxxxxxxx> wrote:
> Dear All,
> I am developing a tool on Javascript.
> One of my requirement is to open the saved .pcap file and read the content.
> I need to get the time stamps for the "200 OK" messages present on the
> ".pcap" file and prepare a report.
>
> If I open the .pcap file through javascript, it opens in Notepad and most of
> the content on .pcap file are not decoded properly and I am not able to
> parse though the file.
>
> Appreciate if someone can help me on how can I read the file through
> "wireshark" using javascript. (Like by creating Wireshark ActiveXObject) and
> using read function to read the messages into an array and processing them
> for the timestamps.

Use tshark (comes with wireshark) to process the pcap into a PDML
(xml) file.  And use javascript to process that.  Much easier.

-- 
Aaron Turner
http://synfin.net/
http://tcpreplay.synfin.net/ - Pcap editing and replay tools for Unix & Windows
Those who would give up essential Liberty, to purchase a little temporary
Safety, deserve neither Liberty nor Safety.
    -- Benjamin Franklin