开发者

How to forward IP packets with Ruby

开发者 https://www.devze.com 2023-01-19 16:51 出处:网络
I want to capture packets wh开发者_C百科oes has a special target ip, then forward these packets by UDP. Does Ruby can do this ? thanksPacket, you mean? If you want see packets in userspace, not kernel

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

精彩评论

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