1 Star 1 Fork 0

e-software / libtins

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
BSD-2-Clause

libtins

Build status Build status

libtins is a high-level, multiplatform C++ network packet sniffing and crafting library.

Its main purpose is to provide the C++ developer an easy, efficient, platform and endianess-independent way to create tools which need to send, receive and manipulate specially crafted packets.

In order to read tutorials, examples and checkout some benchmarks of the library, please visit:

http://libtins.github.io/

Compiling

libtins depends on libpcap and openssl, although the latter is not necessary if some features of the library are disabled.

In order to compile, execute:

# Create the build directory
mkdir build
cd build

# Configure the project. Add any relevant configuration flags
cmake ../

# Compile!
make

Static/shared build

Note that by default, only the shared object is compiled. If you would like to generate a static library file, run:

cmake ../ -DLIBTINS_BUILD_SHARED=0

The generated static/shared library files will be located in the build/lib directory.

C++11 support

libtins is noticeably faster if you enable C++11 support. Therefore, if your compiler supports this standard, then you should enable it. In order to do so, use the LIBTINS_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 boost headers 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, use the parameters shown on the CMake FindBoost help

WPA2 decryption

If you want to disable WPA2 decryption support, which will remove openssl as a dependency for compilation, use the LIBTINS_ENABLE_WPA2 switch:

cmake ../ -DLIBTINS_ENABLE_WPA2=0

IEEE 802.11 support

If you want to disable IEEE 802.11 support(this will also disable RadioTap and WPA2 decryption), which will reduce the size of the resulting library in around 20%, use the LIBTINS_ENABLE_DOT11 switch:

cmake ../ -DLIBTINS_ENABLE_DOT11=0

Installing

Once you're done, if you want to install the header files and the shared object, execute as root:

make install

This will install the shared object typically in /usr/local/lib. Note that you might have to update ldconfig's cache before using it, so in 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 sure everything works. In order to do so, you need to follow these steps:

# This will fetch the googletest submodule, needed for tests
git submodule init
git submodule update

mkdir build
cd build

# Use any options you want
cmake .. 

# Compile tests
make tests

# Run them
make test

If you find that any tests fail, please create an ticket in the issue 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 at the contributing file before doing so.

Copyright (c) 2012-2017, Matias Fontanini All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

简介

暂无描述 展开 收起
C 等 3 种语言
BSD-2-Clause
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
C
1
https://gitee.com/kemaflog/libtins.git
git@gitee.com:kemaflog/libtins.git
kemaflog
libtins
libtins
master

搜索帮助