Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

High-level, multiplatform C++ network packet sniffing and crafting library.

License

NotificationsYou must be signed in to change notification settings

mfontanini/libtins

Repository files navigation

Build statusBuild status

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:

http://libtins.github.io/

Compiling

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

Static/shared build

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.

C++11 support

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

TCP ACK tracker

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

WPA2 decryption

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

IEEE 802.11 support

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

Installing

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

Running tests

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.

Examples

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/

Contributing

If you want to report a bug or make a pull request, please have a look atthecontributing file before doing so.


[8]ページ先頭

©2009-2025 Movatter.jp