ProgrammingThis 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.
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
As a summer project, I would like to write a keylogger in C for a *nix system. I have researched a little, and all the sources I can find indicate that such a task must involve the kernel. I have no knowledge of the kernel, and would like to know if anyone knows wether this can be done without touching the kernel.
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789
Rep:
That's depends on what "*nix" stands for.
If it's Solaris 10+, it would be just a few lines of dtrace scripting.
All other *nix and *nux would certainly require a more intrusive and complicate work.
Dag it, I'm on Slackware and that's what I was planning to write it for. What a pain. I know this sounds very unhackerish, but it is hard for me to learn new things on my own (from laziness, lack of time, ineptness) so I probably won't get to pull this off.
I dont see how this could be done without the kernel, especially if you want to keylog what root is typing. I imagine you would need to be very comfortable with C and learning new API's should be a routine activity. No offence but you might be a little over your head.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.