mirror of
https://github.com/bettercap/bettercap
synced 2025-07-14 00:53:46 -07:00
balls
This commit is contained in:
parent
383a293bf5
commit
7049cc1014
3 changed files with 13 additions and 6 deletions
6
net/arp_parser_darwin.go
Normal file
6
net/arp_parser_darwin.go
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
package net
|
||||||
|
|
||||||
|
import "regexp"
|
||||||
|
|
||||||
|
var ArpTableParser = regexp.MustCompile("^[^\\d\\.]+([\\d\\.]+).+\\s+([a-f0-9:]{17})\\s+on\\s+(.+)\\s+.+$")
|
||||||
|
var ArpTableTokens = 4
|
6
net/arp_parser_linux.go
Normal file
6
net/arp_parser_linux.go
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
package net
|
||||||
|
|
||||||
|
import "regexp"
|
||||||
|
|
||||||
|
var ArpTableParser = regexp.MustCompile("^[^\\d\\.]+([\\d\\.]+).+\\s+([a-f0-9:]{17}).+\\s+(.+)$")
|
||||||
|
var ArpTableTokens = 4
|
|
@ -1,15 +1,10 @@
|
||||||
package net
|
package net
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"regexp"
|
|
||||||
"strings"
|
|
||||||
|
|
||||||
"github.com/evilsocket/bettercap-ng/core"
|
"github.com/evilsocket/bettercap-ng/core"
|
||||||
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
var ArpTableParser = regexp.MustCompile("^[^\\d\\.]+([\\d\\.]+).+\\s+([a-f0-9:]{17}).+\\s+(.+)$")
|
|
||||||
var ArpTableTokens = 4
|
|
||||||
|
|
||||||
func ArpUpdate(iface string) (ArpTable, error) {
|
func ArpUpdate(iface string) (ArpTable, error) {
|
||||||
arp_lock.Lock()
|
arp_lock.Lock()
|
||||||
defer arp_lock.Unlock()
|
defer arp_lock.Unlock()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue