Files
bashbunny-payloads/payloads/library/prank/SleepyMacRick/rick.sh
90N45 2c9b668bfa Add SleepyMacRick
Installs a script that will listen for user activity in the background. When the user starts working on his machine, a „Rick Roll“ will be triggered.
2023-09-10 13:40:44 +02:00

14 lines
437 B
Bash

#! /bin/bash
sleep 3
inactive=$(osascript -e 'tell application "System Events" to tell (first process whose frontmost is true) to return name')
while [[ ${inactive} = $(osascript -e 'tell application "System Events" to tell (first process whose frontmost is true) to return name') ]]; do
sleep 0.5
done
osascript -e "set volume output volume 100"
open -u "https://www.youtube.com/watch?v=xvFZjo5PgG0"
# Self destruct
rm /tmp/rick.sh