packet-mangling

Packet mangling utilities besides iptables?

I'm looking for a linux utility that can alter the payloads of network packets based on a set of rules. Ideally, I'd use iptables and the netfilter kernel module, but they don't support generic payload mangling: iptables will alter various header fields (addresses, ports, TOS, etc), and it can match arbitrary bytes within a packet, but ...

Library to Perform Link-Layer Packet Modification

Is there a library out there that will allow me to perform link-layer packet modification for both incoming and outgoing packets? Basically I want to do some transformations to a packet (for eg. changing IP payload) based on incoming MAC address, IP address, port, etc. I also want to be able to do the same thing for outgoing packets, i....

Python port forwarding/multiplexing server

I would like to make server that listen on UDP port 162 (SNMP trap) and then forwards this traffic to multiple clients. Also important is that the source port & address stays same (address spoofing). I guess that best tool for this would be Twisted or Scapy or maybe vanilla sockets, only I can't find anything in the documentation for T...

LSP packet modify

Hello, anybody care to share some insights on how to use LSP for packet modifying ? I am using the non IFS subtype and I can see how (pseudo?) packets first enter WSPRecv. But how do I modify them ? My inquiry is about one single HTTP response that causes WSPRecv to be called 3 times :((. I need to modify several parts of this response...

Issue reading packets from a pcap file. dpkt module. What gives?

I am running the following test script to try to read packets from a sample .pcap file I have downloaded. It won't seem to run. I have all of the modules, but no examples seem to be running. import socket import dpkt import sys pcapReader = dpkt.pcap.Reader(file("test1.pcap", "rb")) for ts, data in pcapReader: ether = dpkt.etherne...