Open amlwwalker opened 1 year ago
@amlwwalker gopacket only monitors the network traffic, and does not take control any packet
if you want learn something about network, suggest to use cisco packet tracer, you can use it to observe how ping packets are transmitted frame by frame
I am new to tunnels and network level coding, however there are some great examples using gopacket specifically i found this one Decoding Packet Layers here.
I am interested in understanding PING specifically so I slightly adjusted the code to
What I'm interested in is manipulating the ping response in this case. I.e when my computer is pinged from another device on the network (or the internet if thats configured on the router) can I hijack the response that my machine makes, i.e maybe by changing the payload or the latency (time it takes to respond). I.e can I get the pinger to receive data that is incorrect.
I tried adding a
time.Sleep(1 * time.Second)
in the above, however it doesn't slow the response down - so what I figure is I am reading the incoming data, but not hijacking the network to manipulate the returned data.Can gopacket do this? What would the interception of the response look like so that I can add in an arbitrary delay and get ping latency of 1s +
Thanks for all/any help.