I am working on integrating scapy with twisted, but I ran into this very weird bug on OSX that I can\'t seem to figure out.
Basically I am unable to send a valid TCP pac
I ended up deciding that Raw Sockets are just to bugged to be usable. Especially since this software needs to be cross platform, quirks for OSX may not be applicable to other OSs.
For the time being I simply wrapped the "sockets" that are provided by scapy. In the future I will write something that only depends on libdnet (as that is what scapy does to write raw frames).
You can find this implemented here:
https://github.com/hellais/txscapy