Skip to content

Instantly share code, notes, and snippets.

@juzam
Last active December 10, 2015 19:39
Show Gist options
  • Save juzam/4482996 to your computer and use it in GitHub Desktop.
Save juzam/4482996 to your computer and use it in GitHub Desktop.
Super simple ISC Infocon to blink(1) script
#!/bin/bash
# reduntant check since in cygwin both options works the same way
if [ $OS = "cygwin" ]; then
BLINK1TOOL=/usr/local/bin/blink1-tool.exe
else
BLINK1TOOL=/usr/local/bin/blink1-tool
fi
# colour mapping
RED="0xff,0x00,0x00"
GREEN="0x00,0xff,0x00"
BLUE="0x00,0x00,0xff"
ORANGE="0xff,0x8c,0x00"
INFOCON=`curl -s https://isc.sans.edu/infocon.txt`
case $INFOCON in
green )
$BLINK1TOOL --rgb $GREEN
;;
red )
$BLINK1TOOL --rgb $RED
;;
orange )
$BLINK1TOOL --rgb $ORANGE
;;
blue )
$BLINK1TOOL --rgb $BLUE
;;
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment