![]() |
|
|
|
#11 |
|
[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 |
|
|
|
|
#12 |
|
Posts: n/a
|
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 |
|
|
|
#13 |
|
Posts: n/a
|
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 |
|
![]() |
| Thread Tools | Search this Thread |
|
|
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 |