You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Arti Zirk 33f6d16c51 Update readme 2 months ago
.gitignore init 2 months ago
CMakeLists.txt init 2 months ago
README.md Update readme 2 months ago
main.c init 2 months ago

README.md

Build IPv6 ICMP ECHO packet with Ethernet headers

Simple C code that builds a valid (ish) ethernet icmpv6 echo packet.

Scapy code samples

Writen in scapy shell

# import hex as packet
e = Ether(bytes.fromhex('fc de ad be ef 05 fc de ad be ef 56 86 dd 60 00 00 00 00 08 3a 02 fe 80 00 00 00 00 00 00 00 00 00 00 00 00 00 01 fe 80 00 00 00 00 00 00 50 5d 18 fb 5e 52 ec c0 81 00 4e cd 00 00 00 00 ef be ad de'))
e.show()

# Write packet as pcap to open in Wireshark
wrpcap("test.pcap", e)

# Calculate icmpv6 checksum
i = e[IPv6][ICMPv6EchoReply]
i.cksum = 0
r = raw(i)
print(hex(in6_chksum(socket.IPPROTO_ICMPV6, e[IPv6], r)))