|
-
Jun 8th, 2008, 09:29 AM
#1
Thread Starter
Member
Keylogger for anti theft app
I made an anti theft application for my laptop.
If i report it stolen online it'll log on to a website and the IP will be logged.
I want to add a keylogger to it so i can find out more easily who is in possession of my laptop.
When i use the GetAsyncKeystate
and the for i 32 to 128
if getasynckeystate(i) = -some number
then store chr(i)
my application just gets stuck.
Is there a better alternative for this?
Thanks
-
Jun 8th, 2008, 10:32 AM
#2
Thread Starter
Member
Re: Keylogger for anti theft app
I don't want an already made keylogger. I want to implement a keylogger in my own anti theft application. The logged keys will then be sent to my website. With this information i'll try to find out the identity of the thief.
Last edited by Ruberducky; Jun 8th, 2008 at 10:41 AM.
-
Jun 8th, 2008, 10:45 AM
#3
Re: Keylogger for anti theft app
how do you use the code in your first post?
a loop?
Delete it. They just clutter threads anyway.
-
Jun 8th, 2008, 11:00 AM
#4
Thread Starter
Member
Re: Keylogger for anti theft app
Yes.
Public Class frmMain
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Integer) As Integer
Private Sub tmrMain_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tmrMain.Tick
For i As Integer = 1 To 128
If GetAsyncKeyState(i) = -32767 Then
Select Case i
Case 1
Log("[Left Click]")
Case 2
Log("[Right Click]")
etc...
End Select
End If
Next
End Sub
End Class
The thing is that if instead of Log i put Msgbox(Chr(i)) it works.
But if i put Textbox1.text = textbox1.text & Chr(i) or even TextBox1.text = Chr(i) it just doesn't work.
-
Jun 8th, 2008, 02:29 PM
#5
Addicted Member
Re: Keylogger for anti theft app
 Originally Posted by Ruberducky
Yes.
Public Class frmMain
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Integer) As Integer
Private Sub tmrMain_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tmrMain.Tick
For i As Integer = 1 To 128
If GetAsyncKeyState(i) = -32767 Then
Select Case i
Case 1
Log("[Left Click]")
Case 2
Log("[Right Click]")
etc...
End Select
End If
Next
End Sub
End Class
The thing is that if instead of Log i put Msgbox(Chr(i)) it works.
But if i put Textbox1.text = textbox1.text & Chr(i) or even TextBox1.text = Chr(i) it just doesn't work.
It works fine for me, what happens for you?
-
Jun 8th, 2008, 03:04 PM
#6
Thread Starter
Member
Re: Keylogger for anti theft app
Well, the thing is that it actually works as long as i do not try to write or append the logged key to a textbox or a variable or a label or something.
I can catch the key and then show a messagebox containing the key but as soon as i want to make a log of them in a textbox the loop stops working.
-
Jun 9th, 2008, 02:06 AM
#7
Re: Keylogger for anti theft app
What's the interval of the timer?
Delete it. They just clutter threads anyway.
-
Jun 9th, 2008, 10:21 AM
#8
Thread Starter
Member
Re: Keylogger for anti theft app
I've tried 1, 10, 100, 500 and 1000. None work.
I've got no idea what it could be...
Btw i use Microsoft Visual Basic 2005 Professional.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|