Move hook to config folder.

Former-commit-id: 3a9bb95ba51c0f14303969d53c6e51e6ff9f319e
Former-commit-id: b1f759ff281a060a67d5b130590254996bd0e677
This commit is contained in:
Kaj Forney 2018-10-18 18:01:16 -06:00
parent badc282479
commit bb7198406b
6 changed files with 18 additions and 29 deletions

View file

@ -5,13 +5,14 @@ This script automates the process of building the most common pentesting Linux d
## Running ## Running
Just clone the repository, then make whatever changes you wish to make. Just clone the repository, then make whatever changes you wish to make.
* .deb files in the debs/ folder will be installed into the image. * Add any .deb files to the debs/ folder that you want installed into the image.
* Files in the filesystem/ folder will be copied to the system. * Add any files to the filesystem/ folder that you want on the final system.
* Add any extra software from the repository you wish to install to the config/software.list.chroot file. * Add any extra software from the repository you wish to install to the config/software.list.chroot file.
* Add any commands you want to have run during the build process to the config/pentest-distro-builder.chroot file.
When you're ready to build, run `sudo ./runme.sh` . Once it's complete, the finished image will be copied to the images/ folder. When you're ready to build, run `sudo ./runme.sh` . Once it's complete, the finished image will be copied to the images/ folder.
If you run the script without any options, it will build whichever OS you are currently running, and prompt for which desktop environment and repository you wish to use. If you wish, however, you can manually specify these options instead: If you run the script without any options, it will build whichever OS you are currently running, and prompt for which desktop environment and repository you wish to use. If you wish, however, you can manually specify these options instead (for example, to script an image to be built nightly or weekly):
* -u * -u
* Unattended mode (skip the menu, required for the other options to function) * Unattended mode (skip the menu, required for the other options to function)

View file

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
#Populate root's home folder from /etc/skel #Populate root's home folder from /etc/skel
cp -ru /etc/skel/* /root/ cp -r /etc/skel/* /root/
#Time to git stuff... #Time to git stuff...
cd /root/ cd /root/
@ -9,12 +9,13 @@ git clone https://github.com/Veil-Framework/Veil.git
git clone https://github.com/leebaird/discover.git git clone https://github.com/leebaird/discover.git
git clone https://github.com/trustedsec/ptf git clone https://github.com/trustedsec/ptf
#Enable our desired services
ssh-keygen -t rsa -N "" -f ~/.ssh/id_rsa ssh-keygen -t rsa -N "" -f ~/.ssh/id_rsa
#Enable our desired services
systemctl enable ssh systemctl enable ssh
systemctl enable cups systemctl enable cups
systemctl enable apache2 systemctl enable apache2
systemctl enable mysql systemctl enable mysql
systemctl enable postgresql systemctl enable postgresql
systemctl enable tor systemctl enable tor
systemctl enable cockpit.socket systemctl enable cockpit.socket

View file

@ -28,4 +28,6 @@ cherrytree
libreoffice libreoffice
gimp gimp
audacity audacity
vlc vlc
gedit
gedit-plugins

View file

@ -5,6 +5,9 @@ set -o pipefail # Bashism
parrot_mirror=http://archive.parrotsec.org/parrot parrot_mirror=http://archive.parrotsec.org/parrot
public_mirror=http://deb.parrotsec.org/parrot
# Detect target architecture and filter args # Detect target architecture and filter args
if [ ! $arch ]; then if [ ! $arch ]; then
arch=$(dpkg --print-architecture) arch=$(dpkg --print-architecture)
@ -107,7 +110,7 @@ lb config noauto \
--mirror-bootstrap "$parrot_mirror" \ --mirror-bootstrap "$parrot_mirror" \
--mirror-chroot "$parrot_mirror" \ --mirror-chroot "$parrot_mirror" \
--mirror-debian-installer "$parrot_mirror" \ --mirror-debian-installer "$parrot_mirror" \
--mirror-binary "$parrot_mirror" \ --mirror-binary "$public_mirror" \
--iso-application "Parrot" \ --iso-application "Parrot" \
--iso-publisher "Parrot Project" \ --iso-publisher "Parrot Project" \
--iso-volume "ParrotSec" \ --iso-volume "ParrotSec" \

View file

@ -1,20 +0,0 @@
#!/bin/sh
#Populate root's home folder from /etc/skel
cp -ru /etc/skel/* /root/
#Time to git stuff...
cd /root/
git clone https://github.com/Veil-Framework/Veil.git
git clone https://github.com/leebaird/discover.git
git clone https://github.com/trustedsec/ptf
#Enable our desired services
ssh-keygen -t rsa -N "" -f ~/.ssh/id_rsa
systemctl enable ssh
systemctl enable cups
systemctl enable apache2
systemctl enable mysql
systemctl enable postgresql
systemctl enable tor
systemctl enable cockpit.socket

View file

@ -74,6 +74,7 @@ Kali)
cp ./debs/*.deb build/live-build-config/kali-config/variant-$DESKTOP/packages.chroot/ cp ./debs/*.deb build/live-build-config/kali-config/variant-$DESKTOP/packages.chroot/
cp -rv filesystem/* ./build/live-build-config/kali-config/common/includes.chroot/ cp -rv filesystem/* ./build/live-build-config/kali-config/common/includes.chroot/
cp config/software.list.chroot ./build/live-build-config/kali-config/variant-$DESKTOP/package-lists/ cp config/software.list.chroot ./build/live-build-config/kali-config/variant-$DESKTOP/package-lists/
cp config/pentest-distro-builder.chroot ./build/live-build-config/kali-config/common/hooks/live/
if [ $REPO != "default" ]; if [ $REPO != "default" ];
then then
@ -90,11 +91,12 @@ Parrot)
cp ./debs/*.deb build/parrot-build/templates/parrot-variant-$DESKTOP/packages.chroot/ cp ./debs/*.deb build/parrot-build/templates/parrot-variant-$DESKTOP/packages.chroot/
cp -rv filesystem/* ./build/parrot-build/templates/common/includes.chroot/ cp -rv filesystem/* ./build/parrot-build/templates/common/includes.chroot/
cp config/software.list.chroot ./build/parrot-build/templates/parrot-variant-$DESKTOP/package-lists/ cp config/software.list.chroot ./build/parrot-build/templates/parrot-variant-$DESKTOP/package-lists/
cp config/pentest-distro-builder.chroot ./build/parrot-build/templates/common/hooks/normal/
if [ $REPO != "default" ]; if [ $REPO != "default" ];
then then
sed -i "s|archive.parrotsec.org|$REPO|g" ./build/parrot-build/auto/config sed -i "s|archive.parrotsec.org|$REPO|g" ./build/parrot-build/auto/config
sed -i "s|deb.parrotsec.org|$REPO|g" ./build/parrot-build/templates/common/archives/parrot.list #sed -i "s|deb.parrotsec.org|$REPO|g" ./build/parrot-build/templates/common/archives/parrot.list
fi fi
cd build/parrot-build cd build/parrot-build