Possible Duplicate:
How to calculate a packet checksum without sending it?
I've spoofed a source IP and MAC address in a captured packet, but now I need to recalculate the checksum so that it checks out once its been received (after being injected into the network of course). I didn't really want to implement the checksum myself, and I was thinking that scapy
could do this for me. I read that the show2()
function should recalculate the checksum, but I can't seem to get it to work.
So, how can I use scapy
to recalculate (and replace) the checksum for a captured + spoofed packet?
Thanks!