diff --git a/packets/queue.go b/packets/queue.go index 09590fd7..8687e4cd 100644 --- a/packets/queue.go +++ b/packets/queue.go @@ -4,6 +4,7 @@ import ( "bytes" "fmt" "net" + "runtime" "sync" "sync/atomic" @@ -59,8 +60,12 @@ func NewQueue(iface *bnet.Endpoint) (*Queue, error) { Activities: make(chan Activity), } - fmt.Printf("OpenLive(%s)\n", iface.Name()) - q.handle, err = pcap.OpenLive(iface.Name(), 1024, true, pcap.BlockForever) + byName := iface.Name() + if runtime.GOOS == "windows" { + byName = iface.IpAddress + } + + q.handle, err = pcap.OpenLive(byName, 1024, true, pcap.BlockForever) if err != nil { return nil, err }