Change icmp6 (sub-)type
This commit is contained in:
parent
3c215f6054
commit
6f28013bb3
1 changed files with 3 additions and 3 deletions
|
@ -10,7 +10,7 @@ from scapy.all import sniff, get_if_list, Ether, get_if_hwaddr, sendp
|
||||||
from scapy.all import IP, Raw, IPv6, TCP, TCP_client, Ether
|
from scapy.all import IP, Raw, IPv6, TCP, TCP_client, Ether
|
||||||
from scapy.all import sniff
|
from scapy.all import sniff
|
||||||
from scapy.all import Packet, BitField, IntEnumField, ShortField, XShortEnumField, ShortEnumField
|
from scapy.all import Packet, BitField, IntEnumField, ShortField, XShortEnumField, ShortEnumField
|
||||||
from scapy.all import ICMPv6ND_NS, ICMPv6ND_RS, ICMPv6NDOptSrcLLAddr, ICMPv6ND_NS, ICMPv6ND_NA
|
from scapy.all import ICMPv6ND_NS, ICMPv6ND_RS, ICMPv6NDOptSrcLLAddr, ICMPv6ND_NS, ICMPv6ND_NA, ICMPv6NDOptDstLLAddr
|
||||||
from scapy.data import ETHER_TYPES
|
from scapy.data import ETHER_TYPES
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
@ -247,10 +247,10 @@ class L2Controller(object):
|
||||||
# S=1 -> solicitated
|
# S=1 -> solicitated
|
||||||
i2 = ICMPv6ND_NA(S=1, R=0, tgt=src_addr)
|
i2 = ICMPv6ND_NA(S=1, R=0, tgt=src_addr)
|
||||||
|
|
||||||
# Force scapy to recalculate
|
# Force scapy to recalculate ??
|
||||||
i2.chksum = None
|
i2.chksum = None
|
||||||
|
|
||||||
i3 = ICMPv6NDOptSrcLLAddr(lladdr=src_mac)
|
i3 = ICMPv6NDOptDstLLAddr(lladdr=src_mac)
|
||||||
|
|
||||||
|
|
||||||
answer = e / i / i2 / i3
|
answer = e / i / i2 / i3
|
||||||
|
|
Loading…
Reference in a new issue