Merge pull request #31 from onura/pr/unicast_arp_reply

fix: Arp spoofing poisons other devices although arg.spoof.targets is…
This commit is contained in:
Simone Margaritelli 2018-01-28 12:16:03 +01:00 committed by GitHub
commit 96e120e804
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,14 +1,15 @@
package packets
import (
"github.com/google/gopacket/layers"
"net"
"github.com/google/gopacket/layers"
)
func NewARPTo(from net.IP, from_hw net.HardwareAddr, to net.IP, to_hw net.HardwareAddr, req uint16) (layers.Ethernet, layers.ARP) {
eth := layers.Ethernet{
SrcMAC: from_hw,
DstMAC: net.HardwareAddr{0xff, 0xff, 0xff, 0xff, 0xff, 0xff},
DstMAC: to_hw,
EthernetType: layers.EthernetTypeARP,
}
arp := layers.ARP{