A couple of scripts to help track a laptop's location

Sep 07, '06 07:30:02AM

Contributed by: The Webguy

Okay, so I am kind of paranoid about my belongings, especially my PowerBook. One thought I often have is "what if it were to get legs and disappear?" I mean, my PowerBook is my digital life, what if it were to get stolen?

Understanding that no solution is perfect, and that there are several ways to skin the proverbial cat (most of them posted on this web site), I developed my own solution for having my PowerBook 'phone home' on a regular basis, thus providing me with location information in the event my PowerBook ends up in hands other than my own. In the spirit of the recent Labor Day holiday, I am making the fruit of my labor available for the world, for free. Enter PBphoneHome (8KB download, macosxhints mirror), which is a simple 'application' that is intended to provide detailed information about the installed computer system.

In turn, this information can be utilized to determine the location of the installed system (a.k.a. source location validation), which can be extremely useful to finding a computer system that has been stolen or misplaced. PBphoneHome works by sending a time-stamped email message to a specified address that contains the installed computer's current IP address, broadcast address, MAC address, network information, and a list of running programs. PBphoneHome can also be configured to traceroute and access external web servers, providing additional location information and time-stamped logging capabilities.

Enjoy, with the understanding that PBphoneHome is distributed as freeware, without warranty or guarantee, written or implied, of any kind. Use this application at your own risk. PBphoneHome consists of two files, that utilize PHP and shell scripting. Individuals who are not comfortable with the usage or implementation of these technologies should refrain from using PBphoneHome. From the Read Me, here are the basic setup instructions:

  1. Decompress the application distribution file.
  2. Move the PBphoneHome.sh file to your preferred directory, on your local hard drive. Make sure that the file is executable (chmod 755 PBphoneHome.sh)
  3. The PBphoneHome.sh file can be run manually, but is best utilized when run via cron and executed as the root user or System Administrator.
  4. If you choose to utilize the additional tracking functionality provided by the PBphoneHome.php file, place a copy on your web server.
[robg adds: If you're not using the PHP script on a web server, you might want to edit the shell script to remove the call to curl. On my machine, it threw an error (though the rest of the script ran) when there wasn't a parameter for curl to parse.]

Comments (4)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20060903051225347