You've already forked script-collection
added wireshark.sh
This commit is contained in:
48
bash/wireshark.sh
Normal file
48
bash/wireshark.sh
Normal file
@@ -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
|
||||
Reference in New Issue
Block a user