IPQueue allows us to specify a modified packet with a verdict
If specified, it replaces the original packet
Replace all occurrences of "FOO" with "BAR":
my $tcp = NetPacket::TCP->decode($ip->{data}); $tcp->{data} =~ s/FOO/BAR/g; $ip->{data} = $tcp->encode($ip); my $raw = $ip->encode; $ipq->set_verdict($msg->packet_id, NF_ACCEPT, length($raw), $raw);
continued...