I want to write my own keylogger using Java. To write the keylogger i would need a hook file that will catch the keyevents by the users. How can i write this hook file so that i am able to get the keys user presses. I am unaware how to write a global key listener in C.
writing a key listener in c
3.5k Views Asked by saplingPro At
1
There are 1 best solutions below
Related Questions in JAVA
- Add image to JCheckBoxMenuItem
- How to access invisible Unordered List element with Selenium WebDriver using Java
- Inheritance in Java, apparent type vs actual type
- Java catch the ball Game
- Access objects variable & method by name
- GridBagLayout is displaying JTextField and JTextArea as short, vertical lines
- Perform a task each interval
- Compound classes stored in an array are not accessible in selenium java
- How to avoid concurrent access to a resource?
- Why does processing goes slower on implementing try catch block in java?
- Redirect inside java interceptor
- Push toolbar content below statusbar
- Animation in Java on top of JPanel
- JPA - How to query with a LIKE operator in combination with an AttributeConverter
- Java Assign a Value to an array cell
Related Questions in C
- Passing arguments to main in C using Eclipse
- kernel module does not print packet info
- error C2016 (C requires that a struct or union has at least one member) and structs typedefs
- Drawing with ncurses, sockets and fork
- How to catch delay-import dll errors (missing dll or symbol) in MinGW(-w64)?
- Configured TTL for A record(s) backing CNAME records
- Allocating memory for pointers inside structures in functions
- Finding articulation point of undirected graph by DFS
- C first fgets() is being skipped while the second runs
- C std library don't appear to be linked in object file
- gcc static library compilation
- How to do a case-insensitive string comparison?
- C programming: Create and write 2D array of files as function
- How to read a file then store to array and then print?
- Function timeouts in C and thread
Related Questions in JAVA-NATIVE-INTERFACE
- Generating scip.jar file (mac)
- NewStringUTF() with threads
- How can I assign the NULL to a float/double variable?
- Can I cast native primitive type into a JNI primitive type without worrying about endianness?
- Android NDK code (jni interface)
- Exception Access Violation
- SCIP JNI (Java Native Interface) installation on Ubuntu 14.04:
- How to manipulate CameraPreview bytearray through the JNI? (OpenCV)
- Hide GPS icon while GPS is on in android?
- How to send (from Native code) a android.content.Context parameter to a Java fct (via JNI)
- How to pass java object reference from java side to c++ side?
- How to update Android jni code changings
- Jni : Call a java method within C++ code, errors
- Android NDK: Multiple definition of .o and .c files
- Must I DeleteLocalRef an object I have called NewGlobalRef on?
Related Questions in HOOK
- How to make Homeslider Banner work in custom hook location
- Customize Liferay search portlet
- Modify files and commit after Branch creation in GIT via Hook
- Removing a Wordpress action added from a Plugin and than adding a new action in place of that
- In WHMCS user can login with every wrong or right password
- To Hook Web Content Search Portlet
- Overriding class signature in java
- Sonata Admin: Prevent a persist for a specific condition
- Is it posible to hook redis before key expired
- Redis hooking (publish-subscribe) under stress tests - performance under load
- Are static members in XPosed hook classes shared between processes?
- Log-in Portlet Hook
- Apache Subversion pre-commit to restrict files
- Mercurial list files from changegroup
- Taking Screeshot of extern Window which have an OpenGL ES Window inside
Related Questions in KEYLOGGER
- Python keylogger: an integer is required
- Running C++ program invisible
- Identify device in windows hook
- TypeError: write() argument must be str, not list
- Sending an email attachment in mail using python
- Issues relating to a Google drive keylogger
- Capture text between 2 keys into a file
- Processing All Keyboard Inputs (Hooks)
- user-level "keylogger"/window title recorder
- Need to send key presses to a webpage(html5 game)
- Python keylogger does not log UA prompt keystrokes
- C++ keyboard hook - what does the parameter nCode mean?
- Is it possible to protect my JPasswordField against keyloggers
- How to handle key press event in C# console application
- get pressed key and throw another key in android
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
What you are trying to do will not be platform independent. As such, I can only give you a hint on how to do it on windows.
In windows, the way to do this is by using the winapi. You can use the SetWindowsHookEx function with the
WH_KEYBOARDargument which:This way, you will basically tell windows to call your predefined function (sent as argument to SetWindowsHookEx) every time a key is pressed. You can read about specifics on the webpage I gave you.
Since the SetWindowsHookEx function is windows specific, note that you cannot use this on linux or any other os. Also, for a basic program to do what you want, you don't really need Java. You can pretty much do everything in C/C++.