mirror of
https://github.com/bettercap/bettercap
synced 2025-08-20 21:43:18 -07:00
new: new ndp.spoof.router_lifetime option
This commit is contained in:
parent
924ff5753d
commit
4dc7bae48c
2 changed files with 18 additions and 10 deletions
|
@ -40,7 +40,7 @@ func ICMP6NeighborAdvertisement(srcHW net.HardwareAddr, srcIP net.IP, dstHW net.
|
|||
var macIpv6Multicast = net.HardwareAddr([]byte{0x33, 0x33, 0x00, 0x00, 0x00, 0x01})
|
||||
var ipv6Multicast = net.ParseIP("ff02::1")
|
||||
|
||||
func ICMP6RouterAdvertisement(ip net.IP, hw net.HardwareAddr, prefix string, prefixLength uint8) (error, []byte) {
|
||||
func ICMP6RouterAdvertisement(ip net.IP, hw net.HardwareAddr, prefix string, prefixLength uint8, routerLifetime uint16) (error, []byte) {
|
||||
eth := layers.Ethernet{
|
||||
SrcMAC: hw,
|
||||
DstMAC: macIpv6Multicast,
|
||||
|
@ -69,7 +69,7 @@ func ICMP6RouterAdvertisement(ip net.IP, hw net.HardwareAddr, prefix string, pre
|
|||
adv := layers.ICMPv6RouterAdvertisement{
|
||||
HopLimit: 255,
|
||||
Flags: 0x08, // prf
|
||||
RouterLifetime: 1800,
|
||||
RouterLifetime: routerLifetime,
|
||||
Options: []layers.ICMPv6Option{
|
||||
{
|
||||
Type: layers.ICMPv6OptSourceAddress,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue