<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Phone Home Anti-Robber Mac Security Script</title>
	<atom:link href="http://www.mactricksandtips.com/2008/09/phone-home-anti-robber-mac-security-script.html/feed" rel="self" type="application/rss+xml" />
	<link>http://www.mactricksandtips.com/2008/09/phone-home-anti-robber-mac-security-script.html</link>
	<description>The best Mac tips, tricks reviews and tutorials.</description>
	<lastBuildDate>Thu, 17 May 2012 02:46:01 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: SDHC</title>
		<link>http://www.mactricksandtips.com/2008/09/phone-home-anti-robber-mac-security-script.html/comment-page-1#comment-54595</link>
		<dc:creator>SDHC</dc:creator>
		<pubDate>Sat, 12 Jun 2010 09:20:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.mactricksandtips.com/?p=904#comment-54595</guid>
		<description>Sweet ,thanks for sharing .Such a great post.</description>
		<content:encoded><![CDATA[<p>Sweet ,thanks for sharing .Such a great post.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Googleg</title>
		<link>http://www.mactricksandtips.com/2008/09/phone-home-anti-robber-mac-security-script.html/comment-page-1#comment-47678</link>
		<dc:creator>Googleg</dc:creator>
		<pubDate>Wed, 12 May 2010 18:10:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.mactricksandtips.com/?p=904#comment-47678</guid>
		<description>Thanks a lot for all this, it&#039;s terrific.

I&#039;ve fixed a few things to have it working on my macBook Pro running OS 10.6.3...

1. As mentioned by someone else, you need to specify the full path of the commands if you intend to run the script via root&#039;s crontab:

/usr/sbin/ioreg

2. The screencapture thing needs to be run in a different way now:

loginwindowpid=`ps auwwx &#124; grep loginwindow &#124;grep -v grep &#124; cut -c12-15`
launchctl bsexec $loginwindowpid /usr/sbin/screencapture -t jpg -x &quot;$path&quot;desktop&quot;$thedate&quot;&quot;.jpg&quot;

3. Running the script via the root&#039;s crontab seems to disable the green led revealing the picture being taken, great !

4. You may need to configure your local postfix to have the emails go through (customize $mydomain and $myorigin)

Again, thanks a lot, this is great stuff.</description>
		<content:encoded><![CDATA[<p>Thanks a lot for all this, it&#8217;s terrific.</p>
<p>I&#8217;ve fixed a few things to have it working on my macBook Pro running OS 10.6.3&#8230;</p>
<p>1. As mentioned by someone else, you need to specify the full path of the commands if you intend to run the script via root&#8217;s crontab:</p>
<p>/usr/sbin/ioreg</p>
<p>2. The screencapture thing needs to be run in a different way now:</p>
<p>loginwindowpid=`ps auwwx | grep loginwindow |grep -v grep | cut -c12-15`<br />
launchctl bsexec $loginwindowpid /usr/sbin/screencapture -t jpg -x &#8220;$path&#8221;desktop&#8221;$thedate&#8221;".jpg&#8221;</p>
<p>3. Running the script via the root&#8217;s crontab seems to disable the green led revealing the picture being taken, great !</p>
<p>4. You may need to configure your local postfix to have the emails go through (customize $mydomain and $myorigin)</p>
<p>Again, thanks a lot, this is great stuff.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: uxp</title>
		<link>http://www.mactricksandtips.com/2008/09/phone-home-anti-robber-mac-security-script.html/comment-page-1#comment-26041</link>
		<dc:creator>uxp</dc:creator>
		<pubDate>Thu, 19 Nov 2009 03:21:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.mactricksandtips.com/?p=904#comment-26041</guid>
		<description>Looks like iSightCapture is broken on Snow Leopard. I&#039;m not aware of any alternatives.</description>
		<content:encoded><![CDATA[<p>Looks like iSightCapture is broken on Snow Leopard. I&#8217;m not aware of any alternatives.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alan</title>
		<link>http://www.mactricksandtips.com/2008/09/phone-home-anti-robber-mac-security-script.html/comment-page-1#comment-20291</link>
		<dc:creator>Alan</dc:creator>
		<pubDate>Fri, 21 Aug 2009 11:13:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.mactricksandtips.com/?p=904#comment-20291</guid>
		<description>One other thing - is it possible to modify the above to use sendmail instead of mailx? The attachment being sent out to the particular email service (yahoo) is garbled, starting with &quot;Begin 644&quot;</description>
		<content:encoded><![CDATA[<p>One other thing &#8211; is it possible to modify the above to use sendmail instead of mailx? The attachment being sent out to the particular email service (yahoo) is garbled, starting with &#8220;Begin 644&#8243;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alan Wong</title>
		<link>http://www.mactricksandtips.com/2008/09/phone-home-anti-robber-mac-security-script.html/comment-page-1#comment-20276</link>
		<dc:creator>Alan Wong</dc:creator>
		<pubDate>Fri, 21 Aug 2009 03:22:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.mactricksandtips.com/?p=904#comment-20276</guid>
		<description>I&#039;ve adjusted the script to not check a webserver on a constant basis. Instead, I&#039;ve created a dummy non-passworded user account that isn&#039;t used normally. How would i set cron up to run the script regularly only when this other user is logged in?</description>
		<content:encoded><![CDATA[<p>I&#8217;ve adjusted the script to not check a webserver on a constant basis. Instead, I&#8217;ve created a dummy non-passworded user account that isn&#8217;t used normally. How would i set cron up to run the script regularly only when this other user is logged in?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: moidsch</title>
		<link>http://www.mactricksandtips.com/2008/09/phone-home-anti-robber-mac-security-script.html/comment-page-1#comment-12886</link>
		<dc:creator>moidsch</dc:creator>
		<pubDate>Thu, 26 Mar 2009 21:54:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.mactricksandtips.com/?p=904#comment-12886</guid>
		<description>Hi, I tried to follow all the instructions, and everything went smoothly, screenshot and isght cap worked perfectly, the ip was logged as well as serial number. But when I receive the e-mail (using a gmail powered server) it does not come with an attachment. I think it uses the zip as the text and prints it. The result is not usable.

Do you know a way I can correct that?

And congratulations for a very good tip.</description>
		<content:encoded><![CDATA[<p>Hi, I tried to follow all the instructions, and everything went smoothly, screenshot and isght cap worked perfectly, the ip was logged as well as serial number. But when I receive the e-mail (using a gmail powered server) it does not come with an attachment. I think it uses the zip as the text and prints it. The result is not usable.</p>
<p>Do you know a way I can correct that?</p>
<p>And congratulations for a very good tip.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://www.mactricksandtips.com/2008/09/phone-home-anti-robber-mac-security-script.html/comment-page-1#comment-5582</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Mon, 03 Nov 2008 19:14:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.mactricksandtips.com/?p=904#comment-5582</guid>
		<description>@Cam, that is really strange. Email me so I can have a closer look at your script. Please send it as a .txt so it doesn&#039;t get caught in any of my filters.</description>
		<content:encoded><![CDATA[<p>@Cam, that is really strange. Email me so I can have a closer look at your script. Please send it as a .txt so it doesn&#8217;t get caught in any of my filters.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cam</title>
		<link>http://www.mactricksandtips.com/2008/09/phone-home-anti-robber-mac-security-script.html/comment-page-1#comment-5497</link>
		<dc:creator>Cam</dc:creator>
		<pubDate>Sun, 02 Nov 2008 13:10:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.mactricksandtips.com/?p=904#comment-5497</guid>
		<description>Sorry! That should be line 62, not 64.</description>
		<content:encoded><![CDATA[<p>Sorry! That should be line 62, not 64.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cam</title>
		<link>http://www.mactricksandtips.com/2008/09/phone-home-anti-robber-mac-security-script.html/comment-page-1#comment-5496</link>
		<dc:creator>Cam</dc:creator>
		<pubDate>Sun, 02 Nov 2008 12:40:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.mactricksandtips.com/?p=904#comment-5496</guid>
		<description>Okay, I have removed all of the instances of the variable $thedate, but now it keeps telling me 

/Users/.../Test/robber.sh: line 64: unexpected EOF while looking for matching `&quot;&#039;
/Users/.../Test/robber.sh: line 68: syntax error: unexpected end of file

this is what my line 64 looks like

uuencode &quot;$pathtest.zip&quot; &quot;$pathtest.zip&quot; &#124; mailx -s &quot;Robber Logged on $thedate at $extip&quot; cam022408@gmail.com</description>
		<content:encoded><![CDATA[<p>Okay, I have removed all of the instances of the variable $thedate, but now it keeps telling me </p>
<p>/Users/&#8230;/Test/robber.sh: line 64: unexpected EOF while looking for matching `&#8221;&#8216;<br />
/Users/&#8230;/Test/robber.sh: line 68: syntax error: unexpected end of file</p>
<p>this is what my line 64 looks like</p>
<p>uuencode &#8220;$pathtest.zip&#8221; &#8220;$pathtest.zip&#8221; | mailx -s &#8220;Robber Logged on $thedate at $extip&#8221; <a href="mailto:cam022408@gmail.com">cam022408@gmail.com</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://www.mactricksandtips.com/2008/09/phone-home-anti-robber-mac-security-script.html/comment-page-1#comment-5493</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Sun, 02 Nov 2008 11:45:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.mactricksandtips.com/?p=904#comment-5493</guid>
		<description>You will need to make sure you have the correct path. Make sure you encompass any spaces with quote marks or don&#039;t have a file path with any spaces.</description>
		<content:encoded><![CDATA[<p>You will need to make sure you have the correct path. Make sure you encompass any spaces with quote marks or don&#8217;t have a file path with any spaces.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cam</title>
		<link>http://www.mactricksandtips.com/2008/09/phone-home-anti-robber-mac-security-script.html/comment-page-1#comment-5479</link>
		<dc:creator>Cam</dc:creator>
		<pubDate>Sun, 02 Nov 2008 05:53:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.mactricksandtips.com/?p=904#comment-5479</guid>
		<description>Hey, AWESOME post. Thanks so much. I just have a question. The first time I try to run the script terminal comes back with :

... line 37: ... Nov  2 13:42:49 HKT 2008.txt: No such file or directory

about 7 times, do you have an explanation or a fix for this?

Thanks much.</description>
		<content:encoded><![CDATA[<p>Hey, AWESOME post. Thanks so much. I just have a question. The first time I try to run the script terminal comes back with :</p>
<p>&#8230; line 37: &#8230; Nov  2 13:42:49 HKT 2008.txt: No such file or directory</p>
<p>about 7 times, do you have an explanation or a fix for this?</p>
<p>Thanks much.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Print Selected Info From Terminal Commands &#124; Mac Tricks And Tips</title>
		<link>http://www.mactricksandtips.com/2008/09/phone-home-anti-robber-mac-security-script.html/comment-page-1#comment-3036</link>
		<dc:creator>Print Selected Info From Terminal Commands &#124; Mac Tricks And Tips</dc:creator>
		<pubDate>Mon, 15 Sep 2008 14:06:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.mactricksandtips.com/?p=904#comment-3036</guid>
		<description>[...] using the bash Terminal, you may only want to select certain parts of a commands output. In my previous tutorial I used this command extensively. For example cutting certain pieces of information out of the [...]</description>
		<content:encoded><![CDATA[<p>[...] using the bash Terminal, you may only want to select certain parts of a commands output. In my previous tutorial I used this command extensively. For example cutting certain pieces of information out of the [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://www.mactricksandtips.com/2008/09/phone-home-anti-robber-mac-security-script.html/comment-page-1#comment-2852</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Mon, 08 Sep 2008 07:22:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.mactricksandtips.com/?p=904#comment-2852</guid>
		<description>Thanks for your comment Mike.

I like the SSH idea, I didn&#039;t think of something like that. Would be quite useful. 

Curl. I though about using curl, but I prefer using wget. When I tried it with curl it didn&#039;t have the results I wanted.

Screencapture. That functions works perfectly well for me. I received no problems.</description>
		<content:encoded><![CDATA[<p>Thanks for your comment Mike.</p>
<p>I like the SSH idea, I didn&#8217;t think of something like that. Would be quite useful. </p>
<p>Curl. I though about using curl, but I prefer using wget. When I tried it with curl it didn&#8217;t have the results I wanted.</p>
<p>Screencapture. That functions works perfectly well for me. I received no problems.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike H</title>
		<link>http://www.mactricksandtips.com/2008/09/phone-home-anti-robber-mac-security-script.html/comment-page-1#comment-2845</link>
		<dc:creator>Mike H</dc:creator>
		<pubDate>Mon, 08 Sep 2008 00:19:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.mactricksandtips.com/?p=904#comment-2845</guid>
		<description>I&#039;ve done a very similar script (mine&#039;s perl) for my Macbook.  I always thought about generalizing it for anyone to use and releasing it for free, but you beat me to it. ;)

Like yours, my script checks in with my external web server to see if it&#039;s stolen.  If so, it takes a screenshot and isight grab, and uploads them to my server.  In addition, mine will create an ssh connection to that same server (I have shell access there) with a tunnel back into my Macbook.  That way I can login to the Macbook itself, regardless of where it is, or whether it&#039;s behind a typical home router.

A couple of minor notes:

- OS X comes with &quot;curl&quot; installed out of the box.  curl works very much like wget, so it may be easier to use that in the script rather than downloading wget separately.

- As of the OS X 10.5.4 update, I could no longer run screencapture directly from the script, for the same reason that isightgrab stopped working in one of the Tiger updates: they made it so you can&#039;t run it from ssh or cron.  The same AppleScript trick works for both isightgrab and screencapture.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve done a very similar script (mine&#8217;s perl) for my Macbook.  I always thought about generalizing it for anyone to use and releasing it for free, but you beat me to it. ;)</p>
<p>Like yours, my script checks in with my external web server to see if it&#8217;s stolen.  If so, it takes a screenshot and isight grab, and uploads them to my server.  In addition, mine will create an ssh connection to that same server (I have shell access there) with a tunnel back into my Macbook.  That way I can login to the Macbook itself, regardless of where it is, or whether it&#8217;s behind a typical home router.</p>
<p>A couple of minor notes:</p>
<p>- OS X comes with &#8220;curl&#8221; installed out of the box.  curl works very much like wget, so it may be easier to use that in the script rather than downloading wget separately.</p>
<p>- As of the OS X 10.5.4 update, I could no longer run screencapture directly from the script, for the same reason that isightgrab stopped working in one of the Tiger updates: they made it so you can&#8217;t run it from ssh or cron.  The same AppleScript trick works for both isightgrab and screencapture.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://www.mactricksandtips.com/2008/09/phone-home-anti-robber-mac-security-script.html/comment-page-1#comment-2741</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Fri, 05 Sep 2008 12:04:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.mactricksandtips.com/?p=904#comment-2741</guid>
		<description>You can. In the cron script simply change */5 to */10 and it will work every ten minutes.</description>
		<content:encoded><![CDATA[<p>You can. In the cron script simply change */5 to */10 and it will work every ten minutes.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: darek</title>
		<link>http://www.mactricksandtips.com/2008/09/phone-home-anti-robber-mac-security-script.html/comment-page-1#comment-2740</link>
		<dc:creator>darek</dc:creator>
		<pubDate>Fri, 05 Sep 2008 12:02:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.mactricksandtips.com/?p=904#comment-2740</guid>
		<description>Great, 
something like this is provided by Undercover but it&#039;s not free.
I&#039;ll check this scripts.
It would be good, thath script could take pictures in 10minutes interval.</description>
		<content:encoded><![CDATA[<p>Great,<br />
something like this is provided by Undercover but it&#8217;s not free.<br />
I&#8217;ll check this scripts.<br />
It would be good, thath script could take pictures in 10minutes interval.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://www.mactricksandtips.com/2008/09/phone-home-anti-robber-mac-security-script.html/comment-page-1#comment-2734</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Fri, 05 Sep 2008 10:29:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.mactricksandtips.com/?p=904#comment-2734</guid>
		<description>That is weird. From the sounds of it, it is probably due to something wrong with your computers permissions. I hope you get it sorted out.</description>
		<content:encoded><![CDATA[<p>That is weird. From the sounds of it, it is probably due to something wrong with your computers permissions. I hope you get it sorted out.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kresten H. Jacobsen</title>
		<link>http://www.mactricksandtips.com/2008/09/phone-home-anti-robber-mac-security-script.html/comment-page-1#comment-2691</link>
		<dc:creator>Kresten H. Jacobsen</dc:creator>
		<pubDate>Thu, 04 Sep 2008 23:57:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.mactricksandtips.com/?p=904#comment-2691</guid>
		<description>Just to finish things off. ioreg and screencapture can be found at
&lt;code&gt;/usr/sbin/&lt;/code&gt;
I don&#039;t get any errors now, but I only get a (totally) black screenshot. Wierd.</description>
		<content:encoded><![CDATA[<p>Just to finish things off. ioreg and screencapture can be found at<br />
<code>/usr/sbin/</code><br />
I don&#8217;t get any errors now, but I only get a (totally) black screenshot. Wierd.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kresten H. Jacobsen</title>
		<link>http://www.mactricksandtips.com/2008/09/phone-home-anti-robber-mac-security-script.html/comment-page-1#comment-2690</link>
		<dc:creator>Kresten H. Jacobsen</dc:creator>
		<pubDate>Thu, 04 Sep 2008 23:33:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.mactricksandtips.com/?p=904#comment-2690</guid>
		<description>The problem persists. Just with different commands. ioreg, screencapture... Testing if there is anything else. If I post too many comments you can jus delete them afterwards.</description>
		<content:encoded><![CDATA[<p>The problem persists. Just with different commands. ioreg, screencapture&#8230; Testing if there is anything else. If I post too many comments you can jus delete them afterwards.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kresten H. Jacobsen</title>
		<link>http://www.mactricksandtips.com/2008/09/phone-home-anti-robber-mac-security-script.html/comment-page-1#comment-2689</link>
		<dc:creator>Kresten H. Jacobsen</dc:creator>
		<pubDate>Thu, 04 Sep 2008 23:21:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.mactricksandtips.com/?p=904#comment-2689</guid>
		<description>Yeah, I used mailx to identify the problem too. Didn&#039;t get the answer right though. 

Thanks for the ultra fast response!</description>
		<content:encoded><![CDATA[<p>Yeah, I used mailx to identify the problem too. Didn&#8217;t get the answer right though. </p>
<p>Thanks for the ultra fast response!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

