# Follow TCP Stream in Ruby

**URL:** <https://www.ruby-forum.com/t/follow-tcp-stream-in-ruby/181990>\
**Category:** Ruby\
**Created:** [January 21, 2010, 6:58am UTC](https://www.ruby-forum.com/t/follow-tcp-stream-in-ruby/181990 "2010-01-21T06:58:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![THAKUR\_PRASHANT\_SIN](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/ecc23a/32.png) [@THAKUR\_PRASHANT\_SIN](https://www.ruby-forum.com/u/THAKUR_PRASHANT_SIN)\
**Post date:** [January 21, 2010, 6:58am UTC](https://www.ruby-forum.com/t/follow-tcp-stream-in-ruby/181990/1 "2010-01-21T06:58:16Z")

</div>

Hi,  
I am looking for implementing “Follow TCP stream” functionality of  
Wireshark in Ruby.  
Any idea are welcome ?  
Thanks & Regards,  
Prashant

---

<div class="post-metadata">

**Author:** ![THAKUR\_PRASHANT\_SIN](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/ecc23a/32.png) [@THAKUR\_PRASHANT\_SIN](https://www.ruby-forum.com/u/THAKUR_PRASHANT_SIN)\
**Post date:** [January 21, 2010, 6:59am UTC](https://www.ruby-forum.com/t/follow-tcp-stream-in-ruby/181990/2 "2010-01-21T06:59:47Z")

</div>

> I am looking for implementing “Follow TCP stream” functionality of  
> Wireshark in Ruby.  
> Any idea are welcome ?

[http://www.rubyinside.com/scruby-a-ruby-shell-for-packet-sending-and-sniffing-460.html](http://www.rubyinside.com/scruby-a-ruby-shell-for-packet-sending-and-sniffing-460.html)

perhaps.  
-r

---

<div class="post-metadata">

**Author:** ![THAKUR\_PRASHANT\_SIN](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/ecc23a/32.png) [@THAKUR\_PRASHANT\_SIN](https://www.ruby-forum.com/u/THAKUR_PRASHANT_SIN)\
**Post date:** [January 21, 2010, 10:58am UTC](https://www.ruby-forum.com/t/follow-tcp-stream-in-ruby/181990/3 "2010-01-21T10:58:15Z")

</div>

THAKUR PRASHANT SINGH wrote:

> Hi,  
> I am looking for implementing “Follow TCP stream” functionality of  
> Wireshark in Ruby.  
> Any idea are welcome ?  
> Thanks & Regards,  
> Prashant

The following is a ruby wrapper for libpcap, which I believe is what  
Wireshark uses to capture packets:

[http://www.goto.info.waseda.ac.jp/~fukusima/ruby/pcap-e.html](http://www.goto.info.waseda.ac.jp/~fukusima/ruby/pcap-e.html)

Note: there might be newer versions out there.

ciao,  
ammar

---

<div class="post-metadata">

**Author:** ![THAKUR\_PRASHANT\_SIN](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/ecc23a/32.png) [@THAKUR\_PRASHANT\_SIN](https://www.ruby-forum.com/u/THAKUR_PRASHANT_SIN)\
**Post date:** [January 21, 2010, 1:32pm UTC](https://www.ruby-forum.com/t/follow-tcp-stream-in-ruby/181990/4 "2010-01-21T13:32:46Z")

</div>

Thanks ammar ,  
I was indeed looking for the examples.  
Hopefully this will help.  
Regards,  
Prashant

---

<div class="post-metadata">

**Author:** ![THAKUR\_PRASHANT\_SIN](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/ecc23a/32.png) [@THAKUR\_PRASHANT\_SIN](https://www.ruby-forum.com/u/THAKUR_PRASHANT_SIN)\
**Post date:** [January 21, 2010, 11:01am UTC](https://www.ruby-forum.com/t/follow-tcp-stream-in-ruby/181990/5 "2010-01-21T11:01:46Z")

</div>

THAKUR PRASHANT SINGH wrote:

> Hi,  
> I am looking for implementing “Follow TCP stream” functionality of  
> Wireshark in Ruby.  
> Any idea are welcome ?  
> Thanks & Regards,  
> Prashant

I should have added that most links are broken on the page I sent  
earlier, just get the tarball. It has the code and the samples.

Hope that helps,  
ammar
