Hook注入读取GetCommandLineA

易语言 2020-09-02 15:58:04

Hook注入读取GetCommandLineA

.如果真 (Code = #HC_ACTION 且 位与 (右移 (Lparam, 31), 1) = 0)
.如果真 (Wparam = #Home键 且 位与 (右移 (Lparam, 31), 1) = 0)
.如果真 (是否已创建 (From1) = 假)
载入 (From1, , 假)
CommandlineAddr = GetProcAddress (LoadLibrary (“kernel32.dll”), “GetCommandLineA”) + 1
buf = 取空白字节集 (512)
temp = 取空白字节集 (4)
ReadProcessMemory (GetCurrentProcess (), CommandlineAddr, temp, 4, 0)
b = 取字节集数据 (temp, #长整数型, )
ReadProcessMemory (GetCurrentProcess (), b, temp, 4, 0)
c = 取字节集数据 (temp, #长整数型, )
ReadProcessMemory (GetCurrentProcess (), c, buf, 512, 0)
From1.编辑框1.加入文本 (到文本 (buf))
.如果真结束

.如果真结束

.如果真结束
返回 (CallNextHookEx (Hook, Code, Wparam, Lparam))