Created
June 14, 2015 23:22
-
-
Save gr33n7007h/a2ec3593d8a9c72f5a75 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# man ioctl_list | grep KDSETLED | |
KDSETLED = 0x00004B32 | |
begin | |
# needs root privs | |
loop{ open('/dev/console').ioctl(KDSETLED, rand(0..8)) } | |
rescue Errno::EACCES | |
STDERR.puts "needs root privs to run" | |
exit -1 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment