First here's the AppleScript, which I have saved under /etc/.stolen/StolenGrowlNotifier.scpt:
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
Next is a script which I've saved under /etc/.stolen/growlit.sh, chmodded to 755:
## 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
The third (really first) part of the script is another bash script called /etc/.stolen/isstolen.sh:
## Written by Jacob Braun, http://five.jacobbraun.com
file=`grep false /etc/isstolen`
website=http://stolen.jacobbraun.com/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/growlit
/opt/local/bin/wget -P /etc http://yoururl/growlit
touch /etc/isstolen
touch /etc/growlit
fi;
fi;
exit 0
That script checks for a file called /etc/isstolen. If the file contains the words "false", sleep then try to redownload the file. If the file contents are "false" and the contents of the url with "phonehome" in it are true, it then downloads (using wget...I installed it via MacPorts, hence the /opt/local/bin for the path) the new isstolen file and growlit files. If growlit contains the word "true" then your computer will fill with sticky growl notifications asking for the computer to be returned.
The reason I touch both of the files is I'm going to have the script automatically run if the file is not touched every few days, ensuring that even if the computer does not have internet access, some crackhead somewhere will know to return it.
Location
Trackback URL for this post:
Buy adipex.
from Adipex buy cheap. on Wed, 03/10/2010 - 21:30Adipex buy cheap. Phentermine adipex buy. Buy adipex at best online pharmacies forum.
Generic xanax 2 mg no prescription.
from Generic xanax 2 mg no prescription. on Wed, 03/10/2010 - 19:49Xanax overnight. Xanax. Xanax xr. Buying xanax with mastercard. Xanax withdrawal symptom. Cheap xanax online buy cheap xanax buy cheap xanax. Xanax cocktail.
Post new comment