mirror of
https://github.com/bettercap/bettercap
synced 2025-08-20 21:43:18 -07:00
fix: dumb fix because net.LookupAddr works differently on windows
This commit is contained in:
parent
c561d24d4c
commit
d455ff6f72
1 changed files with 1 additions and 1 deletions
|
@ -69,7 +69,7 @@ func NewEndpoint(ip, mac string) *Endpoint {
|
|||
|
||||
// start resolver goroutine
|
||||
go func() {
|
||||
if names, err := net.LookupAddr(e.IpAddress); err == nil {
|
||||
if names, err := net.LookupAddr(e.IpAddress); err == nil && len(names) > 0 {
|
||||
e.Hostname = names[0]
|
||||
if e.ResolvedCallback != nil {
|
||||
e.ResolvedCallback(e)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue