From 850e4184cc3105e2bc708bbbdf321b0fa4cb0b14 Mon Sep 17 00:00:00 2001 From: JohnnyRevay <65253638+jan-revay@users.noreply.github.com> Date: Mon, 16 Oct 2023 21:36:15 +0200 Subject: [PATCH] Add Kali Linux support --- Kali_latest_TUI/README.md | 0 Kali_latest_TUI/run_all.sh | 38 ++++++++++++++++++++++++++++++++++++++ Windows_10/wsl_install.ps1 | 2 ++ run_init.sh | 1 + 4 files changed, 41 insertions(+) create mode 100644 Kali_latest_TUI/README.md create mode 100644 Kali_latest_TUI/run_all.sh diff --git a/Kali_latest_TUI/README.md b/Kali_latest_TUI/README.md new file mode 100644 index 000000000..e69de29bb diff --git a/Kali_latest_TUI/run_all.sh b/Kali_latest_TUI/run_all.sh new file mode 100644 index 000000000..5882241bc --- /dev/null +++ b/Kali_latest_TUI/run_all.sh @@ -0,0 +1,38 @@ +#!/bin/bash -x +# BASE IMAGE: Kali Linux rolling (latest) +# The script should not require any user input and should be idempotent. + +. ../prelude.sh + +# TODO - make this a function, use variables, execute os-release as a script +if ! grep 'PRETTY_NAME="Kali GNU/Linux Rolling"' /etc/os-release; then + echo 'Error: The base image does not match "Kali GNU/Linux Rolling"! Aborting.' + exit ${EXIT_INCORRECT_PLATFORM} +fi + +# TODO remove resp. rename the script directory +# if ! uname -r | grep "WSL2"; then +# echo "Warning: The base image probably does not run in WSL." +# exit 2 +# fi + +if gnome-extensions --version; then + # TODO - Kali desktop installer + echo 'Use Kali Desktop installer (TODO)' + echo 'This script is targeted only to CLI installations' + exit ${EXIT_INCORRECT_PLATFORM} +fi + +# Run stuff that requires user input first (if not turned off by `--noninteractive`) +. ../WSL_Ubuntu_22.04/interactive_part.sh + +# Let's try to keep the Ubuntu install script Debian compatible + +. ../WSL_Ubuntu_22.04/packages_install.sh + +. ../WSL_Ubuntu_22.04/configs_install.sh + +# TODO create kali_specific_packages.sh +. debian_specific_packages.sh # last, because some packages are built from source + +# . ../WSL_Ubuntu_22.04/packages_install_optional.sh diff --git a/Windows_10/wsl_install.ps1 b/Windows_10/wsl_install.ps1 index 15c535b76..511de4665 100644 --- a/Windows_10/wsl_install.ps1 +++ b/Windows_10/wsl_install.ps1 @@ -22,4 +22,6 @@ wsl --install --distribution Debian --no-launch # TODO add remaining WSL setup here (e.g. mounting of Windows FS) # - wsl - mount windows FS there? +# TODO - try installing WSL distros via winget (maybe it will be less interactive) +# TODO add Kali linux WSL Set-PSDebug -Trace 0 diff --git a/run_init.sh b/run_init.sh index 4fab20cf9..77f75f2a3 100755 --- a/run_init.sh +++ b/run_init.sh @@ -38,6 +38,7 @@ try_platform "WSL_Debian_12" "$1" try_platform "Ubuntu_22.04" "$1" try_platform "PopOS_22.04" "$1" try_platform "Android_13" "$1" +try_platform "Kali_latest_TUI" "$1" echo -e "${RED}run_init.sh: Fatal error - Unsupported platform " \ "- no supported platform detected.${NC}" \