Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. hookless keylogger

hookless keylogger

Scheduled Pinned Locked Moved C / C++ / MFC
questiondata-structuresjsonhelp
6 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Spiritofamerica
    wrote on last edited by
    #1

    hello, I am trying to make a hookless kwylogger but I am having a little trouble: I am trying to use these api calls to be able to get keyboard data from other processes: //Attach AttachThreadInput( MyThreadID, TargetThreadID, true); //Detach AttachThreadInput( MyThreadID, TargetThreadID, false); All I do is set a timer that looks for the forground window, get's its process ID and attach my process to it's input queue. Then I just poll for keystrokes using GetKeyboardState.But here I have a problem: You see, If I was in a hook dll I would do this: BYTE ks[256]; GetKeyboardState(ks); scan=0; ToAscii(wParam,scan,ks,&w,0); but then again I'm not so where do I get the wParam from? Or how do I know exactely wich key has been pressed? Don't tell me you have to try out all the possible VK codes cause that is lame. Is there another, smarter way to do this?

    L 1 Reply Last reply
    0
    • S Spiritofamerica

      hello, I am trying to make a hookless kwylogger but I am having a little trouble: I am trying to use these api calls to be able to get keyboard data from other processes: //Attach AttachThreadInput( MyThreadID, TargetThreadID, true); //Detach AttachThreadInput( MyThreadID, TargetThreadID, false); All I do is set a timer that looks for the forground window, get's its process ID and attach my process to it's input queue. Then I just poll for keystrokes using GetKeyboardState.But here I have a problem: You see, If I was in a hook dll I would do this: BYTE ks[256]; GetKeyboardState(ks); scan=0; ToAscii(wParam,scan,ks,&w,0); but then again I'm not so where do I get the wParam from? Or how do I know exactely wich key has been pressed? Don't tell me you have to try out all the possible VK codes cause that is lame. Is there another, smarter way to do this?

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Have you considered using a non-exclusive DirectInput device with DirectX? :)

      S 1 Reply Last reply
      0
      • L Lost User

        Have you considered using a non-exclusive DirectInput device with DirectX? :)

        S Offline
        S Offline
        Spiritofamerica
        wrote on last edited by
        #3

        no I haven't cause I don't know how what's wrong with the method I wrote above?

        L 1 Reply Last reply
        0
        • S Spiritofamerica

          no I haven't cause I don't know how what's wrong with the method I wrote above?

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          As you said, you'd need to attach keyboard input to every thread you come across, and poll it with a timer, and then check all various keys whether they are pressed or not. You wanted a smarter way, so I gave you one. Setting up DirectInput will take you about 30 minutes, it's really that easy :) Take a look at this tutorial: http://www.gamedev.net/reference/articles/article1309.asp

          A 1 Reply Last reply
          0
          • L Lost User

            As you said, you'd need to attach keyboard input to every thread you come across, and poll it with a timer, and then check all various keys whether they are pressed or not. You wanted a smarter way, so I gave you one. Setting up DirectInput will take you about 30 minutes, it's really that easy :) Take a look at this tutorial: http://www.gamedev.net/reference/articles/article1309.asp

            A Offline
            A Offline
            Anonymous
            wrote on last edited by
            #5

            This is me also but I didn't bother signing on cause my net is running really poorly. Ok, but I woun't have to carry any directx dlls and stuff with me will I ? I mean what if some man doesn't have directx installed on his comp what then?

            L 1 Reply Last reply
            0
            • A Anonymous

              This is me also but I didn't bother signing on cause my net is running really poorly. Ok, but I woun't have to carry any directx dlls and stuff with me will I ? I mean what if some man doesn't have directx installed on his comp what then?

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #6

              You don't need to carry any DLLs with you - every computer using Windows 98 or later has the nessesary DirectX DLLs already "on board". Check this site: http://www.computerhope.com/directx.htm I'd suggest you using the DirectX 5/6 headers - there hasn't changed much in DirectInput up to Version 9, so you should be safe using the DX5/6 headers

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups