growl

An AppleScript/Bash combination to annoy theifs

So here's a combination shell script/launch daemon/AppleScript that, if computer is stolen, puts a sticky growl notification on the screen (every two seconds...repeatedly...filling the entire screen eventually) with your name and phone number, offering a cash reward if computer is stolen.

First here's the AppleScript, which I have saved under /etc/.stolen/StolenGrowlNotifier.scpt:

Read more...

growlit.sh

#!/bin/bash

## Written by Jacob Braun, http://five.jacobbraun.com

growlit=`grep true /etc/growlit`

## If $growlit is found to be true, then all hell breaks lose.

while [ $growlit == "true" ]; do
        COUNTER=0
        while [ $COUNTER -lt 10 ]; do
                osascript /etc/.stolen/StolenGrowlNotifier.scpt
                sleep 2
                let COUNTER=COUNTER+1
        done
        growlit=`grep true /etc/growlit`
done
exit 0

StolenGrowlNotifier.scpt

tell application "GrowlHelperApp"
        set the allNotificationsList to ¬
                {"Stolen"}
       
        set the enabledNotificationsList to ¬
                {"Stolen"}
       
        register as application ¬
                "Stolen Mac" all notifications allNotificationsList ¬
                default notifications enabledNotificationsList ¬
               
        notify with name ¬
                "Stolen" title ¬
                "This computer has been stolen." description ¬
                "Please call *phonenumber* for no questions asked cash reward." application name ¬
                "Stolen Mac" icon of file "file:///etc/.stolen/apple-lock-icon.icns" priority 2 with sticky
end tell
Syndicate content