开发者

How to forward IP packets with Ruby

I want to capture packets wh开发者_C百科oes has a special target ip, then forward these packets by UDP. Does Ruby can do this ? thanks


Packet, you mean? If you want see packets in userspace, not kernel-level then you can use several ways.

  1. libpcap: libpcap is packet capture library used in tcpdump/wireshark
  2. libipq: iptables packet queueing library. http://rubyipq.rubyforge.org/ for libipq, there is also ruby binding but it doesn't seems to be in activated. Actually libipq is deprecated by libnetfilter_queue

You can make ruby binding of libnetfilter_queue.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜