试图了解钩子? [英] Trying to understand hooks?

查看:127
本文介绍了试图了解钩子?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试了解钩子的过程.现在,我找到了一段代码,该代码来自于 A1VBCode 出于教育目的的开源网站上的按键记录器,请记住,我不关心恶意活动,但我注意到此人正在使用钩子钩住键盘上的键.这些是他的一些秘诀:

Im trying to understand the process of hooking. Now I have found a piece of code which was from a key logger found on A1VBCode an open source site for educational purposes, and keep in mind I have no concern for malicious activity but I noticed this guy is using hooks to hook the keys on the keyboard. These are a few of his hooks:

K_Return = &HD
K_Backspace = &H8
K_Space = &H20
K_Tab = &H9
K_Esc = &H1B
K_Control = &H11
K_LControl = &HA2
K_RControl = &HA3
K_Delete = &H2E
K_End = &H23
K_Home = &H24
K_Insert = &H2D



这些钩子代码在我尝试搜索的任何表中都找不到,例如ASCII表,我什至不知道自己是否在正确的区域中查找.我还从这里的代码项目中注意到:显示了API挂钩 [



These hook codes aren''t found on any tables I have tried searching for, like ASCII tables I dont even know if im looking in the right area. I also noticed from the code project here: API hooking revealed[^] where they explain it. What is the purpose of hooking and where can I find codes that represent each key on a board or for the mouse clicks etc?

推荐答案

据此ASCII图表 [ ^ ](据我所知,还有其他所有信息):

Return 键的键控代码的十进制值为13,或者为十六进制D(& HD)
Backspace 键的键控代码的十进制值为8或十六进制8(& H8)
Space 键的键控代码的十进制值为32,或十六进制的20(& H20)

我需要继续吗?
According to this ASCII chart[^] (and all others, so far as I know):

The decimal value for the keycode of the Return key is 13, or in hexadecimal D (&HD)
The decimal value for the keycode of the Backspace key is 8, or in hexadecimal 8 (&H8)
The decimal value for the keycode of the Space key is 32, or in hexadecimal 20 (&H20)

Need I continue?


这篇关于试图了解钩子?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆