Go Back   Velocity Reviews > Newsgroups > Python
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

Python - keylogger in Python

 
Thread Tools Search this Thread
Old 07-31-2005, 09:37 PM   #11
Default Re: keylogger in Python


[Michael Hoffman]
>>You think this is a suitable beginner project?


[Francois Pinard]
> One surely learns a lot!


I can agree with that!
--
Michael Hoffman


Michael Hoffman
  Reply With Quote
Old 08-01-2005, 04:15 AM   #12
Premshree Pillai
 
Posts: n/a
Default Re: keylogger in Python
On 30 Jul 2005 01:11:32 -0700, Jay <> wrote:
> ok, i thought for 2 seconds i might have created a Keylogger in python
> keylogging = keylogger()
> keylog = open("keylog2.log", "w")
> text = raw_input()
>
> keylog.write(text)
> keylog.close
> keylog = open("keylog2.log", "r")
> keylog.read


OMG!

--
Premshree Pillai
http://www.livejournal.com/users/premshree/


Premshree Pillai
  Reply With Quote
Old 08-01-2005, 06:46 AM   #13
Bengt Richter
 
Posts: n/a
Default Re: keylogger in Python
On Sat, 30 Jul 2005 18:21:09 GMT, Dennis Lee Bieber <> wrote:

>On 30 Jul 2005 01:11:32 -0700, "Jay" <> declaimed the
>following in comp.lang.python:
>
>> ok, i thought for 2 seconds i might have created a Keylogger in python

>

[...]
>
> Doing key logging is highly OS dependent. Under AmigaOS, one
>would inject a key handler at high-priority into the OS input stream
>chain (a linked list of priority ordered programs that want to see
>input). The logger would receive, on its input port, an OS packet with
>the timestamp and key codes, could log it, and then return it to the OS
>to be passed to the next program in the chain (some programs consume the
>stream and don't pass it on). It was also easy to inject fake events --
>a program could inject, for example, disk-change events that other
>programs would respond to.
>
> On Windows... I don't know for sure... Chapter 27 of
>"Programming Applications for Microsoft Windows 4th Ed." might be of use
>(may also be a more up-to-date version available too). It shows some
>system call of AttachThreadInput() being used to link a program's input
>stream (queue in the book's terminology) to another program so both
>receive the same data (I think). You're logger would have to hook into
>the process start-up system so that it could link to every process that
>might be reading keys.


I'd go to

http://msdn.microsoft.com/library/en...rnalrecordhook

for starters. Also, if you have a w32 sdk, you likely have the source for an old windows message "spy" program (in C),
along with makefile and bits and pieces it needs. You could cannibalize to do specifically keyboard-oriented stuff, and
differentiate alt-stuff from plain stuff etc. You can also monitor the activity of individual widgets and whatnot and
copy the messages they receive to change text and resize and all manner of stuff.

Try typing spyxx.hlp and see if spy++ help comes up. Or possibly run an older spy.exe for an
example of interactively selecting what to monitor. Then you could write a C module to provide
a python interface to those capabilities. Have fun

Regards,
Bengt Richter


Bengt Richter
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Python Cgi Webserver sagar123 Software 1 04-23-2009 06:32 PM
Monty Python and the Holy Grail SE DVD questions Mark DVD Video 0 04-11-2005 05:29 PM
Monty Python Meaning of Life DVD hotline problems Robert Kaiser DVD Video 3 05-11-2004 06:38 AM
Help regarding damaged Monty Python DVD? Bex DVD Video 5 04-16-2004 02:11 AM
Universal Python Meaning Of Life reply Peter Williams DVD Video 31 09-27-2003 09:13 PM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46