Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Killyp

macrumors 68040
Original poster
Jun 14, 2006
3,859
7
The recent thread about the stolen MBP has made me wonder if I can do something about this on my MBP.

I was thinking it would be cool if I could get my MBP to send an email with it's internet IP address to a different email account (a hotmail account) on each startup? How would I do this?
 
Do you need it to get your external IP address (Network Address Translation) or would it be an enviroment without NAT?

If it is without nat, what you could do is write a very quick batch script
ifconfig en1 > /Volumes/ftp_server/current_ip.txt

If you use NAT, then you could just use automator to send you an e-mail every day and then just look at the header of the e-mail to get the current external IP address of the computer.
 
The bonus of the batch script is that it can run almost undetected through cron as it would only take 1-2 cycles where it would appear in the Activity Monitor. Additionally, if you install wget, you can do the following to get the external IP address...

wget http://www.whatismyip.org/ > /Volumes/ftp/current_ip.txt
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.