You are not logged in.

#1 2009-09-10 22:55:05

morecowbell
Member
From: USA
Registered: 2009-09-10
Posts: 9

SMS remote shell

I don't have one of those fancy phones with ssh or internet capabilities (that i feel like paying for), but i wanted to be able to control my computer remotely from my phone.  My phone can text to an email address that my computer can access.  So i made a bash script that searches through emails for special SMS commands.

#! /bin/bash

$(grep smscmd path/to/Inbox | tail -1 | cut -d\  -f 3-)

So if i emailed myself the text:

smscmd mplayer videos/*

It will execute that. Now my phone is a fancy remote smile

Right now i have it set up to run in a thunderbird filter that checks if it's from my phone before executing. Any security improvements to stop random people from accessing my shell would be appreciated. Or anything else smile

Offline

#2 2009-09-11 00:52:00

Varreon
Member
Registered: 2008-07-03
Posts: 95

Re: SMS remote shell

I wrote the same program, but used python. I include a password within the first digits of the message. The script breaks off x digits from the beginning of the message, and will not parse the command unless the password matches.

Last edited by Varreon (2009-09-11 00:52:22)

Offline

#3 2009-09-11 02:06:03

sand_man
Member
From: Australia
Registered: 2008-06-10
Posts: 2,164

Re: SMS remote shell

That's pretty cool. What kind of thing would you use it for though? pacman -Syu ?? lol


neutral

Offline

#4 2009-09-11 02:10:50

moljac024
Member
From: Serbia
Registered: 2008-01-29
Posts: 2,676

Re: SMS remote shell

sand_man wrote:

That's pretty cool. What kind of thing would you use it for though? pacman -Syu ?? lol

rtorrent porn tongue


The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...

Offline

#5 2009-09-11 02:27:34

morecowbell
Member
From: USA
Registered: 2009-09-10
Posts: 9

Re: SMS remote shell

haha. I'm not sure. What would be useful? Would it be worthwhile to make it reply with the stdout? then i could get information stored on my computer from anywhere.  I don't really have anything I would want to access from my phone though.

Or i could get it to picture and video message me porn...

Offline

#6 2009-09-11 02:37:34

moljac024
Member
From: Serbia
Registered: 2008-01-29
Posts: 2,676

Re: SMS remote shell

Or if someone else in your house uses the computer you can make it pop up porn while they're at it...they won't know what hit 'em tongue


The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...

Offline

#7 2009-09-11 03:02:16

morecowbell
Member
From: USA
Registered: 2009-09-10
Posts: 9

Re: SMS remote shell

echo "She would still be alive now" | xmessage -center -file -

Offline

#8 2009-09-11 03:18:09

tomd123
Developer
Registered: 2008-08-12
Posts: 565

Re: SMS remote shell

morecowbell wrote:
echo "She would still be alive now" | xmessage -center -file -

lol

Offline

#9 2009-09-11 03:52:30

atordo
Member
Registered: 2007-04-21
Posts: 147

Re: SMS remote shell

Also have a look at the "eject" command. Quite funny when the CD tray starts to open and close at its own will.

Offline

Board footer

Powered by FluxBB