Change TCP Payload with nfqueue/scapy
Hello I am using nfqueue and scapy and I my goal is to recieve packets at my NFQUEUE, change the payload and resend them. I can change fields like the TTL without any kind of problem, but when it comes to change the payload, I am encoutering problems. When I change the payload, I sniff the packet with wireshark and apparently I send the packet with the payload modified, but the server doesn't answer. This is my code: #!/usr/bin/env python import nfqueue from scapy.all import * def callback(payload): data = payload.get_data() pkt = IP(data) pkt[TCP].payload = str(pkt[TCP].payload).replace("ABC"