This library is a lightweight replacement of scapy for packet building and parsing.
- Ether
- IPv4/IPv6
- ICMPv4/ICMPv6
- ARP/NDP
- TCP/UDP
import yasca.all as yc
pkt = yc.Ether(dst='33:33:00:00:00:01') / \
yc.IPv6(dst='ff02::1') / \
yc.ICMPv6EchoRequest() / \
b'hello'
buf = bytes(pkt)
# send(buf)
# buf = recv()
pkt = yc.Ether.parse(buf)
print(repr(pkt))
Higher priority first:
- UDP upper layer protocol
- DNS/mDNS/LLMNR
- DHCPv4/DHCPv6