mirror of
https://github.com/bettercap/bettercap
synced 2025-07-14 00:53:46 -07:00
new: experimental ipv6 ndp spoofer (closes #851)
This commit is contained in:
parent
cbc1432358
commit
57436a811c
8 changed files with 256 additions and 13 deletions
|
@ -305,7 +305,7 @@ func (s *Session) Start() error {
|
|||
func (s *Session) Skip(ip net.IP) bool {
|
||||
if ip.IsLoopback() {
|
||||
return true
|
||||
} else if ip.Equal(s.Interface.IP) {
|
||||
} else if ip.Equal(s.Interface.IP) || ip.Equal(s.Interface.IPv6){
|
||||
return true
|
||||
} else if ip.Equal(s.Gateway.IP) {
|
||||
return true
|
||||
|
@ -324,6 +324,10 @@ func (s *Session) FindMAC(ip net.IP, probe bool) (net.HardwareAddr, error) {
|
|||
from := s.Interface.IP
|
||||
from_hw := s.Interface.HW
|
||||
|
||||
if ip.To4() == nil {
|
||||
from = s.Interface.IPv6
|
||||
}
|
||||
|
||||
if err, probe := packets.NewUDPProbe(from, from_hw, ip, 139); err != nil {
|
||||
log.Error("Error while creating UDP probe packet for %s: %s", ip.String(), err)
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue