From dff3c279c9d04d936b65b35ac220a30f117ad749 Mon Sep 17 00:00:00 2001 From: "calvin.house" Date: Sun, 15 Mar 2026 16:13:10 +0000 Subject: [PATCH] added wireshark.sh --- bash/wireshark.sh | 48 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 bash/wireshark.sh diff --git a/bash/wireshark.sh b/bash/wireshark.sh new file mode 100644 index 0000000..8acab6f --- /dev/null +++ b/bash/wireshark.sh @@ -0,0 +1,48 @@ +#!/bin/bash +#set -xv +clear +echo "This script will install Wireshark using the ID" +echo "found in the /etc/os-release file. Currently, Fedora," +echo "Ubuntu, Debian, and Arch are supported with this script." +echo "Feel free to edit it as needed." + +DISTRO_ID=$(grep -i ^ID /etc/os-release | cut -c 4- | tr -d \") +read -p "Enter username: " USE + +case "$DISTRO_ID" in + [uU]buntu|[dD]ebian) + + echo "Will now install and configure Wireshark" + echo "Press [Enter] to continue..." + apt install -y wireshark && gpasswd -a $USE wireshark + chgrp wireshark /usr/bin/dumpcap + chmod 755 /usr/bin/dumpcap + setcap cap_net_raw,cap_net_admin=eip /usr/bin/dumpcap + echo "Rebooting to allow user to see network interfaces" + + ;; + + [aA]rch) + + echo "Will now install and configure Wireshark" + echo "Press [Enter] to continue..." + pacman -S wireshark-qt wireshark-cli && gpasswd -a $USE wireshark + echo "Rebooting to allow user to see network interfaces" + + ;; + + [fF]edora|[cC]entos|[rR]hel) + echo "Will now install and configure Wireshark" + echo "Press [Enter] to continue..." + dnf install wireshark -y && gpasswd -a $USE wireshark + echo "Rebooting to allow user to see network interfaces" + + ;; + *) + + echo "Unknown OS.." + exit 0 + + ;; + +esac