Skip to content

Instantly share code, notes, and snippets.

@carlos-jenkins
Created October 3, 2017 22:54
Show Gist options
  • Save carlos-jenkins/651886c77b6b729a593ed2a598ca0714 to your computer and use it in GitHub Desktop.
Save carlos-jenkins/651886c77b6b729a593ed2a598ca0714 to your computer and use it in GitHub Desktop.
Install recent libtins and libpcap
#!/usr/bin/env bash
apt-get update && apt-get install -y --no-install-recommends libssl-dev flex bison && \
echo "Downloading libpcap" && \
cd /tmp && curl http://www.tcpdump.org/release/libpcap-1.7.4.tar.gz -o libpcap.tar.gz && \
tar -xf libpcap.tar.gz && cd /tmp/libpcap* && \
echo "Building libpcap" && \
./configure && make && \
echo "Installing libpcap" && \
make install && \
echo "Cleaning up libpcap" && \
cd /tmp && \
rm -rf /tmp/libpcap* && \
echo "Downloading libtins" && \
git clone -b master --single-branch https://github.com/mfontanini/libtins.git && \
cd /tmp/libtins && git reset --hard 4b0976571ec5768ccde12ae3d6d53db8fee5a7a4 && \
echo "Building libtins" && \
mkdir build && cd build && \
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DLIBTINS_ENABLE_CXX11=1 .. && \
echo "Installing libtins" && \
make install && \
echo "Cleaning up libtins" && \
cd /tmp && \
rm -rf /tmp/libtins && \
echo "Reloading libraries" && \
ldconfig
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment