From 80bbd2a0a0837120174e8bfb13267744c756aecc Mon Sep 17 00:00:00 2001 From: evilsocket Date: Thu, 1 Feb 2018 21:28:19 +0100 Subject: [PATCH] balls --- modules/net_recon.go | 2 +- session/session.go | 2 +- session/targets.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/net_recon.go b/modules/net_recon.go index 93887c83..8bee565a 100644 --- a/modules/net_recon.go +++ b/modules/net_recon.go @@ -116,7 +116,7 @@ func (d *Discovery) runDiff() { // now check for new friends ^_^ for ip, mac := range d.current { - d.Session.Targets.AddIfNotExist(ip, mac) + d.Session.Targets.AddIfNew(ip, mac) } } diff --git a/session/session.go b/session/session.go index d435af43..c1bf237f 100644 --- a/session/session.go +++ b/session/session.go @@ -275,7 +275,7 @@ func (s *Session) Start() error { addr := event.IP.String() mac := event.MAC.String() - existing := s.Targets.AddIfNotExist(addr, mac) + existing := s.Targets.AddIfNew(addr, mac) if existing != nil { existing.LastSeen = time.Now() } diff --git a/session/targets.go b/session/targets.go index bccb8e2e..2d193999 100644 --- a/session/targets.go +++ b/session/targets.go @@ -153,7 +153,7 @@ func (tp *Targets) Has(ip string) bool { return false } -func (tp *Targets) AddIfNotExist(ip, mac string) *net.Endpoint { +func (tp *Targets) AddIfNew(ip, mac string) *net.Endpoint { tp.Lock() defer tp.Unlock()