A high-level C++ library for crafting, decoding, and sniffing network packets with a Scapy-like interface.
libcrafter is a high-level C++ library for crafting, decoding, and manipulating network packets. It provides a Scapy-like interface that allows developers to build, send, receive, and analyze network traffic by stacking protocol layers with sensible defaults. The library solves the problem of complex low-level network programming by offering an intuitive API for creating networking tools, security scanners, and protocol testers.
C++ developers building network security tools, traffic analyzers, protocol testers, or any application requiring low-level packet manipulation. It's particularly suited for those who need a Scapy-like experience in a C++ environment.
Developers choose libcrafter for its intuitive, high-level API that simplifies network packet manipulation compared to raw socket programming. Its thread-safe design, comprehensive protocol support, and built-in utilities like ARP spoofing helpers make it a powerful alternative to Python's Scapy for performance-critical C++ applications.
A high level C++ network packet sniffing and crafting library
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
The library allows packet creation by stacking protocol layers with sensible defaults, making complex packet crafting accessible with minimal code, as shown in the TCP SYN packet example where layers are combined with the '/' operator.
Explicitly designed for multithreaded applications, it supports concurrent sniffing and packet manipulation without manual locking, ideal for building high-performance network tools.
Covers layers 2-4 including Ethernet, IP (v4/v6 with extensions), TCP/UDP with options, and utilities like ARP spoofing helpers, providing a solid foundation for security and analysis tasks.
Integrates libpcap for live packet capture with Berkeley Packet Filter support, enabling real-time traffic monitoring directly in C++ code, as demonstrated in the Sniffer class example.
Only supports DNS and DHCP at the application layer, lacking modern protocols like HTTP, TLS, or QUIC, which restricts its use for full-stack network analysis without additional libraries.
Requires autoconf, libtool, and manual compilation from source, making installation more cumbersome compared to libraries available via standard package managers, and prone to dependency issues.
Heavily dependent on libpcap and POSIX threads, with no mention of Windows support in the README, restricting its usability primarily to Linux and macOS environments.
libcrafter is an open-source alternative to the following products: