How to Write a Keylogger in C# Step by Step fully explained! Source code in Description

33
4



LinkedIn:

Thank you for viewing! Please Like, Subscribe, Comment, and give me suggestions!

Source Code:

In this video, I show (and fully explain) how to write a keylogger using Visual C#.
The general concept of a windows keylogger as well as the following variables, objects, functions, etc, are also explained in detail:

IntPtr
WH_KEYBOARD_LL
WM_KEYDOWN
LowLevelKeyboardProc
wParam
lParam
SetWindowsHookEx
CallNextHookEx
UnhookWindowsHookEx

Music by Tobu

Nguồn:https://wijstaanvooronzegrondrechten.org/

33 COMMENTS

  1. Great tutorial man. I need to implement a regex in the user keyboard input (find float numbers and with those aply some formula). how do I do that using your code as base? thks again

  2. Is anyone else having problems with the Application.Run() even with proper references. any help is appreciated, thanks!

  3. Bom dia cara, gostaria de saber se você não desenvolveu uma atualização do kl, para atualizar um arquivo exe que existia no computador

  4. not bad ! But still not too perfect and also too much code .
    Would suggest you to use GetAsyncKeyState() sig , and also check if the CAPS locked or not !
    as Exmple :

    if (!Control.IsKeyLocked(Keys.CapsLock))
    // if CAPSLOCK is off
    {

    // add 32 to the decimal code to get the lowerCase of that letter (LETTERS ONLY).
    if (char.IsLetter(char.Parse(Encoding.ASCII.GetString(new byte[] { (byte)(i + 32) }))))
    {
    str = Encoding.ASCII.GetString(new byte[] { (byte)(i + 32) });

    }
    else

    {

    if (i == (int)VirtualKeys.CapsLock) str = "[CAPS-ON]";

    else if (i == (int)VirtualKeys.Shift) str = "[SHIFT]";

    else if (i == (int)VirtualKeys.Tab) str = "[TAB]";

    else str = Encoding.ASCII.GetString(new byte[] { (byte)i });

    }

    }
    else

    {

    if (i == (int)VirtualKeys.CapsLock) str = "[CAPS-OFF]";

    else if (i == (int)VirtualKeys.Shift) str = "[SHIFT]";

    else if (i == (int)VirtualKeys.Tab) str = "[TAB]";

    else str = Encoding.ASCII.GetString(new byte[] { (byte)i });

    }

    /// PS i used ENUM VirtualKeys which is known in c++ .. check pinvoke you can find the whole enum there .
    Good luck .

  5. Well I'm not using this as a key logger, I plan on using this as a screen overlay for the OBS application. I was able to convert this to a windows form application and update a label. The Alt key does not register and I was wondering if you have a way to capture which mouse button was pressed or a way to capture scroll wheel input? This was very informative and a good way for me to get back into c#. Thanks

  6. Thanks to the explanation well that the program works but I need help in some thing that the program does not save the keyboard at the time of running games I want I increase this maid I register games

LEAVE A REPLY

Please enter your comment!
Please enter your name here