Creating keylogger in java

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • aswal
    New Member
    • Aug 2013
    • 38

    Creating keylogger in java

    How can i create a keylogger in java or to be precise what should i learn to create a keylogger.

    - I know keyboard event handling but i don't know how my application capture the key stroke without having focus in it.
  • RedSon
    Recognized Expert Expert
    • Jan 2007
    • 4980

    #2
    I'm afraid this isn't possible. You will have to use JNI or something like that. Also, consider that keylogger are normally viewed as malicious software.

    Comment

    • aswal
      New Member
      • Aug 2013
      • 38

      #3
      Can you tell me the reasons why it isn't possible.
      Why we have to use native language for this purpose.
      Is is due to java restrictions to use pointers or some other reason.

      Comment

      • chaarmann
        Recognized Expert Contributor
        • Nov 2007
        • 785

        #4
        Just imagine that one application running in the background can read all keys when you type your password in another application (for example a browser). A secure operating system should not allow that, it is an intermediator between the keyboard hardware and the application processes. There are programs that still can do it (they access low-level keyboard hardware), but a good virus scanner should detect such a process and mark it as a virus. Of course you can tell the virus scanner not to quarantine it, on your own system.

        What do you want to achieve? Maybe "AutoHotkey " (google for it) already fits your needs?

        Maybe a background process also fits your needs, if you do not need to capture events from foreign applications, but only from yours. Read about "daemon thread". You can start it when you start your applications. It can have focus all the time and can forward the keyboard events to the child-processes (your applications/windows that are started by the daemon)

        Comment

        • invention
          New Member
          • Jun 2014
          • 10

          #5
          Yes, better use VC++/C# for it.

          Comment

          Working...