Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
Is there any way that I can write a script that runs all the time, every time i start computer that will log ever keystroke? If so how do I do this, or must I download a program.
Keylogging is very simple. It's all there in the kernel. You need to use module evbug (or evdev). If you modprobe evbug and do a dmesg you'll see something like this
All you need to do now is interpret the Codes, Values and Types to produce a readable output, something like
Time: 'key pressed on which device'. This means you need to build a program in Python or whatever. You also need access to the logs (/var/log/).
BTW in my example I typed 'a Space b Space c Space' and so on.
It seems to against the principle of the forum to talk about cracking stuff. You can google by yourself.
You must have misunderstood me. I didn't want to crack anything. I wanted to be able to see everything that was typed on my computer. every keystroke. and I said "or use a program" to do this?
I dont understand how to program yet. so I will need some help Worksman
I'm sorry I can't help you further. I don't program yet.
I only know Pascal ^_^. Python soon, C, C++ later.
You could start by googling for evdev and evbug + logging and reading the Documentation (/usr/src/linux/Documentation/).
Good luck.
evbug logs in the syslogs - /var/log/{messages,dmesg,'and others depending on syslog configuration'}
Not irritating, you just make your app do the right stuff.
There may sure be other ways... it all has to do with the kernel and the driver used for the peripheral. I don't know about evdev which IIRC creates a character device in /dev/input/event. But I you are to think this logically a better way is to read the keyboard like the rest of the system does... I'm not an expert in linux but that's what I think about this keylogging matter and I'm sure there are places on the net where you could read about it but I'm not really interested in it right now.
i think (and this is what i'm working on, until ADHD kicks in...) that the best approach might be to make a modified module, using the evbug code...
this way you can control where the output is logged, and perhaps join the keycode with the event type, to make parsing easier.
we'll see where that goes, but afaic, logging to /var/log/debug (in my case) is extraneous, and would be better to log to /var/log/keylog or something similar.
edit: ah, didn't read the bit about /dev/input/event[?] ... i'll look into that, seems to create (again, in my case) /dev/input/event1 ... likely some way to easily read from the device, rather than a log...
ok cpbills, let me know if you come up with anything. rcastoro@tampabay.rr.com I'm learning C++ so If I come up with anything Ill also let you know, as I have a fiancee thats not quite trustworthy yet,... lol THANKS!
XHTML Huh? Thats a great web-based language. I learned PHP a while back... Never got TOO far in it, just could do Common things like multidirectional loops and if's and all that bs. Learning C++ ON page 10 THis seems challenging..... (challenge = fun!!)
I would like to see keylogger made for many purposes other then just suspicious people looking to see if their partner is cyber-sexing it up with some perverted 80 year old in Quatamla. One reason, to recap everything that YOU did, and any mistake you could have possibly made. Maybe it would have a Find and Find Next option in it.
I got past page 10 on C++. I stoped at 80 or so. Btw what resources do you learn from? This thread is not the place to talk about this but maybe we could start a new one in the right place and move all this there. I'd really love to talk to other C learners so that we could exchange ideeas, P'sOV and so on. I'll be back on C soon. I'm currently using the Anjuta IDE for C/C++ and DevHelp.
hi there, i learnt C, but then im kind of still learning now though, im gonna take a step to C++ when i fond a decent book to learn from, and some reasonable resources, then eventually il take a look at python or perl, wanna talk about summat, just ask!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.