-
Notifications
You must be signed in to change notification settings - Fork 72
/
hyde.ahk
52 lines (44 loc) · 1.12 KB
/
hyde.ahk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/*
hyde.dll hides a process from the task manager on Windows 2000 - Windows 7
x86 & x64 bit OSes
Your process can inject it into other processes however you like. The example uses
SetWindowsHookEx with a CBT hook (the dll exports a CBTProc) to inject it into all
running processes.
Press Esc to exit the script.
Note: if you don't compile the script, AutoHotKey.exe gets hidden. Otherwise
the name of the .exe gets hidden.
*/
#SingleInstance,ignore
#notrayicon
#NoEnv
SetWorkingDir %A_ScriptDir%
OnMessage(0x15151,"Exit")
OnExit, ExitSub
hMod := DllCall("LoadLibrary", Str, "hyde.dll", Ptr) ;for x86
;hMod := DllCall("LoadLibrary", Str, "hyde64.dll", Ptr) ;for x64
if (hMod)
{
hHook := DllCall("SetWindowsHookEx", Int, 5, Ptr, DllCall("GetProcAddress", Ptr, hMod, AStr, "CBProc", ptr), Ptr, hMod, Ptr, 0, Ptr)
if (!hHook)
{
;~ MsgBox, SetWindowsHookEx failed
ExitApp
}
}
else
{
;~ MsgBox, LoadLibrary failed
ExitApp
}
;~ MsgBox, Process hidden
Return
;~ Esc::ExitApp
ExitSub:
if (hHook)
DllCall("UnhookWindowsHookEx", Ptr, hHook)
if (hMod)
DllCall("FreeLibrary", Ptr, hMod)
ExitApp
exit(){
ExitApp
}