怎么样把从窗口服务的所有按键?按键、窗口

2023-09-04 04:56:24 作者:你是我不愿醒来的梦

我看到了一些软件,记录被输入,它是安装在计算机上的所有按键的一天。我将如何去写这样的使用.NET Windows服务?

I saw some 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?

推荐答案

只需使用的 调用SetWindowsHookEx()

Just use the SetWindowsHookEx()

请注意:您不需要为这个管理员权限,我还没有找到一个单一的病毒扫描软件或恶意软件的工具抱怨code使用这种。 AFAIK,竟然没有一个API来枚举所有已安装的挂钩,所以任何人都可以安装在Windows系统上一个键盘记录器,也没有办法发现。

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.