Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Snap and upload iSight pictures on wake from sleep' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Snap and upload iSight pictures on wake from sleep
Authored by: freak123 on Jan 31, '07 03:31:41AM
I really appreciate your post. Thanks a lot.
The uploading to a FTP is a solution but I Find more interesting to send the photo by mail.
The image will be displayed correctly in regular mail program (Mail, Thunderbird...) but not on webmail.
You still can gzip the uuencoded image and send the zip as attachment if you want.
I put in comment the FTP part and grab some more info about the position of the computer and it's surrounding network.
Here is the modification to the wakeup.sh script I brought
# Grab some more information
info=$(ifconfig);
info2=$(hostname);

# change to anything you want...
# This to have ino about the gateway and the provider of the thief.
route=$(traceroute -m 6 www.yahoo.com);

# Write to file
echo "INFO" > /var/root/tmp.txt
echo $info >> /var/root/tmp.txt
echo "---" >> /var/root/tmp.txt
echo "HOSTNAME" >> /var/root/tmp.txt
echo $info2 >> /var/root/tmp.txt
echo "---" >> /var/root/tmp.txt
echo "TRACEROUTE" >> /var/root/tmp.txt
echo $route >> /var/root/tmp.txt
echo " "

# Run FTP session to put JPGs in webspace, then delete from /tmp
# chmod 600 ~/.netrc
# ftp -i MYFTP.SERVER.COM

# Send by mail. This is all on one line, no carriage return
(cat /var/root/tmp.txt; uuencode /Users/YOURNAME/Documents/isight/$date /Users/YOURNAME/Documents/isight/$date) | mail john.doe@gmail.com

# Keep it clean
rm /var/root/tmp.txt
mv /Users/YOURNAME/Documents/isight/*.jpg
/Users/YOURNAME/Documents/isight_send/

chmod the file 774
and "roulez jeunesse!"


[ Reply to This | # ]