LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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

Reply
 
Search this Thread
Old 05-12-2005, 01:32 PM   #1
icemanind
LQ Newbie
 
Registered: May 2005
Posts: 1

Rep: Reputation: 0
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
 
Old 05-13-2005, 04:31 PM   #2
acker
Member
 
Registered: Apr 2004
Location: Timisoara, Romania
Distribution: Debian
Posts: 90

Rep: Reputation: 15
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?
 
Old 05-13-2005, 08:22 PM   #3
caffeinebot
Member
 
Registered: Feb 2004
Location: Lexington, MA
Distribution: Gen2
Posts: 39

Rep: Reputation: 15
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.
 
Old 07-19-2006, 05:01 AM   #4
fakie_flip
Senior Member
 
Registered: Feb 2005
Location: san antonio, texas
Distribution: Fedora 64 bit RAID0 + LUKS, CentOS (server), Backtrack, Gentoo Hardened
Posts: 1,440

Rep: Reputation: 80
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
about mac layer lsm hooks chandakumesh Linux - Wireless Networking 2 08-26-2005 03:09 PM
about mac layer hooks chandakumesh Linux - Networking 1 08-26-2005 02:47 PM
application of networking using lsm hooks chandakumesh Linux - Security 1 08-26-2005 12:59 PM
about mac layer lsm hooks chandakumesh Linux - Security 1 08-26-2005 12:58 PM
mutt hooks cbb Linux - Software 2 08-14-2005 01:51 PM


All times are GMT -5. The time now is 06:44 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration