Remove bunny_helpers.sh and add the new 1.1 extensions

This commit is contained in:
Sebastian Kinne
2017-04-07 12:40:00 +10:00
parent 60616e7e35
commit 23583addf5
5 changed files with 96 additions and 42 deletions

View File

@@ -0,0 +1,8 @@
#!/bin/bash
function DUCKY_LANG() {
[[ -z "$1" ]] && exit 1 # parameter must be set
export DUCKY_LANG="$1"
}
export -f DUCKY_LANG

View File

@@ -0,0 +1,23 @@
#!/bin/bash
function GET() {
case $1 in
"TARGET_IP")
export TARGET_IP=$(cat /var/lib/dhcp/dhcpd.leases | grep ^lease | awk '{ print $2 }' | sort | uniq)
;;
"TARGET_HOSTNAME")
export TARGET_HOSTNAME=$(cat /var/lib/dhcp/dhcpd.leases | grep hostname | awk '{print $2 }' | sort | uniq | tail -n1 | sed "s/^[ \t]*//" | sed 's/\"//g' | sed 's/;//')
;;
"HOST_IP")
export HOST_IP=$(cat /etc/network/interfaces.d/usb0 | grep address | awk {'print $2'})
;;
"SWITCH_POSITION")
[[ "$(cat /sys/class/gpio_sw/PA8/data)" == "0" ]] && export SWITCH_POSITION="switch1" && return
[[ "$(cat /sys/class/gpio_sw/PL4/data)" == "0" ]] && export SWITCH_POSITION="switch2" && return
[[ "$(cat /sys/class/gpio_sw/PL3/data)" == "0" ]] && export SWITCH_POSITION="switch3" && return
export SWITCH_POSITION="invalid"
;;
esac
}
export -f GET

View File

@@ -0,0 +1,18 @@
#!/bin/bash
#
# REQUIRETOOL v1 by @Hak5Darren
# Checks for specified directory in /tools, exits with LED FAIL if not found
# Usage: REQUIRETOOL directory
#
# Examples:
# REQUIRETOOL impacket
function REQUIRETOOL() {
[[ -z "$1" ]] && exit 1 # parameter must be set
if [ ! -d /tools/$1/ ]; then
LED FAIL
exit 1
fi
}
export -f REQUIRETOOL

View File

@@ -0,0 +1,47 @@
#!/bin/bash
#
# RUN v1 by @Hak5Darren
# Simplifies executing commands from HID attacks for various targets
# Usage: RUN [OS] [Command to execute]
#
# Examples:
# RUN WIN notepad.exe
# RUN WIN "powershell -Exec Bypass \"tree c:\\ > tree.txt; type tree.txt\"
# RUN OSX http://www.example.com
# RUN UNITY xterm
function RUN() {
local os=$1
shift
[[ -z "$os" || -z "$*" ]] && exit 1 # Both OS and Command parameter must be set
case "$os" in
WIN)
QUACK GUI r
QUACK DELAY 500
QUACK STRING "$@"
QUACK ENTER
;;
OSX)
QUACK GUI SPACE
QUACK DELAY 500
QUACK STRING "$@"
QUACK DELAY 500
QUACK ENTER
;;
UNITY)
QUACK ALT F2
QUACK DELAY 500
QUACK STRING "$@"
QUACK DELAY 500
QUACK ENTER
;;
*)
# OS parameter must be one of the above
exit 1
;;
esac
}
export -f RUN