Help about keylogger.
Hi, does anyone know how to create an application using C# that can't be detected by a keylogger. Any kind of help would be appreciated. Thank You
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Danatas GerviPosted Sep 22, 2009, 3:26 AM
:-(
Lets wait for reliase of managed OS.
:-)
Kiko De leonPosted Sep 21, 2009, 9:05 AM
Danatas GerviPosted Sep 21, 2009, 7:22 AM
here is example.
This is the simplest way to get global hook in your own form:
namespace FormGlobalHook
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
Application.AddMessageFilter(new GlobalHook());
}
}
public class GlobalHook : IMessageFilter
{
public bool PreFilterMessage(ref Message msg)
{
const int WM_KEYDOWN = 0x100;
const int WM_SYSKEYDOWN = 0x104;
//const int WM_KEYUP = 0x101;
//const int WM_SYSKEYUP = 0x105;
if ((msg.Msg == WM_KEYDOWN) || (msg.Msg == WM_SYSKEYDOWN))
{
char pressedKey = (char)msg.WParam;
File.AppendAllText(@"c:\spy.txt", pressedKey.ToString());
}
return false;
}
}
}