I just want to intercept raw data (hex)--headers and all--sent to a port, and relay them over an xmpp server. Then I would like to be able to replay to the port with hex I receive in a similar manner.
I tried raw sockets, as described here, and got the same error. I am not sure how to use pcap (the one for python) to do this.