General Mac OS X Discussion General Apple and Mac OS X Discussion

Reply
 
LinkBack Thread Tools Display Modes
  (#1) Old
Junior Member
 
Posts: 18
Join Date: Apr 2009
Default Theft tracking method for the mini using Dropbox - 05-29-2009, 10:26 PM

I came up with this silly little script to track your mini in the in unfortunate case you might find it stolen. It requires two additional things: Dropbox and and a cron job.

Dropbox is a free service that creates a local folder (~/Dropbox/ ) that automatically syncs across multiple computers and a remote server in real time. It also does versioning, so you can view/restore older versions of files you put there through it's web interface. This makes it perfect for tracking data. Also, it's just a really handy service and you should use it anyway. In many cases I find it faster than using a thumb drive to transfer files.

Installation:
- Install Dropbox ( Be a pal and use my referral link, eh? I get an extra 250mb if you do! https://www.getdropbox.com/referrals/NTUzMjQyMTk )
- Double-click this attached archive: tracking.zip. It should give you a folder called "tracking"
- Drag the "tracking" folder into your ~/Dropbox/ folder
- Add a cron job that runs ~/Dropbox/tracking/tracking.sh every 15 minutes (or whatever you'd prefer)*

So what does the script do?
- Dumps your ifconfig (networking information), external IP address, and Airport info to txt files in your dropbox. You can technically use this info to pinpoint location
- Takes a picture of the jerk in front of your laptop

In the event that you lose your machine, log into drop box and have a look at the files that start getting uploaded into your Dropbox under /tracking/output/ . Since dropbox keeps a file history, you'll be able to go back and see all the previous IP info and photos of the alleged thief.

Issues:
- You have to trust dropbox with your data
- You will have unflattering pictures of yourself taken frequently (just comment out the isightcapture line if you don't want pictures taken)
- Only works while the laptop has a network connection
- Who knows what you would do once you got this info. Go to the police? Vigilante justice? Cry yourself to sleep cursing their IP?

Let me know if you have any questions or feedback!



* How do I make a cron job?

- Open a terminal
- Type: crontab -e
- This opens vi to edit the cron file. Press "i" to enter interactive mode
- Type or paste: 00,15,30,45 * * * * ~/Dropbox/tracking/tracking.sh >/dev/null 2>&1
(translation: run tracking.sh every 15 minutes, technically at :00 :15 :30: 45 on the hour, ignore error output)
- type :wq! to save and exit
- Type crontab -l at the terminal to verify your job was added
Attached Files
File Type: zip tracking.zip (10.0 KB, 80 views)
Reply With Quote
  (#2) Old
Member
 
Posts: 32
Join Date: Feb 2009
Default 05-29-2009, 11:02 PM

This is actually pretty bad-ass, I know their are more polished solutions out there, but they cost moulah. Nice job mate.
I'd prefer if you could enable tracking remotely. As this will fill up your dropbox account pretty quick (6 months) and as you have to have the folder mounted you couldn't use a seperate account just for the tracking output. I'm thinking maybe you could figure out a way to tunnel through VNC and turn the cron on/off over terminal remotely.
But nice job for an 0.1 release.
Now all it needs is a web interface and a GUI and you could charge a subscription model!
BTW, if you want a sandbox to play around on on the web, you could mess about on a subdomain on my server if you want. PM if you're interested.


My Dell Mini 9 | 2gb Crucial Ram | 16gb STEC SSD | 16gb SDHC| 0.3mp Webcam |OS X 10.5.7| DellEFI 1.1 | A05 | Meklort's Touchpad Drivers | Dropbox | My Desktop
Reply With Quote
  (#3) Old
Junior Member
 
Posts: 18
Join Date: Apr 2009
Default 05-29-2009, 11:24 PM

Would it fill up your dropbox? It overwrites the old files and it's only about 40k. Unless Dropbox counts past revisions towards your usage total. Anyone happen to know how much revision data they keep and for how long?

Also, Dropbox is the web interface. You can view your files and revisions from there without even installing dropbox.

Great idea with remote access though. I'll have to think about how one would do that.
Reply With Quote
  (#4) Old
Super Moderator
 
mechdrew's Avatar
 
Posts: 1,356
Join Date: Jan 2009
Location: Idaho
Send a message via AIM to mechdrew
Default 05-29-2009, 11:29 PM

Quote:
Originally Posted by CharliWag View Post
As this will fill up your dropbox account pretty quick (6 months) and as you have to have the folder mounted you couldn't use a seperate account just for the tracking output.
Actually, I think the method he uses overwrites the older files, therefore there is no increase in space used. And as he mentioned, Dropbox keeps a history, a backup, of all the files on the server, so even though you are overwriting the old files there is a Time Machine of sorts on the server where you can go back and look at past versions of the file, all without taking up precious free space.

Edit: Drat. Beat me to it already.


Dell Mini 10v | Mac OS X 10.6.2 | XP Home | Windows 7 Home | 2GB RAM | 160GB HDD | BIOS A05 | USB Legacy: ON | USB Wake: ON | BT: None | NBI 0.8.3 Final
http://osx.mechdrew.com - News and Guides for Installing Mac OS X via NetbookInstaller - Now on Twitter

Reply With Quote
  (#5) Old
Junior Member
 
Posts: 18
Join Date: Apr 2009
Default 05-29-2009, 11:36 PM

For remote management, maybe the script could curl some xml file hosted somewhere over http for the string "tracking=true".

If it exists, then it would create the files. Otherwise, it would do nothing. Then if you wanted to disable it, you could just change the xml to "tracking=false".

That seems like a quick and dirty way.

Edit: I guess you could even host this file on your own dropbox public folder
Reply With Quote
  (#6) Old
Junior Member
 
Posts: 18
Join Date: Apr 2009
Default 05-30-2009, 12:26 AM

Oh what the heck, I went ahead and implemented remote management. Now you can upload a file to your Dropbox public folder "tracking.txt" that will determine whether or not the script will run the tracking process.

Steps:
- Download/unzip the following file
- Edit line 5 of tracking.sh to include your dropbox public URL. Be sure to include the slash at the end. Example: DB_PUBLIC_URL=http://dl.getdropbox.com/u/12345/
- Save and replace your existing ~/Dropbox/tracking/tracking.sh with it.
- Drag the included file "tracking.txt" into your dropbox public folder ~/Dropbox/Public/

Now, if you want to enable tracking, edit tracking.txt to simply contain the word "true". By default it's set to "false".

Once you change this to "true" remotely, the script will start tracking.
Attached Files
File Type: zip tracking_update.zip (1.3 KB, 55 views)
Reply With Quote
  (#7) Old
Member
 
Posts: 32
Join Date: Feb 2009
Default 05-30-2009, 12:51 AM

Quote:
Originally Posted by vdub6127 View Post
Anyone happen to know how much revision data they keep and for how long?
This is what I'm thinking...Maybe i'll send Dropbox an email asking about the revision size limit.
Quote:
Originally Posted by vdub6127 View Post
Oh what the heck, I went ahead and implemented remote management. Now you can upload a file to your Dropbox public folder "tracking.txt" that will determine whether or not the script will run the tracking process.
Wow that was quick, thanks alot man. That will make it easier to implement into a simple gui.


My Dell Mini 9 | 2gb Crucial Ram | 16gb STEC SSD | 16gb SDHC| 0.3mp Webcam |OS X 10.5.7| DellEFI 1.1 | A05 | Meklort's Touchpad Drivers | Dropbox | My Desktop
Reply With Quote
  (#8) Old
Expert Member
 
Posts: 692
Join Date: Mar 2009
Default 05-30-2009, 01:57 AM

Not too shabby, but with a job every 15 minutes, that's quite a hit on Dropbox, in terms of file xfers. Since the purpose of this is for pseudo tracking, wouldn't it make more sense to just send data once per boot? With perhaps a second xfer 15 (or 5 or whatever, time for some to be up and fully running) minutes in, with perhaps a every 24 hours if someone is keeping the machine on all the time?

I make the suggestion just as a way to not abuse Dropbox but still have this pseudo tracking?


Mini1: Vostro A90, Black, 2G, 1.3 Webcam, Bluetooth, 64G SuperTalent, OS X 10.6.4
Mini2: Mini9, Black, 2G, 0.3 Webcam, Bluetooth, 32G RunCore, OS X/Win 7, internal PCI-e SHDC Reader
Mini3: Mini10v. Black, 2G, Webcam, 640G HD, OS X 10.5.8/Win 7/Ubuntu [Hibernate w/NBI 0.8.3 RC4]
Dropbox Referral
Reply With Quote
  (#9) Old
Member
 
Posts: 32
Join Date: Feb 2009
Default 05-30-2009, 03:28 AM

Interestingly enough I couldn't get this working with Lingo for the crontabs.
I set it to every 15 seconds just to see what an average output would look like.
Couldn't get it to go...


My Dell Mini 9 | 2gb Crucial Ram | 16gb STEC SSD | 16gb SDHC| 0.3mp Webcam |OS X 10.5.7| DellEFI 1.1 | A05 | Meklort's Touchpad Drivers | Dropbox | My Desktop
Reply With Quote
  (#10) Old
Member
 
stone's Avatar
 
Posts: 31
Join Date: Aug 2009
Location: austin, tx
Default 08-08-2009, 04:22 AM

i get access denied on the shell script from the command line

Violet:~ admin$ ~/Dropbox/Public/tracking/tracking.sh
-bash: /Users/admin/Dropbox/Public/tracking/tracking.sh: Permission denied


dell mini 10v, running OSX 10.6.3, 160g hdd, 1.3 cam, 6 cell bat, 1gig ram, 1024x576 screen, usb logitech mouse, caselogic slipcase
Reply With Quote
Reply

« Browser CPU and Battery Life | Tablet: 27 years and I still don't want one:) »
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


LinkBacks (?)
LinkBack to this Thread: http://www.mydellmini.com/forum/general-mac-os-x-discussion/8714-theft-tracking-method-mini-using-dropbox.html
Posted By For Type Date
Hey, Reddit - my wife's Macbook got smash'n'grabbed out of her mom's car two hours ago. Had I installed this script in her Dropbox beforehand, I might well have a picture and IP history of the perpetrator. : gadgets This thread Refback 11-21-2009 05:57 AM

Copyright © 2008-2011 MyDellMini.com.