Author Message

<  examples  ~  keytweeter

PostPosted: Tue Jun 30, 2009 6:03 pm
Joined: Fri Jun 27, 2008 4:49 amPosts: 453Location: Brooklyn
I wrote a keylogger that tweets every 140 characters I type http://twitter.com/keytweeter

Image

I know this is more conceptual than the usual ofw-interactive-installation-stuff, but still -- it wouldn't have been possible without ofw :)

I used:

- ofxXmlSettings to store some information like username, password, and filtered words (passwords, credit card numbers, ssn) that I consider "control" rather than "information".

- ofxThread to do the posting and keylogging asynchronously, so keys aren't lost when posts are being made.

- Some code I posted at http://www.openframeworks.cc/forum/viewtopic.php?f=9&t=1244 for handling window hiding (I use the Home and End keys to show and hide the debug console)

- ofEvents were used for the keylogger's callbacks. e.g.:

Code:
ofAddListener(logger.keyPressed, this, &AutoTweet::keyPressed);


See ofxKeyLogger for my windows-specific keylogger implementation. I know Arturo has some linux specific code and zach has some osx specific code -- both from oflab -- for doing keylogging. I tried to write ofxKeyLogger so that it could be extended for other OSes.

- I used the cURL binary and system() to invoke it. http://curl.haxx.se/

The biggest pain was getting some unicode sent to Twitter correctly to represent the arrow and return keys. I could represent the unicode in a string using \u escape sequences, but it would store it in multiple bytes -- so the character count was off. wstring correctly reported the size() of the buffer, but didn't like being sent to _wsystem. In the end I wrote a wrapper called ofxString that let me store ints instead of characters, with the ints corresponding to the OF_KEY mappings.

If you'd like to run the app yourself, just add a bin/data/config.xml that looks like this:

Code:
<username>twitterUsername</username>
<password>twitterPassword</password>
<safe>somePassword</safe>
<safe>creditCardNumber</safe>
<safe>SSN</safe>


And be sure to add the cURL binary to /bin or your system path.
Attachments:
File comment: r1 June 30, 2009
keytweeter.zip [5.62 KiB]
Downloaded 526 times

Offline Profile
PostPosted: Tue Jun 30, 2009 7:00 pm
Site AdminJoined: Thu Mar 01, 2007 10:03 pmPosts: 916Location: Amsterdam
awesome!
I could see a lot of evil and very fun uses for an ofxKeyLogger addon :)

would love to do something where you integrate an AI into the system so that it actually changes what you type as you type it. Kind of like this: http://fffff.at/tourettes-machine/ but for your whole machine :D

Theo



_________________
http://www.theowatson.com
Offline Profile
PostPosted: Tue Jun 30, 2009 7:16 pm
Joined: Fri Jun 27, 2008 4:49 amPosts: 453Location: Brooklyn
Yeah! You could totally do whole-machine tourettes :) There's a function on windows: http://msdn.microsoft.com/en-us/library/ms646310(VS.85).aspx that lets you synthesize mouse and keyboard input. I haven't used it yet, but it seems pretty awesome. I imagine it's what's used when programs implement "infinite scrolling"?

I'd like to do a project where I log my mouse movements and keystrokes for a while (a few months) and then use that to train a markov model that "acts like me". It would do lots of weird stuff because windows would never be in the same spots. It could make a great installation though :)

The tourettes thing is nice because it's kind of a diy/try it yourself sort of thing, while this is more "check this out -- it's fun conceptual-hacking-art". I'd like to try some more fffffatish stuff, but this is the first thing that came to mind.


Offline Profile
PostPosted: Wed Jul 01, 2009 8:09 pm
Joined: Fri Jun 27, 2008 4:49 amPosts: 453Location: Brooklyn
Score #3 for ofw + hackaday! http://hackaday.com/2009/07/01/twittering-keylogger/

Also, I posted the binaries w/ a readme if you'd like to play with it. http://kylemcdonald.net/keytweeter/keytweeter.zip


Offline Profile
PostPosted: Thu Jul 02, 2009 7:25 am
User avatarJoined: Mon Jan 19, 2009 7:02 amPosts: 214Location: sydney
hehe just trying wank out damn the tourretes honkey machine... pretty funny!



_________________
http://julapy.com/blog
Offline Profile
PostPosted: Wed Jul 15, 2009 4:09 pm
User avatarJoined: Mon May 14, 2007 10:57 amPosts: 720Location: Melbourne, Australia
Cool!

There's already a reference in this article to it...
:)

http://www.neural.it/art/2009/07/keytwe ... t_fi.phtml



_________________
Pierre Proske - www.digitalstar.net
Offline Profile
PostPosted: Wed Jul 15, 2009 4:14 pm
Joined: Fri Jun 27, 2008 4:49 amPosts: 453Location: Brooklyn
Yeah! I'm super excited about the neural article, it's the most "legitimate" thing I've been mentioned in yet :) I also think it's a great analysis of the idea, so it was encouraging to read.


Offline Profile
PostPosted: Wed Jul 15, 2009 9:51 pm
User avatarJoined: Mon May 14, 2007 10:57 amPosts: 720Location: Melbourne, Australia
Haha! Good to hear you're becoming more legit Kyle :wink:
Yeah the article is really nice...



_________________
Pierre Proske - www.digitalstar.net
Offline Profile

Display posts from previous:  Sort by:

All times are UTC
Page 1 of 1
8 posts
Users browsing this forum: No registered users and 3 guests
Search for:
Post new topic  Reply to topic
Jump to:  
You cannot post new topics in this forum
You cannot 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
cron