Search code examples
c#pcapman-in-the-middlepcap.net

Pcap.Net Get gateway address


I'm currently working on a MITM-Project with Pcap.Net but now I'm stuck. To keep it short, I need to get the default gateway address of my selected LivePacketDevice. Is there an easy way to do this, because I didn't find anything.

Thanks Termi


Solution

  • device.GetNetworkInterface().GetIPProperties().GatewayAddresses[0].Address
    

    Got it :D!