Automatically detect distro.

This commit is contained in:
Kaj Forney 2018-09-07 15:28:03 -06:00
parent 190f610ae1
commit 90665d0e30

View file

@ -13,9 +13,7 @@ fi
whiptail --backtitle "Pentest Build Script" --title "Welcome" --msgbox "This script will help you build a custom pentesting distribution." 7 70
DISTRO=$(whiptail --backtitle "Pentest Build Script" --title "Distribution" --menu "Choose a distribution:" 10 40 2 \
"KALI" "Kali Linux" \
"PARROT" "Parrot Security OS" 3>&1 1>&2 2>&3)
DISTRO=$(lsb_release -i -s)
DESKTOP=$(whiptail --backtitle "Pentest Build Script" --title "Desktop Environment" --menu "Choose a desktop environment:" 10 40 4 \
"gnome" "GNOME" \
@ -41,7 +39,7 @@ mkdir build
apt install git build-essential cdebootstrap live-build curl wget
case $DISTRO in
KALI)
Kali)
cp -rv ./modules/live-build-config ./build/
mkdir ./build/live-build-config/kali-config/variant-$DESKTOP/packages.chroot
cp ./debs/*.deb build/live-build-config/kali-config/variant-$DESKTOP/packages.chroot/
@ -55,7 +53,7 @@ KALI)
whiptail --backtitle "Pentest Build Script" --title "Finished" --msgbox "Fingers crossed there were no errors... Your image should be done!" 7 70
exit 0
;;
PARROT)
Parrot)
cp -rv ./modules/parrot-build ./build/
mkdir ./build/parrot-build/templates/parrot-variant-$DESKTOP/packages.chroot
cp ./debs/*.deb build/parrot-build/templates/parrot-variant-$DESKTOP/packages.chroot/