mirror of
https://github.com/bettercap/bettercap
synced 2025-08-19 13:09:49 -07:00
balls
This commit is contained in:
parent
1c97a6df72
commit
2f2e52393a
1 changed files with 7 additions and 2 deletions
|
@ -4,6 +4,7 @@ import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"fmt"
|
"fmt"
|
||||||
"net"
|
"net"
|
||||||
|
"runtime"
|
||||||
"sync"
|
"sync"
|
||||||
"sync/atomic"
|
"sync/atomic"
|
||||||
|
|
||||||
|
@ -59,8 +60,12 @@ func NewQueue(iface *bnet.Endpoint) (*Queue, error) {
|
||||||
Activities: make(chan Activity),
|
Activities: make(chan Activity),
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt.Printf("OpenLive(%s)\n", iface.Name())
|
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
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue