From d756033c992a738875ef8c6caf96e40d0ead6595 Mon Sep 17 00:00:00 2001 From: GermanNoob Date: Sun, 12 Mar 2017 14:09:03 +0100 Subject: [PATCH] Updated install.sh to solve problems mentioned in forum Within the forum https://forums.hak5.org/index.php?/topic/40237-install-tools/ there were several problems mentioned which are solved with this update: 1. No need to move instead of copying tools_to_install to the switch directory due to use of bunny_helpers.sh 2. Check if everything is copied works even when the user OS has added hidden files (removing hidden files before test) --- payloads/library/tools_installer/install.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/payloads/library/tools_installer/install.sh b/payloads/library/tools_installer/install.sh index b484625..1e0f172 100644 --- a/payloads/library/tools_installer/install.sh +++ b/payloads/library/tools_installer/install.sh @@ -1,6 +1,10 @@ +# To avoid the use of find in the next section, let's verify the switch position +# and therefore the exact position of tools_to_install +source bunny_helpers.sh + # Check to ensure that the tools_to_install directory isn't empty. # Exit with solid red LED if it is, otherwise note tools in log. -TOOLSDIR=$(find /root/udisk/payloads/ -name tools_to_install) +TOOLSDIR=/root/udisk/payloads/$SWITCH_POSITION/tools_to_install/ if [ "$(ls -A $TOOLSDIR)" ]; then cd $TOOLSDIR echo "Available Tools:" > /tmp/tools_installer.log @@ -16,6 +20,9 @@ LED R B 100 mkdir -p /pentest mv $TOOLSDIR/* /pentest/ +# Be sure that there are no OS made hidden files in the directory +rm .* + # Set LED to purple solid and check that move completed LED R B if [ "$(ls -A $TOOLSDIR)" ]; then