From 6c1f9584cc69faaff8e5284a3b9d1f6d153ca89c Mon Sep 17 00:00:00 2001 From: b068931cc450442b63f5b3d276ea4297 <77171083+b068931cc450442b63f5b3d276ea4297@users.noreply.github.com> Date: Mon, 8 Jan 2024 16:32:49 +0100 Subject: [PATCH 01/15] remove comma --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 1ba49a6..1b71b1f 100644 --- a/install.sh +++ b/install.sh @@ -171,7 +171,7 @@ check_dependencies() { "/usr/bin/dig" "/usr/bin/suricata" "/usr/bin/sqlite3" - "/usr/bin/pip3", + "/usr/bin/pip3" "/usr/sbin/arp") echo -e "\e[39m[+] Checking dependencies...\e[39m" From d9327778b8c9b888f0b2982cdd0ca3ceec1d4509 Mon Sep 17 00:00:00 2001 From: b068931cc450442b63f5b3d276ea4297 <77171083+b068931cc450442b63f5b3d276ea4297@users.noreply.github.com> Date: Mon, 8 Jan 2024 17:40:23 +0100 Subject: [PATCH 02/15] venv test --- install.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index 1b71b1f..4adc875 100644 --- a/install.sh +++ b/install.sh @@ -2,6 +2,7 @@ CURRENT_USER="${SUDO_USER}" SCRIPT_PATH="$( cd "$(dirname "$0")" ; pwd -P )" +USER_HOME=$(bash -c "cd ~$(printf %q $CURRENT_USER) && pwd") HOST="$( hostname )" LOCALES=(en fr es ru pt de it) @@ -90,7 +91,7 @@ Description=Spyguard frontend service [Service] Type=simple -ExecStart=/usr/bin/python3 /usr/share/spyguard/server/frontend/main.py +ExecStart=$USER_HOME/spy-venv/bin/python3 /usr/share/spyguard/server/frontend/main.py Restart=on-abort KillMode=process @@ -105,7 +106,7 @@ Description=Spyguard backend service [Service] Type=simple -ExecStart=/usr/bin/python3 /usr/share/spyguard/server/backend/main.py +ExecStart=$USER_HOME/spy-venv/bin/python3 /usr/share/spyguard/server/backend/main.py Restart=on-abort KillMode=process @@ -122,7 +123,7 @@ After=network-online.target [Service] Type=simple -ExecStart=/usr/bin/python3 /usr/share/spyguard/server/backend/watchers.py +ExecStart=$USER_HOME/spy-venv/bin/python3 /usr/share/spyguard/server/backend/watchers.py Restart=on-abort KillMode=process @@ -185,7 +186,7 @@ check_dependencies() { fi done echo -e "\e[39m[+] Install Python packages...\e[39m" - python3 -m pip install -r "$SCRIPT_PATH/assets/requirements.txt" + python3 -m venv $USER_HOME/spy-venv && source $USER_HOME/spy-venv/bin/activate && python3 -m pip install -r "$SCRIPT_PATH/assets/requirements.txt" } get_version() { @@ -248,3 +249,5 @@ else feeding_iocs cleaning fi + + From b0f6067572963aee98203935397e6a1b74206006 Mon Sep 17 00:00:00 2001 From: b068931cc450442b63f5b3d276ea4297 <77171083+b068931cc450442b63f5b3d276ea4297@users.noreply.github.com> Date: Mon, 8 Jan 2024 17:42:29 +0100 Subject: [PATCH 03/15] rename spy to SpyGuard --- install.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index 4adc875..35e561b 100644 --- a/install.sh +++ b/install.sh @@ -91,7 +91,7 @@ Description=Spyguard frontend service [Service] Type=simple -ExecStart=$USER_HOME/spy-venv/bin/python3 /usr/share/spyguard/server/frontend/main.py +ExecStart=$USER_HOME/SpyGuard-venv/bin/python3 /usr/share/spyguard/server/frontend/main.py Restart=on-abort KillMode=process @@ -106,7 +106,7 @@ Description=Spyguard backend service [Service] Type=simple -ExecStart=$USER_HOME/spy-venv/bin/python3 /usr/share/spyguard/server/backend/main.py +ExecStart=$USER_HOME/SpyGuard-venv/bin/python3 /usr/share/spyguard/server/backend/main.py Restart=on-abort KillMode=process @@ -123,7 +123,7 @@ After=network-online.target [Service] Type=simple -ExecStart=$USER_HOME/spy-venv/bin/python3 /usr/share/spyguard/server/backend/watchers.py +ExecStart=$USER_HOME/SpyGuard-venv/bin/python3 /usr/share/spyguard/server/backend/watchers.py Restart=on-abort KillMode=process @@ -186,7 +186,7 @@ check_dependencies() { fi done echo -e "\e[39m[+] Install Python packages...\e[39m" - python3 -m venv $USER_HOME/spy-venv && source $USER_HOME/spy-venv/bin/activate && python3 -m pip install -r "$SCRIPT_PATH/assets/requirements.txt" + python3 -m venv $USER_HOME/SpyGuard-venv && source $USER_HOME/SpyGuard-venv/bin/activate && python3 -m pip install -r "$SCRIPT_PATH/assets/requirements.txt" } get_version() { From d57e5d2cb673e702040d385494b15984153939e7 Mon Sep 17 00:00:00 2001 From: b068931cc450442b63f5b3d276ea4297 <77171083+b068931cc450442b63f5b3d276ea4297@users.noreply.github.com> Date: Mon, 8 Jan 2024 17:49:38 +0100 Subject: [PATCH 04/15] path and uninstall --- install.sh | 9 ++++----- uninstall.sh | 1 + 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/install.sh b/install.sh index 35e561b..a9b87d2 100644 --- a/install.sh +++ b/install.sh @@ -2,7 +2,6 @@ CURRENT_USER="${SUDO_USER}" SCRIPT_PATH="$( cd "$(dirname "$0")" ; pwd -P )" -USER_HOME=$(bash -c "cd ~$(printf %q $CURRENT_USER) && pwd") HOST="$( hostname )" LOCALES=(en fr es ru pt de it) @@ -91,7 +90,7 @@ Description=Spyguard frontend service [Service] Type=simple -ExecStart=$USER_HOME/SpyGuard-venv/bin/python3 /usr/share/spyguard/server/frontend/main.py +ExecStart=/home/${SUDO_USER}/SpyGuard-venv/bin/python3 /usr/share/spyguard/server/frontend/main.py Restart=on-abort KillMode=process @@ -106,7 +105,7 @@ Description=Spyguard backend service [Service] Type=simple -ExecStart=$USER_HOME/SpyGuard-venv/bin/python3 /usr/share/spyguard/server/backend/main.py +ExecStart=/home/${SUDO_USER}/SpyGuard-venv/bin/python3 /usr/share/spyguard/server/backend/main.py Restart=on-abort KillMode=process @@ -123,7 +122,7 @@ After=network-online.target [Service] Type=simple -ExecStart=$USER_HOME/SpyGuard-venv/bin/python3 /usr/share/spyguard/server/backend/watchers.py +ExecStart=/home/${SUDO_USER}/SpyGuard-venv/bin/python3 /usr/share/spyguard/server/backend/watchers.py Restart=on-abort KillMode=process @@ -186,7 +185,7 @@ check_dependencies() { fi done echo -e "\e[39m[+] Install Python packages...\e[39m" - python3 -m venv $USER_HOME/SpyGuard-venv && source $USER_HOME/SpyGuard-venv/bin/activate && python3 -m pip install -r "$SCRIPT_PATH/assets/requirements.txt" + python3 -m venv /home/${SUDO_USER}/SpyGuard-venv && source /home/${SUDO_USER}/SpyGuard-venv/bin/activate && python3 -m pip install -r "$SCRIPT_PATH/assets/requirements.txt" } get_version() { diff --git a/uninstall.sh b/uninstall.sh index 8f04401..a4d42bb 100755 --- a/uninstall.sh +++ b/uninstall.sh @@ -2,6 +2,7 @@ delete_folder(){ echo "[+] Deleting Spyguard folders" rm -rf /usr/share/spyguard/ + rm -rf /home/${SUDO_USER}/SpyGuard-venv } delete_services(){ From 227dd98e0f9cceda00be19838c8de29bf5d3bebf Mon Sep 17 00:00:00 2001 From: b068931cc450442b63f5b3d276ea4297 <77171083+b068931cc450442b63f5b3d276ea4297@users.noreply.github.com> Date: Tue, 9 Jan 2024 12:45:23 +0100 Subject: [PATCH 05/15] venv to /usr/share/spyguard/spyguard-venv --- install.sh | 8 ++++---- uninstall.sh | 1 - 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/install.sh b/install.sh index a9b87d2..682789a 100644 --- a/install.sh +++ b/install.sh @@ -90,7 +90,7 @@ Description=Spyguard frontend service [Service] Type=simple -ExecStart=/home/${SUDO_USER}/SpyGuard-venv/bin/python3 /usr/share/spyguard/server/frontend/main.py +ExecStart=/usr/share/spyguard/spyguard-venv/bin/python3 /usr/share/spyguard/server/frontend/main.py Restart=on-abort KillMode=process @@ -105,7 +105,7 @@ Description=Spyguard backend service [Service] Type=simple -ExecStart=/home/${SUDO_USER}/SpyGuard-venv/bin/python3 /usr/share/spyguard/server/backend/main.py +ExecStart=/usr/share/spyguard/spyguard-venv/bin/python3 /usr/share/spyguard/server/backend/main.py Restart=on-abort KillMode=process @@ -122,7 +122,7 @@ After=network-online.target [Service] Type=simple -ExecStart=/home/${SUDO_USER}/SpyGuard-venv/bin/python3 /usr/share/spyguard/server/backend/watchers.py +ExecStart=/usr/share/spyguard/spyguard-venv/bin/python3 /usr/share/spyguard/server/backend/watchers.py Restart=on-abort KillMode=process @@ -185,7 +185,7 @@ check_dependencies() { fi done echo -e "\e[39m[+] Install Python packages...\e[39m" - python3 -m venv /home/${SUDO_USER}/SpyGuard-venv && source /home/${SUDO_USER}/SpyGuard-venv/bin/activate && python3 -m pip install -r "$SCRIPT_PATH/assets/requirements.txt" + python3 -m venv /usr/share/spyguard/spyguard-venv && source /usr/share/spyguard/spyguard-venv/bin/activate && python3 -m pip install -r "$SCRIPT_PATH/assets/requirements.txt" } get_version() { diff --git a/uninstall.sh b/uninstall.sh index a4d42bb..8f04401 100755 --- a/uninstall.sh +++ b/uninstall.sh @@ -2,7 +2,6 @@ delete_folder(){ echo "[+] Deleting Spyguard folders" rm -rf /usr/share/spyguard/ - rm -rf /home/${SUDO_USER}/SpyGuard-venv } delete_services(){ From 6d7c86dfdb408514fd31cad244f15ab08182ee7c Mon Sep 17 00:00:00 2001 From: b068931cc450442b63f5b3d276ea4297 <77171083+b068931cc450442b63f5b3d276ea4297@users.noreply.github.com> Date: Wed, 10 Jan 2024 18:40:16 +0100 Subject: [PATCH 06/15] echo for venv --- install.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 682789a..71a146f 100644 --- a/install.sh +++ b/install.sh @@ -184,8 +184,11 @@ check_dependencies() { install_package ${bin##*/} fi done + echo -e "\e[39m[+] Create and activate Virtual Environment for Python packages\e[39m" + python3 -m venv /usr/share/spyguard/spyguard-venv + source /usr/share/spyguard/spyguard-venv/bin/activate echo -e "\e[39m[+] Install Python packages...\e[39m" - python3 -m venv /usr/share/spyguard/spyguard-venv && source /usr/share/spyguard/spyguard-venv/bin/activate && python3 -m pip install -r "$SCRIPT_PATH/assets/requirements.txt" + python3 -m pip install -r "$SCRIPT_PATH/assets/requirements.txt" } get_version() { From 20925f3c1fd78ff449623a8bb86be3f92ec4f0fa Mon Sep 17 00:00:00 2001 From: b068931cc450442b63f5b3d276ea4297 <77171083+b068931cc450442b63f5b3d276ea4297@users.noreply.github.com> Date: Fri, 12 Jan 2024 15:30:52 +0100 Subject: [PATCH 07/15] no cache dir for venv/pip --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 71a146f..9135bb1 100644 --- a/install.sh +++ b/install.sh @@ -188,7 +188,7 @@ check_dependencies() { python3 -m venv /usr/share/spyguard/spyguard-venv source /usr/share/spyguard/spyguard-venv/bin/activate echo -e "\e[39m[+] Install Python packages...\e[39m" - python3 -m pip install -r "$SCRIPT_PATH/assets/requirements.txt" + python3 -m pip install -r "$SCRIPT_PATH/assets/requirements.txt" --no-cache-dir } get_version() { From 3d18d7ba135ab2eee17b5676afdf610b4aff2fea Mon Sep 17 00:00:00 2001 From: b068931cc450442b63f5b3d276ea4297 <77171083+b068931cc450442b63f5b3d276ea4297@users.noreply.github.com> Date: Mon, 15 Jan 2024 22:47:33 +0100 Subject: [PATCH 08/15] consistent spelling of SpyGuard for install, uninstall and update --- install.sh | 4 ++-- uninstall.sh | 4 ++-- update.sh | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/install.sh b/install.sh index 9135bb1..3683ebd 100644 --- a/install.sh +++ b/install.sh @@ -66,8 +66,8 @@ set_credentials() { } create_directory() { - # Create the Spyguard directory and move the whole stuff there. - echo -e "[+] Creating Spyguard folder under /usr/share/" + # Create the SpyGuard directory and move the whole stuff there. + echo -e "[+] Creating SpyGuard folder under /usr/share/" mkdir /usr/share/spyguard cp -Rf ./* /usr/share/spyguard } diff --git a/uninstall.sh b/uninstall.sh index 8f04401..4c8bf63 100755 --- a/uninstall.sh +++ b/uninstall.sh @@ -1,11 +1,11 @@ delete_folder(){ - echo "[+] Deleting Spyguard folders" + echo "[+] Deleting SpyGuard folders" rm -rf /usr/share/spyguard/ } delete_services(){ - echo "[+] Deleting Spyguard services" + echo "[+] Deleting SpyGuard services" systemctl disable spyguard-frontend &> /dev/null systemctl disable spyguard-backend &> /dev/null diff --git a/update.sh b/update.sh index bd0cd31..06ada8c 100755 --- a/update.sh +++ b/update.sh @@ -11,7 +11,7 @@ if [ $PWD = "/usr/share/spyguard" ]; then cd /tmp/spyguard && bash update.sh elif [ $PWD = "/tmp/spyguard" ]; then - echo "[+] Saving spyguard backend's SSL configuration in /tmp/" + echo "[+] Saving SpyGuard backend's SSL configuration in /tmp/" mv /usr/share/spyguard/server/backend/*.pem /tmp/ echo "[+] Deleting the current SpyGuard folders and files." @@ -48,4 +48,4 @@ elif [ $PWD = "/tmp/spyguard" ]; then cd /tmp/spyguard && git tag | tail -n 1 | xargs echo -n > /usr/share/spyguard/VERSION echo "[+] SpyGuard updated!" -fi \ No newline at end of file +fi From 272502473bbaf77b6140576a910e2bb8331f1700 Mon Sep 17 00:00:00 2001 From: b068931cc450442b63f5b3d276ea4297 <77171083+b068931cc450442b63f5b3d276ea4297@users.noreply.github.com> Date: Mon, 15 Jan 2024 23:25:04 +0100 Subject: [PATCH 09/15] fix autoremove for uninstall.sh --- install.sh | 12 ++++----- uninstall.sh | 6 ++--- uninstall.sh.save | 65 +++++++++++++++++++++++++++++++++++++++++++++++ update.sh | 2 +- 4 files changed, 74 insertions(+), 11 deletions(-) create mode 100755 uninstall.sh.save diff --git a/install.sh b/install.sh index 3683ebd..8b525eb 100644 --- a/install.sh +++ b/install.sh @@ -7,11 +7,11 @@ LOCALES=(en fr es ru pt de it) welcome_screen() { cat << "EOF" - __ _ __ _ _ - (_ |_) \_/ /__ | | /\ |_) | \ - __) | | \_| |_| /--\ | \ |_/ - -SpyGuard is a fork of TinyCheck, developped by Kaspersky. + __ _ __ _ _ + (_ |_) \_/ /__ | | /\ |_) | \ + __) | | \_| |_| /--\ | \ |_/ + +SpyGuard is a fork of TinyCheck, developped by Kaspersky. ----- EOF @@ -251,5 +251,3 @@ else feeding_iocs cleaning fi - - diff --git a/uninstall.sh b/uninstall.sh index 4c8bf63..1b93c54 100755 --- a/uninstall.sh +++ b/uninstall.sh @@ -26,17 +26,17 @@ delete_packages(){ "dnsutils" "suricata" "sqlite3") - + echo -n "[?] Do you want to remove the installed packages? (Yes/no) " read answer if [[ "$answer" =~ ^([yY][eE][sS]|[yY])$ ]] then for pkg in "${pkgs[@]}" - do + do apt -y remove $pkg && apt -y purge $pkg done fi - apt autoremove &> /dev/null + apt autoremove &> /dev/null -y } update_hostname(){ diff --git a/uninstall.sh.save b/uninstall.sh.save new file mode 100755 index 0000000..cd24983 --- /dev/null +++ b/uninstall.sh.save @@ -0,0 +1,65 @@ + +delete_folder(){ + echo "[+] Deleting SpyGuard folders" + rm -rf /usr/share/spyguard/ +} + +delete_services(){ + echo "[+] Deleting SpyGuard services" + + systemctl disable spyguard-frontend &> /dev/null + systemctl disable spyguard-backend &> /dev/null + systemctl disable spyguard-watchers &> /dev/null + + rm /lib/systemd/system/spyguard-frontend.service + rm /lib/systemd/system/spyguard-backend.service + rm /lib/systemd/system/spyguard-watchers.service +} + +deleting_icon(){ + echo "[+] Deleting desktop icon" + rm "/home/${SUDO_USER}/Desktop/spyguard.desktop" +} + +delete_packages(){ + pkgs=("tshark" + "dnsutils" + "suricata" + "sqlite3") + + echo -n "[?] Do you want to remove the installed packages? (Yes/no) " + read answer + if [[ "$answer" =~ ^([yY][eE][sS]|[yY])$ ]] + then + for pkg in "${pkgs[@]}" + do apt -y remove $pkg && apt -y purge $pkg + done + apt autoremove &> /dev/null + fi +} + +update_hostname(){ + echo -n "[?] Please provide a new hostname: " + read hostname + echo "$hostname" > /etc/hostname + sed -i "s/spyguard/$hostname/g" /etc/hosts +} + +reboot_box() { + echo -e "\e[92m[+] SpyGuard uninstalled, let's reboot.\e[39m" + sleep 5 + reboot +} + +# Checking rights. +if [[ $EUID -ne 0 ]]; then + echo "The update must be run as root. Type in 'sudo bash $0' to run it as root." + exit 1 +else + delete_folder + delete_services + deleting_icon + update_hostname + delete_packages + reboot_box +fi diff --git a/update.sh b/update.sh index 06ada8c..cb68452 100755 --- a/update.sh +++ b/update.sh @@ -6,7 +6,7 @@ fi if [ $PWD = "/usr/share/spyguard" ]; then echo "[+] Cloning the current repository to /tmp/" - rm -rf /tmp/spyguard/ &> /dev/null + rm -rf /tmp/spyguard/ &> /dev/null cd /tmp/ && git clone https://github.com/SpyGuard/spyguard cd /tmp/spyguard && bash update.sh elif [ $PWD = "/tmp/spyguard" ]; then From c01d09ae6d2ed201084ed9af0e7f9d558b6e2734 Mon Sep 17 00:00:00 2001 From: b068931cc450442b63f5b3d276ea4297 <77171083+b068931cc450442b63f5b3d276ea4297@users.noreply.github.com> Date: Tue, 16 Jan 2024 14:51:32 +0100 Subject: [PATCH 10/15] sort locales a-z --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 8b525eb..47c712d 100644 --- a/install.sh +++ b/install.sh @@ -3,7 +3,7 @@ CURRENT_USER="${SUDO_USER}" SCRIPT_PATH="$( cd "$(dirname "$0")" ; pwd -P )" HOST="$( hostname )" -LOCALES=(en fr es ru pt de it) +LOCALES=(de en es fr it pt ru) welcome_screen() { cat << "EOF" From c798363e140adeb24980bbb554fba19768c9f387 Mon Sep 17 00:00:00 2001 From: b068931cc450442b63f5b3d276ea4297 <77171083+b068931cc450442b63f5b3d276ea4297@users.noreply.github.com> Date: Tue, 16 Jan 2024 15:21:12 +0100 Subject: [PATCH 11/15] remove desktop icon in uninstall.sh because there is none in install.sh --- uninstall.sh | 5 ----- 1 file changed, 5 deletions(-) diff --git a/uninstall.sh b/uninstall.sh index 1b93c54..01bea02 100755 --- a/uninstall.sh +++ b/uninstall.sh @@ -16,11 +16,6 @@ delete_services(){ rm /lib/systemd/system/spyguard-watchers.service } -deleting_icon(){ - echo "[+] Deleting desktop icon" - rm "/home/${SUDO_USER}/Desktop/spyguard.desktop" -} - delete_packages(){ pkgs=("tshark" "dnsutils" From eb4112c91204e553e1758d301b845351bd1cc849 Mon Sep 17 00:00:00 2001 From: b068931cc450442b63f5b3d276ea4297 <77171083+b068931cc450442b63f5b3d276ea4297@users.noreply.github.com> Date: Wed, 17 Jan 2024 11:57:42 +0100 Subject: [PATCH 12/15] fix commit c798363 --- uninstall.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/uninstall.sh b/uninstall.sh index 01bea02..4d662e8 100755 --- a/uninstall.sh +++ b/uninstall.sh @@ -54,7 +54,6 @@ if [[ $EUID -ne 0 ]]; then else delete_folder delete_services - deleting_icon update_hostname delete_packages reboot_box From 50f786dda4ed6b6393c45a76fcca77f130810474 Mon Sep 17 00:00:00 2001 From: b068931cc450442b63f5b3d276ea4297 <77171083+b068931cc450442b63f5b3d276ea4297@users.noreply.github.com> Date: Wed, 17 Jan 2024 12:33:59 +0100 Subject: [PATCH 13/15] remove suricata log files @uninstall --- uninstall.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/uninstall.sh b/uninstall.sh index 4d662e8..0710a0a 100755 --- a/uninstall.sh +++ b/uninstall.sh @@ -26,6 +26,7 @@ delete_packages(){ read answer if [[ "$answer" =~ ^([yY][eE][sS]|[yY])$ ]] then + rm -rf /var/log/suricata for pkg in "${pkgs[@]}" do apt -y remove $pkg && apt -y purge $pkg From fa50147d967b1bf5ecf596319fe2d126e9233d5b Mon Sep 17 00:00:00 2001 From: b068931cc450442b63f5b3d276ea4297 <77171083+b068931cc450442b63f5b3d276ea4297@users.noreply.github.com> Date: Wed, 17 Jan 2024 16:12:43 +0100 Subject: [PATCH 14/15] remove file --- assets/requirements.txt | 4 +-- uninstall.sh.save | 65 ----------------------------------------- 2 files changed, 2 insertions(+), 67 deletions(-) delete mode 100755 uninstall.sh.save diff --git a/assets/requirements.txt b/assets/requirements.txt index b528652..4942622 100755 --- a/assets/requirements.txt +++ b/assets/requirements.txt @@ -2,10 +2,10 @@ ipwhois==1.2.0 pydig==0.4.0 pymisp==2.4.165.1 netaddr==0.8.0 -pyyaml==5.3.1 +pyyaml==6.0.1 flask==2.3.3 flask_httpauth==4.7.0 -pyjwt==1.7.1 +pyjwt==2.8.0 sqlalchemy==1.4.44 psutil==5.8.0 pyudev==0.24.0 diff --git a/uninstall.sh.save b/uninstall.sh.save deleted file mode 100755 index cd24983..0000000 --- a/uninstall.sh.save +++ /dev/null @@ -1,65 +0,0 @@ - -delete_folder(){ - echo "[+] Deleting SpyGuard folders" - rm -rf /usr/share/spyguard/ -} - -delete_services(){ - echo "[+] Deleting SpyGuard services" - - systemctl disable spyguard-frontend &> /dev/null - systemctl disable spyguard-backend &> /dev/null - systemctl disable spyguard-watchers &> /dev/null - - rm /lib/systemd/system/spyguard-frontend.service - rm /lib/systemd/system/spyguard-backend.service - rm /lib/systemd/system/spyguard-watchers.service -} - -deleting_icon(){ - echo "[+] Deleting desktop icon" - rm "/home/${SUDO_USER}/Desktop/spyguard.desktop" -} - -delete_packages(){ - pkgs=("tshark" - "dnsutils" - "suricata" - "sqlite3") - - echo -n "[?] Do you want to remove the installed packages? (Yes/no) " - read answer - if [[ "$answer" =~ ^([yY][eE][sS]|[yY])$ ]] - then - for pkg in "${pkgs[@]}" - do apt -y remove $pkg && apt -y purge $pkg - done - apt autoremove &> /dev/null - fi -} - -update_hostname(){ - echo -n "[?] Please provide a new hostname: " - read hostname - echo "$hostname" > /etc/hostname - sed -i "s/spyguard/$hostname/g" /etc/hosts -} - -reboot_box() { - echo -e "\e[92m[+] SpyGuard uninstalled, let's reboot.\e[39m" - sleep 5 - reboot -} - -# Checking rights. -if [[ $EUID -ne 0 ]]; then - echo "The update must be run as root. Type in 'sudo bash $0' to run it as root." - exit 1 -else - delete_folder - delete_services - deleting_icon - update_hostname - delete_packages - reboot_box -fi From 72510051b838c3eba637880cc30536ab1b37a9e0 Mon Sep 17 00:00:00 2001 From: b068931cc450442b63f5b3d276ea4297 <77171083+b068931cc450442b63f5b3d276ea4297@users.noreply.github.com> Date: Fri, 19 Jan 2024 16:07:42 +0100 Subject: [PATCH 15/15] Changes to the requirements.txt are initially undone. --- assets/requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/requirements.txt b/assets/requirements.txt index 4942622..b528652 100755 --- a/assets/requirements.txt +++ b/assets/requirements.txt @@ -2,10 +2,10 @@ ipwhois==1.2.0 pydig==0.4.0 pymisp==2.4.165.1 netaddr==0.8.0 -pyyaml==6.0.1 +pyyaml==5.3.1 flask==2.3.3 flask_httpauth==4.7.0 -pyjwt==2.8.0 +pyjwt==1.7.1 sqlalchemy==1.4.44 psutil==5.8.0 pyudev==0.24.0