mirror of
https://github.com/bettercap/bettercap
synced 2025-07-15 01:23:42 -07:00
refact: refactored to use islazy and updated deps
This commit is contained in:
parent
a2b3ee79fb
commit
d070445225
238 changed files with 12662 additions and 1586 deletions
|
@ -4,15 +4,15 @@ import (
|
|||
"fmt"
|
||||
"net"
|
||||
|
||||
"github.com/google/gopacket/layers"
|
||||
|
||||
"github.com/bettercap/bettercap/core"
|
||||
"github.com/bettercap/bettercap/session"
|
||||
|
||||
"github.com/evilsocket/islazy/tui"
|
||||
"github.com/google/gopacket/layers"
|
||||
)
|
||||
|
||||
func vIP(ip net.IP) string {
|
||||
if session.I.Interface.IP.Equal(ip) {
|
||||
return core.Dim("local")
|
||||
return tui.Dim("local")
|
||||
} else if session.I.Gateway.IP.Equal(ip) {
|
||||
return "gateway"
|
||||
}
|
||||
|
@ -32,11 +32,11 @@ func vPort(p interface{}) string {
|
|||
sp := fmt.Sprintf("%d", p)
|
||||
if tcp, ok := p.(layers.TCPPort); ok {
|
||||
if name, found := layers.TCPPortNames[tcp]; found {
|
||||
sp = core.Yellow(name)
|
||||
sp = tui.Yellow(name)
|
||||
}
|
||||
} else if udp, ok := p.(layers.UDPPort); ok {
|
||||
if name, found := layers.UDPPortNames[udp]; found {
|
||||
sp = core.Yellow(name)
|
||||
sp = tui.Yellow(name)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue