Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Matheus-Garbelini/915ecbc9909ebf840afac0a3777df088 to your computer and use it in GitHub Desktop.
Save Matheus-Garbelini/915ecbc9909ebf840afac0a3777df088 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
sudo apt install -y build-essential git python3-dev libnl-genl-3-dev bison flex kmod linux-headers-$(uname -r)
sudo python3 -m pip install cmake ninja -U
mkdir -p ~/github && cd ~/github
# Install PF Ring
git clone https://github.com/ntop/PF_RING --depth=1 && cd PF_RING
cd kernel && make
sudo make install
sudo modprobe pf_ring
cd ../userland/ && make
sudo make install && sudo ldconfig
# Install PcapPlusPlus
cd ~/github
git clone https://github.com/seladb/PcapPlusPlus --depth=1
cd PcapPlusPlus && mkdir -p build && cd build
cmake ../ -G Ninja -DPCAPPP_BUILD_TESTS=OFF -DPCAPPP_ENABLE_PCAP_IMMEDIATE_MODE=ON \
-DPCAPPP_ENABLE_PCAP_SET_DIRECTION=OFF -DPCAPPP_USE_PF_RING=ON -DPF_RING_ROOT=$HOME/github/PF_RING
sudo ninja install && sudo ldconfig
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment