I wanted to create a keylogger. I found a tutorial on it, and I coded it correctly, and it works. I understand basically all of the code, except for the stealth method:
void Stealth()
{
HWND stealth;
AllocConsole();
stealth = FindWindowA("ConsoleWindowClass", NULL);
ShowWindow(stealth,SW_HIDE);
}
if someone could give me a line by line break down of what is happening in this method, that would be absolutely amazing.
declare a window handle.
Allocates a new console for the calling process.
Find the window handle with class name “ConsoleWindowClass”.
Hide it.