Skip to content

Instantly share code, notes, and snippets.

@malaya-zemlya
Created May 3, 2019 19:07
Show Gist options
  • Save malaya-zemlya/99f75cb860748d12780f602c0f48ddaf to your computer and use it in GitHub Desktop.
Save malaya-zemlya/99f75cb860748d12780f602c0f48ddaf to your computer and use it in GitHub Desktop.
RubberDucky script for those who don't lock their Macs (RickRoll version)
DEFAULTDELAY 300
REM Allow time for device to be recognized
DELAY 500
REM break out of whatever
ESC
DELAY 500
REM open spotlight
GUI SPACE
STRING terminal
ENTER
REM Allow time for the terminal to open
DELAY 200
REM Open new Terminal Tab
GUI t
REM set full volume
STRING osascript -e 'set volume 7'
ENTER
REM open the warning and lock the computer after 15 seconds
STRING open https://lockyourcomputer.squarespace.com/ & (sleep 15; pmset displaysleepnow)
ENTER
DELAY 1500
REM new tab
GUI t
REM go to the nav bar
GUI l
REM also open a rick roll. Note: Vimeo is important. Youtube might play an ad instead.
STRING https://vimeo.com/315605711
ENTER
DELAY 800
REM full screen
STRING f
DELAY 200
REM play the video
SPACE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment