键盘记录器仅在使用特定应用程序时使用

Keylogger only used when using a specific application

本文关键字:应用程序 记录器 键盘      更新时间:2023-09-26

我应该查看哪些工具/参考,以便仅在用户输入专有企业应用程序时让定制的键盘记录器捕获数据?

例如,当用户在 excel 中键入时,没有任何反应。当他们切换到word时,我的应用程序意识到了这一点,并捕获了数据。请记住,我希望它与我们的专有(且不可修改)软件结合使用,因此我不能指望目标程序来协助该过程。

我计划用VBscript或JavaScript编写。只是一个业余编码员。

我希望这是有道理的。欢迎建议!

set service = GetObject ("winmgmts:")
for each Process in Service.InstancesOf ("Win32_Process")
    If Process.Name = "Progranametocheck.exe" then
        wscript.echo "Progranametocheck is running"
        wscript.quit
    End If
next
wscript.echo "Progranametocheck is not running"

上面的代码(VBscript)检查程序是否正在运行,并弹出一个弹出窗口告诉您它是否正在运行。要在程序正在运行时运行程序,请将:"wscript.echo "Progranametocheck 正在运行"替换为:

Set objShell = Nothing
Set objShell = WScript.CreateObject("WScript.Shell")
objShell.Run("""C:''dir''logger.exe""")
Set objShell = Nothing

所以它一起变成了:

set service = GetObject ("winmgmts:")
for each Process in Service.InstancesOf ("Win32_Process")
    If Process.Name = "Progranametocheck.exe" then
        Set objShell = Nothing
        Set objShell = WScript.CreateObject("WScript.Shell")
        objShell.Run("""C:''dir''logger.exe""")
        Set objShell = Nothing
        wscript.quit
    End If
next
wscript.echo "Progranametocheck is not running"
相关文章: