This commit is contained in:
evilsocket 2018-02-07 19:38:33 +01:00
commit 99209f9f2e

View file

@ -4,7 +4,6 @@ import (
"bytes" "bytes"
"fmt" "fmt"
"net" "net"
"runtime"
"sync" "sync"
"sync/atomic" "sync/atomic"
@ -60,12 +59,7 @@ func NewQueue(iface *bnet.Endpoint) (*Queue, error) {
Activities: make(chan Activity), Activities: make(chan Activity),
} }
byName := iface.Name() q.handle, err = pcap.OpenLive(iface.Name(), 1024, true, pcap.BlockForever)
if runtime.GOOS == "windows" {
byName = iface.IpAddress
}
q.handle, err = pcap.OpenLive(byName, 1024, true, pcap.BlockForever)
if err != nil { if err != nil {
return nil, err return nil, err
} }