mirror of
https://github.com/hak5/bashbunny-payloads.git
synced 2025-10-29 16:58:25 +00:00
Merge pull request #12 from rastating/bug/tools_installer_line_endings
Remove line endings causing the tools_installer payload to fail
This commit is contained in:
@@ -1,45 +1,45 @@
|
|||||||
# Check to ensure that the tools_to_install directory isn't empty.
|
# 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.
|
# Exit with solid red LED if it is, otherwise note tools in log.
|
||||||
TOOLSDIR=$(find /root/udisk/payloads/ -name tools_to_install)
|
TOOLSDIR=$(find /root/udisk/payloads/ -name tools_to_install)
|
||||||
if [ "$(ls -A $TOOLSDIR)" ]; then
|
if [ "$(ls -A $TOOLSDIR)" ]; then
|
||||||
cd $TOOLSDIR
|
cd $TOOLSDIR
|
||||||
echo "Available Tools:" > /tmp/tools_installer.log
|
echo "Available Tools:" > /tmp/tools_installer.log
|
||||||
echo "----------------" >> /tmp/tools_installer.log
|
echo "----------------" >> /tmp/tools_installer.log
|
||||||
for i in $(ls -d */); do echo ${i%%/} >> /tmp/tools_installer.log; done
|
for i in $(ls -d */); do echo ${i%%/} >> /tmp/tools_installer.log; done
|
||||||
else
|
else
|
||||||
LED R
|
LED R
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Set LED to purple blinking and move tools
|
# Set LED to purple blinking and move tools
|
||||||
LED R B 100
|
LED R B 100
|
||||||
mkdir -p /pentest
|
mkdir -p /pentest
|
||||||
mv $TOOLSDIR/* /pentest/
|
mv $TOOLSDIR/* /pentest/
|
||||||
|
|
||||||
# Set LED to purple solid and check that move completed
|
# Set LED to purple solid and check that move completed
|
||||||
LED R B
|
LED R B
|
||||||
if [ "$(ls -A $TOOLSDIR)" ]; then
|
if [ "$(ls -A $TOOLSDIR)" ]; then
|
||||||
# Set LED to red on fail and exit
|
# Set LED to red on fail and exit
|
||||||
LED R
|
LED R
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
# Set LED to amber blinking on setup
|
# Set LED to amber blinking on setup
|
||||||
LED G R 100
|
LED G R 100
|
||||||
|
|
||||||
# Setup impacket
|
# Setup impacket
|
||||||
cd /pentest/impacket
|
cd /pentest/impacket
|
||||||
python ./setup.py install
|
python ./setup.py install
|
||||||
|
|
||||||
# Additional tool setup goes here
|
# Additional tool setup goes here
|
||||||
|
|
||||||
# List installed tools in /pentest and save to tools.txt on USB disk
|
# List installed tools in /pentest and save to tools.txt on USB disk
|
||||||
cd /pentest/
|
cd /pentest/
|
||||||
echo "Installed Tools:" > /root/udisk/installed-tools.txt
|
echo "Installed Tools:" > /root/udisk/installed-tools.txt
|
||||||
echo "----------------" >> /root/udisk/installed-tools.txt
|
echo "----------------" >> /root/udisk/installed-tools.txt
|
||||||
for i in $(ls -d */); do echo ${i%%/} >> /root/udisk/installed-tools.txt; done
|
for i in $(ls -d */); do echo ${i%%/} >> /root/udisk/installed-tools.txt; done
|
||||||
sync && sleep 1 && sync
|
sync && sleep 1 && sync
|
||||||
|
|
||||||
# Set LED to white on success
|
# Set LED to white on success
|
||||||
LED R G B
|
LED R G B
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user