I am looking for a way to listen on an interface for all incoming traffic using the go programming language.
I would want it to be something similar to this python:
import socket, sys
from struct import *
s = socket.socket(socket.AF_INET, socket.SOCK_RAW, socket.IPPROTO_TCP)
packet = s.recvfrom(65565)
This was the first Google hit for me, and looks relevant:
Thanks Bruno. That seems to be another great example as it allows you to define your interface, and has modules already built in to decode your packet. Thanks again for the suggestion.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.