Hi!
I need help in fixing my simple keylogger app. It should record all keystrokes and save them into a text file. The keylogger works well in my Win7 pc although some keys are duplicated but when I ran it on my Win10 laptop, some keys weren't recorder and there are missing characters after I tested it from A-Z and 0-9. It also can't detect shift and space bar. Same thing happened when I ran it on my cousin's win10 laptop.
I don't know if the version of windows has anything to with it but it just happened to work on my win7 and failed on 2 win10s.
Here's a sample of my code:
Dim hotkey1 As Boolean
hotkey1 = GetAsyncKeyState(Keys.A)
If hotkey1 = True Then
myChar.Text = "A"
End If
myChar is then appended to the text file.______________________________________
Dim file As System.IO.StreamWriter
Dim reportsFolder As String
reportsFolder = Path.Combine(Directory.GetCurrentDirectory())
file = My.Computer.FileSystem.OpenTextFileWriter(reportsFolder & "\test.txt", True)
file.Write(myChar.Text)
myChar.Text = ""
file.Close()_______________________________________
Yes this is brute force. I typed in codes for A-Z, 0-9, Shift, Space and Enter. I had another shorter code that I got from the net but the output looks like an enrcypted file and there are also missing characters there.
Can anyone help me build a better code for this program? Thanks a lot in advance! :D
I need help in fixing my simple keylogger app. It should record all keystrokes and save them into a text file. The keylogger works well in my Win7 pc although some keys are duplicated but when I ran it on my Win10 laptop, some keys weren't recorder and there are missing characters after I tested it from A-Z and 0-9. It also can't detect shift and space bar. Same thing happened when I ran it on my cousin's win10 laptop.
I don't know if the version of windows has anything to with it but it just happened to work on my win7 and failed on 2 win10s.
Here's a sample of my code:
Dim hotkey1 As Boolean
hotkey1 = GetAsyncKeyState(Keys.A)
If hotkey1 = True Then
myChar.Text = "A"
End If
myChar is then appended to the text file.______________________________________
Dim file As System.IO.StreamWriter
Dim reportsFolder As String
reportsFolder = Path.Combine(Directory.GetCurrentDirectory())
file = My.Computer.FileSystem.OpenTextFileWriter(reportsFolder & "\test.txt", True)
file.Write(myChar.Text)
myChar.Text = ""
file.Close()_______________________________________
Yes this is brute force. I typed in codes for A-Z, 0-9, Shift, Space and Enter. I had another shorter code that I got from the net but the output looks like an enrcypted file and there are also missing characters there.
Can anyone help me build a better code for this program? Thanks a lot in advance! :D


