AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

TweetMyPC with AHK

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> General Chat
View previous topic :: View next topic  
Author Message
Voltron43



Joined: 27 Mar 2009
Posts: 76
Location: Dublin, IE

PostPosted: Mon Jul 06, 2009 12:49 pm    Post subject: TweetMyPC with AHK Reply with quote

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 Mon Jul 06, 2009 7:23 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
n-l-i-d
Guest





PostPosted: Mon Jul 06, 2009 1:53 pm    Post subject: Reply with quote

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.
Back to top
gahks



Joined: 10 Jan 2009
Posts: 16

PostPosted: Tue Sep 15, 2009 5:45 pm    Post subject: Re: Reply with quote

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
Back to top
View user's profile Send private message
Voltron43



Joined: 27 Mar 2009
Posts: 76
Location: Dublin, IE

PostPosted: Tue Sep 15, 2009 7:38 pm    Post subject: Re: Reply with quote

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
Back to top
View user's profile Send private message Visit poster's website
SoggyDog



Joined: 02 May 2006
Posts: 621
Location: Greeley, CO

PostPosted: Tue Sep 15, 2009 8:24 pm    Post subject: Reply with quote

I like the concept and will be watching for a release.
_________________

SoggyDog
Dwarf Fortress:
"The most intriguing game I've ever played."
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> General Chat All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group