[XBOX] Daily auto email IP address
#1
My xbox loaded with XMBC was stolen recently and got me thinking. It would be nice to be able to have XBMC email it's public IP address upon wake-up or on daily basis to a specified email or list of email addresses, providing an easy solution to locate the xbox every time its IP address changes. Im sure that you could use a relatively static site like whatismyip.com to scrape your public IP address to be emailed.

This way, everytime the xbox gets put on a network with internet access, the public IP address for the network gets emailed to my email account and i would know where it was.
Reply
#2
Definitely not a job for XBMC. Maybe toss it in a script.
Reply
#3
does that mean i have to learn to script if i want to be able to do this?
Reply
#4
i think jmarshall might be interested in this. but it seems pretty simple to disable?
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#5
Unless you can con someone else into doing it for you, yes.
Reply
#6
You won't really need to 'learn' scripting.

I'm pretty sure a google search for 'how to send email with python', and looking at any of the getHTML() function in one of mine (or any other plugin, or any of the billion examples google would return) will be all you need. You don't even need regex for this, you can just email everything getHTML returns.

Also refer to xbmc.org/wiki for autoexec.py

Sucks your xbox got stolen.
Always read the XBMC online-manual, FAQ and search and search the forum before posting.
For troubleshooting and bug reporting please read how to submit a proper bug report.

If you're interested in writing addons for xbmc, read docs and how-to for plugins and scripts ||| http://code.google.com/p/xbmc-addons/
Reply
#7
it might be easy to disable, but most people wont know what they are looking for or how to stop it. chances are that message is going to get out if it gets on the internet.
Reply
#8
It isn't possible, as far as i know, to get an address from an ip address... So you can't do any useful with it.

You can better create a webpage on a website with a 0 if you want your xbox to work, and a 1 if it is stolen.
All you need to do then is check that webpage for a 0 or an 1, if it is 1 then turn off the xbox, and if it is 0 do nothing.
Reply
#9
Veda Wrote:It isn't possible, as far as i know, to get an address from an ip address... So you can't do any useful with it.

You can better create a webpage on a website with a 0 if you want your xbox to work, and a 1 if it is stolen.
All you need to do then is check that webpage for a 0 or an 1, if it is 1 then turn off the xbox, and if it is 0 do nothing.

This method has been used before to successfuly recover stolen goods.

IP address is unique to you at a particular time on an ISP.

So if the script gets the current time from a time server (this allows data to be matched as the difference between then and the ISP logs can be identified). The IP address can be resolved to an DNS address which in the case of virgin cable is something like "cpc1-cmbg2-0-0-cust000.cmbg.cable.ntl.com" (<- Mine with a few bits changed), the isp can (after a court order is served by the police) look up the customer details including address.

Provide the police with that info and viola you get your may gear back..


Code:
#!/usr/bin/perl -w
#
# rdns.pl
#
# Copyright 2008 Ryan McLean
#
use strict;
use LWP;
use HTML::Parser;

my $rdnsServer = 'http://remote.12dt.com/lookup.php';

my $ip = "";
if ($ARGV[0]) {
        $ip = $ARGV[0];
}

if ("$ip" ne "") {

        my $ua = LWP::UserAgent->new();
        $ua->agent('Mozilla/4.76 [en] (Win98; U)');

        my $res = $ua->post($rdnsServer,
          [
            ip => "$ip",
            Submit => 'Lookup'
          ]
        );

        my $content = $res->content;
        my $results = "";

        if ( $content =~ m{>Results(<.*)<form action="whois.php"} ) {
                $results = $1;
        } elsif ( $content =~ m{>Results(<.*)</div><p align=left>} ) {
                $results = $1;
        } else {
                $results = "ERROR";
        }

        my $text = '';

        my $p = new HTML::Parser;
        $p->handler(text => sub{$text .= $_[1]});
        $p->parse($results);

        $text =~ s/[\s]?"/ "/g;
        print $text . "\n";
}

there is perl code i wrote for ip -> dns. covert that to python and thats some of the work done.
Reply
#10
what sort of incentive would i have to offer to raise someones interest in implementing this?
Reply

Logout Mark Read Team Forum Stats Members Help
[XBOX] Daily auto email IP address0