Darren Kitchen a7c1edfb31 Added LINUX for ALT+F2 in addition to UNITY
From Robert Bledsaw III comment on Hak5 2301:
I've checked and verified that Alt+F2 is a feature that runs on all major desktop environments and every minor one I looked into. Here's the compatible ones I've found so far: Gnome, KDE, Unity, Cinnamon, UDE, Lumina, EDE, Budgie, Razor-qt, Xfce, LXDE, Mate, LXQt, Enlightenment, and Pantheon. Now, in searching these, I have noticed that many of the minor ones have had bugs with Alt+F2 not working. But in essence, it would appear that Alt+F2 is a universal Linux GUI Shortcut.
2017-09-20 09:34:31 -07:00

55 lines
1.1 KiB
Bash
Executable File

#!/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
;;
LINUX)
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