Results 1 to 6 of 6

Thread: how can i make a keylogger

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2001
    Posts
    4

    Question

    hey i can make my proggy listen t o anykey stroke on windows bu t i need my msgbox to show upon others i mean on top of all others

    need help

  2. #2
    Lively Member Bios's Avatar
    Join Date
    Nov 1999
    Location
    Richton Park, IL, USA
    Posts
    71
    don't use a message box use a form with a label, and use topmostwindow api to make it on top, or use find window using the message box title, and find the message box, and use topmostwindow api to make it on top of the other windows.

    PS vb key loggers suck they can't keep up with my typing...if your subclassing the keyboard please let me know and tell me how. Most people just use a timer or a loop with get keystate


    well either way...

    Hope this helped,
    Bios
    Age: 17
    Languages: (Q)BASIC, Visual Basic, Dark Basic,C/C++, Visual C++, Perl, Java Script, HTML, ASP

    "DO:BEEP:LOOP"

  3. #3
    coder. Lord Orwell's Avatar
    Join Date
    Feb 2001
    Location
    Elberfeld, IN
    Posts
    7,628
    getkeystate (muffled laughter)
    calling the windows api once for each key? (sigh)
    use the getkeyboardstate. It stores every key at once in an indexed array. Simply compare one capture to the next, and if different, then you can determine which key.
    There have been so many posts asking about this, i will probably just write the routine and get it over with...
    My light show youtube page (it's made the news) www.youtube.com/@lightsofelberfeld
    Contact me on the socials www.facebook.com/lordorwell

  4. #4
    Hyperactive Member Alan777's Avatar
    Join Date
    Jan 2001
    Location
    New Zealand
    Posts
    303

    Thumbs up

    Yes Lord (muffled laughter), you should do that and enlighten us.

    Here's another 2 cents worth for Bios.
    Code:
    Option Explicit
    
    Private Declare Function CallWindowProc Lib "user32.dll" Alias "CallWindowProcA" ( _
     ByVal lpPrevWndFunc As Long, _
     ByVal hwnd As Long, _
     ByVal Msg As Long, _
     ByVal wParam As Long, _
     ByVal lParam As Long) As Long
    
    Private Declare Function SetWindowLong Lib "user32.dll" Alias "SetWindowLongA" ( _
     ByVal hwnd As Long, _
     ByVal nIndex As Long, _
     ByVal dwNewLong As Long) As Long
    
    Private Const GWL_WNDPROC = -4
    Private Const WM_KEYDOWN = &H100
    Private Const WM_KEYUP = &H101
    
    
    Private hControl As Long
    Private lPrevWndProc As Long
    Private ArrPos As Long
    
    Public KeyArray(10000) As Byte
    
    '*************************************************************
    'WindowProc
    '*************************************************************
    Private Function WindowProc(ByVal lWnd As Long, ByVal lMsg As Long, _
     ByVal wParam As Long, ByVal lParam As Long) As Long
    
    Select Case lMsg
     
     Case WM_KEYDOWN
      KeyArray(ArrPos) = CByte(wParam)
      ArrPos = ArrPos + 1
      
     Case WM_KEYUP
      'Code for 'key up' event
      
    End Select
    
     WindowProc = CallWindowProc(lPrevWndProc, lWnd, lMsg, wParam, lParam)
    
    End Function
    '***********************************************************
    
    
    Public Sub Hook(ByVal hControl_ As Long)
     
     hControl = hControl_
     lPrevWndProc = SetWindowLong(hControl, GWL_WNDPROC, AddressOf WindowProc)
    
    End Sub
    
    Public Sub Unhook()
     
     Call SetWindowLong(hControl, GWL_WNDPROC, lPrevWndProc)
    
    End Sub
    "Today's mighty oak is just yesterday's nut,
    that held its ground."

  5. #5
    coder. Lord Orwell's Avatar
    Join Date
    Feb 2001
    Location
    Elberfeld, IN
    Posts
    7,628
    (sniff) i wrote the subroutine last night, and was so tired when i was done, i clicked the cancel button instead of the ok button when i closed vb. (sob)
    It kept up with my typing too. Oh well. If anyone knows of a built-in vb command (or api command) that will compare two arrays, please post it. P.S. Call me Orwell. Lord is my real name. (see profile)
    My light show youtube page (it's made the news) www.youtube.com/@lightsofelberfeld
    Contact me on the socials www.facebook.com/lordorwell

  6. #6
    PowerPoster Lethal's Avatar
    Join Date
    Oct 2000
    Location
    Ohio
    Posts
    2,496
    There has been a keylogger prog written using subclassing, search for it, i believe it was written by Aaron Young.

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