How would I capture all keystrokes from a windows service?
I saw som开发者_开发技巧e software the other day that logs all keystrokes that are typed on the machine that it is installed on. How would I go about writing something like this using a .NET Windows service?
Just use the SetWindowsHookEx()
Note: You don't need admin rights for this and I haven't found a single virus scanner or malware tool complain about code which uses this. AFAIK, there isn't even an API to enumerate all installed hooks, so anyone can install a keyboard logger on Windows systems and there is no way to notice.
Take a look at: http://www.codeproject.com/KB/system/globalsystemhook.aspx
精彩评论