Active Topics

 


Reply
Thread Tools
Posts: 22 | Thanked: 19 times | Joined on Nov 2009
#21
Oh, I see, that would be easy to check though, can update the script in a little while (to check for external connection), however that might not always be desired?

It doesn't sound too hard to start a reverse port forward if there exists a file on the server, however it might take a while for the phone to recognize the file considering it only checks for it when a new connection is established. Could be crontabed though.

Just on a side note, the N900 and the SSH server does per default accept connections even on the gprs0 interface? I'm having some troubles connecting but my ISP claims they don't block any ports :/

Edit: I beleave I just have to add the following line to the file, though i have not tested it..

Code:
if [ "$ICD_CONNECTION_TYPE" != GPRS ]; then
        exit 0
fi
So in the end the file /etc/network/if-up.d/10_send_ip would look like this

Code:
#!/bin/sh

if [ "$ICD_CONNECTION_TYPE" != GPRS ]; then
        exit 0
fi
SERVER_HOST=host.to.server.org
LOGGFILE=n900_ip_logg
ip=`ifconfig gprs0 | awk '/inet addr/ { print $2 }' | awk -F: '{ print $2 }'`
ssh -F /home/user/.ssh/config $SERVER_HOST "echo `date` $ip >> $LOGGFILE"

Last edited by ecksun; 2010-03-15 at 16:39.
 

The Following User Says Thank You to ecksun For This Useful Post:
Posts: 217 | Thanked: 20 times | Joined on Jan 2010
#22
It could be triggered by SMS to the phone.
If SIM card changed, then detect it and use it to send an SMS to other phone, so you will have the new SIM's phone number.
 
Posts: 243 | Thanked: 146 times | Joined on Dec 2009 @ Knowhere
#23
This is fascinating stuff.

I am still thinking about how to get this script working on my N900 and about where it should send the file to, but I'm also wondering if we could have a little more information included in the file before it's sent. Nearby wireless AP for example. I know that iwlist wlan0 scan will give me MAC addresses and power levels and I can then use something like http://outflux.net to /geoloc/ to get a street.

Does this sound possible or have I missed the point?
 
Posts: 891 | Thanked: 499 times | Joined on Nov 2009 @ UK
#24
What I learnt from this, if I manage to nick a N900, I'll flash it
firmware AND eMMC just to be safe that no one can track me down

also i will buy a simcard with data connection blocked and use with the stolen phone

solution:
implement some sort of security protection for Flasher
__________________
Follow me on Twitter

Last edited by Venomrush; 2010-03-18 at 18:31.
 
speculatrix's Avatar
Posts: 880 | Thanked: 264 times | Joined on Feb 2007 @ Cambridge, UK
#25
I hacked up a script, designed to be run in a cron job, which gathers information about the machine's current internet connection and send it hidden in a ping message as well as via a UDP packet; I didn't think to interrogate the GPS as none of my computers have one built in, it'd be easy to add. The only thing it needs is

Here it is, please attempt improvements or offer ideas.

http://pastebin.com/SHf1ynzj
__________________
Fujitsu U820, HTC Vision/G2/DesireZ, Nokia N800 770 E71, Zaurus 6000, Palm T3, Zaurus C3100 - stolen
 
Posts: 4 | Thanked: 0 times | Joined on Dec 2009 @ Vermont, USA
#26
Would there be an easy way to have the phone send this off in an email? I'm thinking that it could run a few times a day and I can filter these off into a folder other than my inbox.
 
Posts: 243 | Thanked: 146 times | Joined on Dec 2009 @ Knowhere
#27
Originally Posted by speculatrix View Post
I hacked up a script, designed to be run in a cron job, which gathers information about the machine's current internet connection and send it hidden in a ping message as well as via a UDP packet; I didn't think to interrogate the GPS as none of my computers have one built in, it'd be easy to add. The only thing it needs is

Here it is, please attempt improvements or offer ideas.

http://pastebin.com/SHf1ynzj
Would you mind explaining this in a little more detail for us "special needs" types? I've never heard of sending info within a ping message and would appreciate it if you could take a few minutes to add a few explanatory notes to your script.
 
zvogt's Avatar
Posts: 118 | Thanked: 67 times | Joined on Dec 2009 @ Saint Louis, MO, USA
#28
Per this python-location thread I suggest adding an additional conditional check to the if statement in you GPS code. I was having problems with the first iteration through the loop returning inaccurate LAT/LONG data. If I only return a value when device.fix[6] is less than a constant (I chose a value of 2000), then I get the results I would expect.
 
Posts: 477 | Thanked: 118 times | Joined on Dec 2005 @ Munich, Germany
#29
Maybe I am pointing the obvious, but it is not necessary to use dyndns. If you have a voip account active on your N900, its i.p. is known from the registar.
 
casper27's Avatar
Posts: 844 | Thanked: 521 times | Joined on Jan 2009 @ UK southampton
#30
Any further with this guys? I can execute all the scripts via ssh in my won lan or when the phone is connected to another Lan. Its just when it is connected to data plan connection im hitting a stumbling block. I think Vodafone UK block it maybe?
There was a application a while back called RemoteSecurity that locked the phone when you sent a particular message to it. It had a few bugs but it worked.
Could it not work if say you nominate a Mob number as emergancy contact. If you then send a particular word/phrase from that mobile it could then lock the pone and send all this data Gps position ect back to nominated number. Also if a new sim is detected it could send the data to the emergancy number aswell as IP address if connected to WLan.
 
Reply


 
Forum Jump


All times are GMT. The time now is 08:26.