DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone >

Repair Spy

Snippets Manager user avatar by
Snippets Manager
·
Feb. 26, 07 · · Code Snippet
Like (0)
Save
Tweet
457 Views

Join the DZone community and get the full member experience.

Join For Free
Takes a screenshot and a webcam snapshot and emails them to flickr. Requires isightcapture. Hacked up to spy on the Apple repair team as they try to repair my Mac Book Pro's backlight for the second time.


#!/bin/bash
# requires isightcapture http://www.intergalactic.de/hacks.html

# path to save the images
PATH=/Users/default/

# flickr email address
EMAIL="yourflickremail+private@photos.flickr.com"

# tags to attach to each picture uploaded
TAGS="repair_spy"

TIMESTAMP=`/bin/date "+%y%m%d%H%M%S"`
FRIENDLY_TIMESTAMP=`/bin/date "+%Y/%m/%d %H:%M"`

#take pics
/usr/sbin/screencapture -mxC $PATHscreen_$TIMESTAMP.png
/usr/local/bin/isightcapture -t png $PATHisight_$TIMESTAMP.png

#post to flickr
/usr/bin/uuencode $PATHscreen_$TIMESTAMP.png $PATHscreen_$TIMESTAMP.png | /usr/bin/mail -s "Repair Spy Screenshot - $FRIENDLY_TIMESTAMP tags: $TAGS" $EMAIL
/usr/bin/uuencode $PATHisight_$TIMESTAMP.png $PATHisight_$TIMESTAMP.png | /usr/bin/mail -s "Repair Spy iSight Cature - $FRIENDLY_TIMESTAMP tags: $TAGS" $EMAIL


Toss this in your crontab like so, making sure to run it as the user that you provide to the Apple Techs


*/1    *       *       *       *       default /Users/default/repair_spy >& /dev/null

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • How to Integrate Zoom in React Application?
  • Vue 3 Reactivity Composition API Using Reactive() And Ref()
  • AWS Serverless Lambda Resiliency: Part 2
  • How to Upload/Download a File to and From the Server?

Comments

Partner Resources

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo