fix: protecting concurrent access to LAN hosts

This commit is contained in:
evilsocket 2018-02-20 11:33:30 +01:00
commit 241db0cc66
6 changed files with 43 additions and 23 deletions

View file

@ -111,7 +111,7 @@ func (s *DNSSpoofer) dnsReply(pkt gopacket.Packet, peth *layers.Ethernet, pudp *
redir := fmt.Sprintf("(->%s)", s.Address)
who := target.String()
if t, found := s.Session.Lan.Hosts[target.String()]; found == true {
if t, found := s.Session.Lan.Get(target.String()); found == true {
who = t.String()
}