Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
05-12-2005, 01:32 PM
|
#1
|
|
LQ Newbie
Registered: May 2005
Posts: 1
Rep:
|
Keyboard hooks
Can someone tell me if there is a way to create a type of Keyboard Hook so that any input typed on the keyboard will go through my program first?
I know I can do it by rewiring the keyboard driver, but I'm hoping for a way to do it without messing with any kernel drivers.
Thanks
Alan
|
|
|
|
05-13-2005, 04:31 PM
|
#2
|
|
Member
Registered: Apr 2004
Location: Timisoara, Romania
Distribution: Debian
Posts: 90
Rep:
|
Re: Keyboard hooks
Quote:
Originally posted by icemanind
Can someone tell me if there is a way to create a type of Keyboard Hook so that any input typed on the keyboard will go through my program first?
|
You mean a keylogger, right?
http://sourceforge.net/projects/lkl/
http://www.phrack.org/phrack/59/p59-0x0e.txt
Why would you wanna do such a thing?
|
|
|
|
05-13-2005, 08:22 PM
|
#3
|
|
Member
Registered: Feb 2004
Location: Lexington, MA
Distribution: Gen2
Posts: 39
Rep:
|
pipes and processes
I've been wanting to do the exact same thing although I've been trying to allow for a user to enter in keyboard input, which is routed to two programs.
Some interesting advice i've recieved is to write a wrapper program that runs the two programs in question as a process(or aparantly pthreads) and pipes the keyboard input to both. You might want to look up processes and pipes, let me know if you're sucessfull or find something new because im still stuck on implementation.
Last edited by caffeinebot; 05-13-2005 at 08:34 PM.
|
|
|
|
07-19-2006, 05:01 AM
|
#4
|
|
Senior Member
Registered: Feb 2005
Location: san antonio, texas
Distribution: Fedora 64 bit RAID0 + LUKS, CentOS (server), Backtrack, Gentoo Hardened
Posts: 1,426
Rep:
|
Maybe you can get some ideas by looking at the source code for lkl (Linux Keylogger) and then improving it. It needs lots of improvements. I hope you make your keylogger available for Ubuntu in the universe or multiverse repositories. Also your program will be much better than lkl if it has a better output than lkl with time and date and html format. It would be MUCH better if lkl simply sniffed the raw
port data (or read it and echoed it to the kernel) and
logged that, and then came with a viewer to decode the
raw logs. This way there is NO translation done by lkl
to the actual datastream, eliminating any chance of
failure.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 02:26 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|