2017-10-25 00:10:17 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2018-01-27 23:25:55 +00:00
|
|
|
# Title: Mac_Happy
|
2017-10-25 00:10:17 +00:00
|
|
|
# Author: thehappydinoa
|
2018-01-30 22:17:56 +00:00
|
|
|
# Target: macOS
|
|
|
|
# Version: 0.3
|
2017-10-25 00:10:17 +00:00
|
|
|
#
|
|
|
|
# Makes Mac happy by correctly setting pid and vid
|
2018-01-30 22:17:56 +00:00
|
|
|
# Use by running MAC_HAPPY HID/ETHERNET/...
|
2017-10-25 00:10:17 +00:00
|
|
|
#
|
|
|
|
|
2018-01-27 23:25:55 +00:00
|
|
|
function MAC_HAPPY() {
|
2018-01-30 22:17:56 +00:00
|
|
|
[[ "$#" -gt 1 ]] || exit 1
|
|
|
|
case "$1" in
|
|
|
|
HID)
|
|
|
|
ATTACKMODE HID vid_0x05ac pid_0x021e
|
|
|
|
;;
|
|
|
|
ETHERNET)
|
|
|
|
ATTACKMODE ECM_ETHERNET vid_0x05ac pid_0x021e
|
|
|
|
;;
|
|
|
|
ATTACKMODE)
|
|
|
|
eval "$@ vid_0x05ac pid_0x021e"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
2017-10-25 00:10:17 +00:00
|
|
|
}
|
2018-01-27 23:25:55 +00:00
|
|
|
export -f MAC_HAPPY
|