mirror of
https://github.com/hak5darren/bashbunny-payloads.git
synced 2025-10-29 16:58:12 +00:00
Merge pull request #45 from GermanNoob/master
Updated install.sh to solve problems mentioned in forum
This commit is contained in:
@@ -4,6 +4,9 @@
|
|||||||
# Author: Sebkinne
|
# Author: Sebkinne
|
||||||
# Version: 1.0
|
# Version: 1.0
|
||||||
|
|
||||||
|
# Usage of bunny_helpers.sh to avoid problems with find in function startCaptiveportal
|
||||||
|
https://forums.hak5.org/index.php?/topic/40237-install-tools/
|
||||||
|
|
||||||
# Add or remove inputs here
|
# Add or remove inputs here
|
||||||
INPUTS=(username password)
|
INPUTS=(username password)
|
||||||
|
|
||||||
@@ -27,7 +30,8 @@ function setupNetworking() {
|
|||||||
|
|
||||||
# Find payload directory and execute payload
|
# Find payload directory and execute payload
|
||||||
function startCaptiveportal() {
|
function startCaptiveportal() {
|
||||||
cd $(dirname $(find /root/udisk/payloads/ -name portal.html))
|
# cd $(dirname $(find /root/udisk/payloads/ -name portal.html))
|
||||||
|
cd /root/udisk/payloads/$SWITCH_POSITION
|
||||||
chmod +x captiveportal
|
chmod +x captiveportal
|
||||||
./captiveportal ${INPUTS[@]}
|
./captiveportal ${INPUTS[@]}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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.
|
# 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=/root/udisk/payloads/$SWITCH_POSITION/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
|
||||||
@@ -16,6 +20,9 @@ LED R B 100
|
|||||||
mkdir -p /pentest
|
mkdir -p /pentest
|
||||||
mv $TOOLSDIR/* /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
|
# 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
|
||||||
|
|||||||
Reference in New Issue
Block a user