mirror of
https://github.com/bettercap/bettercap
synced 2025-08-19 21:13:18 -07:00
refact: renamed package net to network to avoid collision with golang net package.
This commit is contained in:
parent
21236c257e
commit
48d27f274a
28 changed files with 298 additions and 298 deletions
|
@ -4,7 +4,7 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/evilsocket/bettercap-ng/log"
|
||||
"github.com/evilsocket/bettercap-ng/net"
|
||||
"github.com/evilsocket/bettercap-ng/network"
|
||||
"github.com/evilsocket/bettercap-ng/session"
|
||||
)
|
||||
|
||||
|
@ -68,9 +68,9 @@ func (d Discovery) Author() string {
|
|||
return "Simone Margaritelli <evilsocket@protonmail.com>"
|
||||
}
|
||||
|
||||
func (d *Discovery) runDiff(cache net.ArpTable) {
|
||||
func (d *Discovery) runDiff(cache network.ArpTable) {
|
||||
// check for endpoints who disappeared
|
||||
var rem net.ArpTable = make(net.ArpTable)
|
||||
var rem network.ArpTable = make(network.ArpTable)
|
||||
for mac, t := range d.Session.Targets.Targets {
|
||||
if _, found := cache[mac]; found == false {
|
||||
rem[mac] = t.IpAddress
|
||||
|
@ -101,7 +101,7 @@ func (d *Discovery) Start() error {
|
|||
iface := d.Session.Interface.Name()
|
||||
|
||||
for d.Running() {
|
||||
if table, err := net.ArpUpdate(iface); err != nil {
|
||||
if table, err := network.ArpUpdate(iface); err != nil {
|
||||
log.Error("%s", err)
|
||||
} else {
|
||||
d.runDiff(table)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue