scripts

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...

A simple way to track stolen Macs

So my laptop was stolen on September 23rd (A 2.26GHz 13" MacBook Pro, 4GBs RAM, 500GB 7200rpm HD...my baby) and it had my entire life on it. It was in the process of making a full backup and while I was at work someone broke into my apartment and stole it. It's probably gone forever along with most of my precious photos, documents and other data, and I'm kicking myself for not coming up with some way to track it. So I made a way. Hindsight is 20/20. *sigh*

Read more...

isstolen.sh

#!/bin/bash

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

file=`grep false /etc/isstolen`
website=http://yoururl/phonehome

sleep 30;
phonehome=`(curl -s $website)`

if [ "$file" == "false" ]; then
        if [ "$phonehome" == "true" ]; then
                rm -rf /etc/isstolen
                /opt/local/bin/wget -P /etc http://yoururl/isstolen
                rm -rf /etc/sayit
                /opt/local/bin/wget -P /etc http://yoururl/sayit
                rm -rf /etc/growlit
                /opt/local/bin/wget -P /etc http://yoururl/growlit
                touch /etc/isstolen
                touch /etc/sayit
                touch /etc/growlit
        fi;
fi;
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