Results 1 to 8 of 8

Thread: Keylogger for anti theft app

  1. #1

    Thread Starter
    Member
    Join Date
    Apr 2005
    Posts
    37

    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

  2. #2

    Thread Starter
    Member
    Join Date
    Apr 2005
    Posts
    37

    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.

  3. #3
    Frenzied Member TheBigB's Avatar
    Join Date
    Mar 2006
    Location
    *Stack Trace*
    Posts
    1,511

    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.

  4. #4

    Thread Starter
    Member
    Join Date
    Apr 2005
    Posts
    37

    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.

  5. #5
    Addicted Member joe1985's Avatar
    Join Date
    Jun 2007
    Posts
    151

    Re: Keylogger for anti theft app

    Quote 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?

  6. #6

    Thread Starter
    Member
    Join Date
    Apr 2005
    Posts
    37

    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.

  7. #7
    Frenzied Member TheBigB's Avatar
    Join Date
    Mar 2006
    Location
    *Stack Trace*
    Posts
    1,511

    Re: Keylogger for anti theft app

    What's the interval of the timer?
    Delete it. They just clutter threads anyway.

  8. #8

    Thread Starter
    Member
    Join Date
    Apr 2005
    Posts
    37

    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
  •  



Click Here to Expand Forum to Full Width