- Notifications
You must be signed in to change notification settings - Fork384
High-level, multiplatform C++ network packet sniffing and crafting library.
License
mfontanini/libtins
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
libtins is a high-level, multiplatform C++ network packet sniffing andcrafting library.
Its main purpose is to provide the C++ developer an easy, efficient,platform and endianess-independent way to create tools which need tosend, receive and manipulate specially crafted packets.
In order to read tutorials, examples and checkout some benchmarks of thelibrary, please visit:
libtins depends onlibpcap andopenssl, although the latter is not necessaryif some features of the library are disabled.
In order to compile, execute:
# Create the build directorymkdir buildcd build# Configure the project. Add any relevant configuration flagscmake ../# Compile!make
Note that by default, only the shared object is compiled. If you wouldlike to generate a static library file, run:
cmake ../ -DLIBTINS_BUILD_SHARED=0
The generated static/shared library files will be located in thebuild/lib directory.
libtins is noticeably faster if you enableC++11 support. Therefore,if your compiler supports this standard, then you should enable it.In order to do so, use theLIBTINS_ENABLE_CXX11 switch:
cmake ../ -DLIBTINS_ENABLE_CXX11=1
The TCP ACK tracker feature requires the boost.icl library (header only).This feature is enabled by default but will be disabled if the boostheaders are not found. You can disable this feature by using:
cmake ../ -DLIBTINS_ENABLE_ACK_TRACKER=0
If your boost installation is on some non-standard path, usethe parameters shown on theCMake FindBoost help
If you want to disableWPA2 decryption support, which will removeopenssl as a dependency for compilation, use theLIBTINS_ENABLE_WPA2 switch:
cmake ../ -DLIBTINS_ENABLE_WPA2=0
If you want to disable IEEE 802.11 support(this will also disableRadioTap and WPA2 decryption), which will reduce the size of theresulting library in around 20%, use theLIBTINS_ENABLE_DOT11 switch:
cmake ../ -DLIBTINS_ENABLE_DOT11=0
Once you're done, if you want to install the header files and theshared object, execute as root:
make install
This will install the shared object typically in/usr/local/lib. Notethat you might have to update ldconfig's cache before using it, soin order to invalidate it, you should run(as root):
ldconfig
You may want to run the unit tests on your system so you make sureeverything works. In order to do so, you need to follow these steps:
# This will fetch the googletest submodule, needed for testsgit submodule initgit submodule updatemkdir buildcd build# Use any options you wantcmake ..# Compile testsmake tests# Run themmaketest
If you find that any tests fail, please create an ticket in theissue tracker indicating the platform and architecture you're using.
You might want to have a look at the examples located in the "examples"directory. The same samples can be found online at:
http://libtins.github.io/examples/
If you want to report a bug or make a pull request, please have a look atthecontributing file before doing so.
About
High-level, multiplatform C++ network packet sniffing and crafting library.