-
-
Save Chapoly1305/b15f8ffd38b792844e8140159fcd6c9d to your computer and use it in GitHub Desktop.
BUILD WIRESHARK ON UBUNTU OR DEBIAN
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# This shell script is made by SyneArt <[email protected]> | |
####################################### | |
# BUILD WIRESHARK ON UBUNTU OR DEBIAN # | |
####################################### | |
# | THIS SCRIPT IS TESTED CORRECTLY ON | | |
# |----------------------------------------------------------| | |
# | OS | Wireshark | Test | Last test | | |
# |--------------------|----------------|------|-------------| | |
# | Ubuntu 24.04 (Dev) | Commit:73c7fca | OK | 29 Jan 2024 | | |
# | Ubuntu 22.04.2 LTS | Commit:73c7fca | OK | 29 Jan 2024 | | |
# | Ubuntu 20.04.6 LTS | Commit:73c7fca | OK | 29 Jan 2024 | | |
# | Ubuntu 18.04.6 LTS | Commit:73c7fca | OK | 28 Jan 2024 | | |
# | Debian 12.4 | Commit:73c7fca | OK | 29 Jan 2024 | | |
# | Debian 11.8 | Commit:73c7fca | OK | 29 Jan 2024 | | |
# 1. KEEP UBUNTU OR DEBIAN 's apt-cache UP TO DATE | |
sudo apt-get update | |
export DEBIAN_FRONTEND=noninteractive | |
ln -fs /usr/share/zoneinfo/$(wget -qO - http://ip-api.com/line?fields=timezone) /etc/localtime | |
sudo apt-get install -y tzdata | |
# 2. INSTALL THE DEPENDENCIES | |
sudo apt-get install -y build-essential git cmake | |
# CMake3 | |
sudo apt-get install -y cmake3 | |
# CMake 3.13 or higher is required for Wireshark now | |
dpkg --compare-versions `cmake --version | head -1 | cut -f3 -d" "` lt 3.13 && { | |
sudo apt install -y software-properties-common | |
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | sudo apt-key add - | |
sudo apt-add-repository -y 'deb https://apt.kitware.com/ubuntu/ bionic main' | |
sudo apt install -y cmake | |
} | |
# GUI | |
sudo apt-get install -y qttools5-dev qttools5-dev-tools libqt5svg5-dev qtmultimedia5-dev | |
sudo apt-get install -y qt6-base-dev qt6-multimedia-dev qt6-tools-dev qt6-tools-dev-tools qt6-l10n-tools libqt6core5compat6-dev | |
# check qt6 backports, if need | |
apt-cache search qt6-multimedia-dev | grep qt6 >/dev/null || { | |
[ -e /etc/debian_version ] && { | |
# Debian bullseye-backports | |
# https://packages.debian.org/bullseye-backports/ | |
echo "deb http://deb.debian.org/debian bullseye-backports main contrib non-free" | sudo tee -a /etc/apt/sources.list | |
sudo apt-get update | |
sudo apt install -y qt6-base-dev qt6-tools-dev qt6-tools-dev-tools qt6-l10n-tools qt6-5compat-dev -t bullseye-backports | |
} || { | |
# Ubuntu qt6-backports | |
# https://launchpad.net/~okirby/+archive/ubuntu/qt6-testing | |
sudo apt install -y software-properties-common | |
sudo add-apt-repository ppa:okirby/qt6-backports -y | |
sudo apt install -y libgl1-mesa-dev | |
sudo apt install -y qt6-base-dev qt6-tools-dev qt6-tools-dev-tools qt6-l10n-tools libqt6core5compat6-dev | |
} | |
} | |
# PCAP | |
sudo apt-get install -y libpcap-dev | |
# Dev file (On Ubuntu 20.04) | |
sudo apt-get install -y libc-ares-dev | |
# CRYPT | |
sudo apt-get install -y libgcrypt20-dev | |
# GLIB2 | |
sudo apt-get install -y libglib2.0-dev | |
# LEX & YACC | |
sudo apt-get install -y flex bison | |
# PCRE2 (On Ubuntu 18.04) | |
sudo apt-get install -y libpcre2-dev | |
# HTTP/2 protocol (Ubuntu >= 16.04) | |
sudo apt-get install -y libnghttp2-dev | |
# HTTP/3 protocol (Ubuntu >= 22.04) | |
sudo apt-get install -y libnghttp3-dev | |
# SpeexDSP | |
sudo apt-get install -y libspeexdsp-dev | |
# 3. BUILD THE WIRESHARK | |
git clone https://github.com/wireshark/wireshark ~/wireshark | |
cd ~/wireshark | |
sed -i '15 a #include <stdint.h>' capture/capture_ifinfo.h | |
mkdir build | |
cd build | |
cmake ../ | |
make -j`nproc` && { | |
echo "\nBuild Success!" | |
echo "You can execute the Wireshark by command \"sudo ./wireshark\"" | |
echo "at \"`pwd`/run\"" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# This shell script is made by SyneArt <[email protected]> | |
####################################### | |
# BUILD WIRESHARK ON UBUNTU OR DEBIAN # | |
####################################### | |
# | THIS SCRIPT IS TESTED CORRECTLY ON | | |
# |------------------------------------------------------| | |
# | OS | Wireshark | Test | Last test | | |
# |----------------|----------------|------|-------------| | |
# | Ubuntu 20.04.1 | Commit:a679ae6 | OK | 05 Nov 2020 | | |
# | Ubuntu 18.04.1 | Commit:a679ae6 | OK | 20 Nov 2018 | | |
# | Ubuntu 16.04.5 | Commit:a679ae6 | OK | 20 Nov 2018 | | |
# | Ubuntu 14.04.5 | Commit:a679ae6 | OK | 20 Nov 2018 | | |
# | Debian 9.6 | Commit:a679ae6 | OK | 20 Nov 2018 | | |
# 1. KEEP UBUNTU OR DEBIAN 's apt-cache UP TO DATE | |
sudo apt-get update | |
export DEBIAN_FRONTEND=noninteractive | |
ln -fs /usr/share/zoneinfo/$(wget -qO - http://ip-api.com/line?fields=timezone) /etc/localtime | |
sudo apt-get install -y tzdata | |
# 2. INSTALL THE DEPENDENCIES | |
sudo apt-get install -y build-essential git cmake | |
# CMAKE3 | |
sudo apt-get install -y cmake3 | |
# GUI | |
sudo apt-get install -y qttools5-dev qttools5-dev-tools libqt5svg5-dev qtmultimedia5-dev | |
# PCAP | |
sudo apt-get install -y libpcap-dev | |
# Dev file (On Ubuntu 20.04) | |
sudo apt-get install -y libc-ares-dev | |
# CRYPT | |
sudo apt-get install -y libgcrypt20-dev | |
# GLIB2 | |
sudo apt-get install -y libglib2.0-dev | |
# LEX & YACC | |
sudo apt-get install -y flex bison | |
# 3. BUILD THE WIRESHARK | |
git clone https://github.com/wireshark/wireshark ~/wireshark_f1ap_r15_2_1 | |
cd ~/wireshark_f1ap_r15_2_1 | |
git checkout a679ae6 # F1AP R15.2.1 | |
mkdir build | |
cd build | |
cmake -DDISABLE_WERROR=true ../ # g++ | |
make -j`nproc` && { | |
echo "\nBuild Success!" | |
echo "You can execute the Wireshark by command \"sudo ./wireshark\"" | |
echo "at \"`pwd`/run\"" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment