Files
bashbunny-payloads/payloads/extensions/mac_happy.sh
Alex Flores 65ad5f6e89 fixes mac_happy extension (#313)
- fixes state leakage of `command` variable by removing it
 - remove unecessary use of forked processes/sub-commands
 - combine input validation conditionals
 - match the standard of existing extensions of exporting function
   names as all caps
 - bump version number
2018-01-28 10:25:55 +11:00

17 lines
351 B
Bash
Executable File

#!/bin/bash
# Title: Mac_Happy
# Author: thehappydinoa
# Target: Mac
# Version: 0.2
#
# Makes Mac happy by correctly setting pid and vid
# Use by running mac_happy ATTACKMODE HID <attack modes here>
#
function MAC_HAPPY() {
[[ "$#" -gt 1 && "$1" == "ATTACKMODE" ]] || exit 1
eval "$@ vid_0x05ac pid_0x021e"
}
export -f MAC_HAPPY