AutoHotkey Community

It is currently May 26th, 2012, 10:43 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: TweetMyPC with AHK
PostPosted: July 6th, 2009, 1:49 pm 
Offline

Joined: March 27th, 2009, 12:46 pm
Posts: 76
Location: Dublin, IE
I was looking through my feeds and came across a nice little program called TweetMyPC. I like the idea to be able to control my PC remotely simply by using Twitter, but I didn't like that fact that I couldn't make my own commands. So I thought I'd start a script that will be similar to TweetMyPC. It'll look at the Twitter account and wait for instructions.

What do you guys think? I'd like to hear what type of commands you'd guys like to have.

_________________
My Scripts


Last edited by Voltron43 on July 6th, 2009, 8:23 pm, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 6th, 2009, 2:53 pm 
I like the idea, but I'm afraid there are too many security issues and a lot of work to get those right.

You'll be sending your username/password in the open along with the link if you use httpQuery or curl, so not really usable if you are on a "not-trusted" computer.

To be able to get a secure connection, you'd need to implement OAuth with curl/libcurl, or use a browser, or even include a browser with your project, I had a look at that, but it's a bit too much.

Next, if you do decide to skip the OAuth thing, you'd have to create a specific Twitter account that is private, and only connected to your "control" account.

Moreover, sending plain text commands is quite tricky too. You'd be better off encoding the commands before sending, and have the listening program decode them, so your commands won't be in the open (and it can help condensing your commands into the 140 character limit if your commands are too long for that).

And I guess you'd have to build in some extra security measures, such as including and checking on IP in the command, or adding extra password checking to make sure you are who you claim you are.

Sending plain commands with username and password out in the open is probably not such a good idea if you want to control your computer like that.


Report this post
Top
  
Reply with quote  
 Post subject: Re:
PostPosted: September 15th, 2009, 6:45 pm 
Offline

Joined: January 10th, 2009, 6:40 pm
Posts: 32
I was thinking about doing something like this recently. The reason I too came up with this idea and found this thread is that I was looking for a way to be able to execute simple tasks on my PC remotely by texting from my phone, without having to buy extra gears.
My idea would be to:
- create a private twitter account for this project
- the command sent in the text message must be short, so I'd use prewritten (ahk) scripts/tasks to control the PC and the text message would contain only the name of the script(s)/task(s) to be executed
- the command syntax would go something like this: A | B | C
where: A is a string that indicates to the script that this is a command, B is a password that the script uses to identify the author of command, and C is the task's/prewritten script's name to execute.

The script would check the twitter account for new tweets in every N minutes, if the tweet would contain A, and B would check out, the script would execute C and delete the tweet.

I was also thinking about implementing a function to make the script to hibernate and wake up at specific times to check for new commands.

As for the security: If I'd want to control my PC remotely and I'd know I'll have computer access, I'd probably use something a little more sophisticated, than this script, but still, this script can really be useful.

Cheers,
gahks


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Re:
PostPosted: September 15th, 2009, 8:38 pm 
Offline

Joined: March 27th, 2009, 12:46 pm
Posts: 76
Location: Dublin, IE
Gahks,

I'm in the middle of writing my own project <but haven't released it yet> that does exactly this.

I can PM you the link to my project if you'd like to see what I've done so far. Included in the file is a todo list of things that need to be fixed or added.

gahks wrote:
- the command syntax would go something like this: A | B | C

My syntax is:
Code:
#Run [variable]

#Logoff

#GetIP

#Close [process]

#Email off

etc.

where [variable] is a predefined path.

I also have other preset commands such as shutdown, restart, logoff, GetIP, etc.

As for security, I'd like to use OAuth, but I haven't quite figured out how to implement it yet. Currently, the program sends your Twitter username and password to Twitter insecurely.

_________________
My Scripts


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 15th, 2009, 9:24 pm 
Offline

Joined: May 2nd, 2006, 11:16 pm
Posts: 800
Location: Greeley, CO
I like the concept and will be watching for a release.

_________________
Image
SoggyDog
Dwarf Fortress:
"The most intriguing game I've ever played."


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: fincs and 5 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group