PDA

View Full Version : Scancode help



Changowero
April 11th, 2011, 07:23 AM
Hey!

I'm trying to make a Keylogger, just to learn Linux a little better.
I have already Googled some info, and I think I have to read from a dev/input. In my computer,
when I "cat /dev/input/event1" a lot of junk appears on the terminal (when I hit a key), so I
think I already found the correct event. However, it's just weird symbols and nonsense. I read
those are the scancodes, but I can't get any meaning out of them.

How can I interpret them? Also, in what language would you do it? Python? C?

Thanks!

Changowero
April 11th, 2011, 07:31 AM
Hey!

I'm trying to make a Keylogger, just to learn Linux a little better.
I have already Googled some info, and I think I have to read from a dev/input. In my computer,
when I "cat /dev/input/event1" a lot of junk appears on the terminal (when I hit a key), so I
think I already found the correct event. However, it's just weird symbols and nonsense. I read
those are the scancodes, but I can't get any meaning out of them.

How can I interpret them? Also, in what language would you do it? Python? C?

Thanks!

fct
April 11th, 2011, 08:22 AM
You are seeing the ASCII symbols corresponding to each scan code.

If you want to get the scan codes themselves you need to use either python or C and read the device event1 as if it was a binary file.

lisati
April 11th, 2011, 08:27 AM
Threads merged.

Please do not start multiple threads on the same topic

tweaktolive
April 11th, 2011, 08:29 AM
There is an ecellent website and you ll get whatever you need to interpret the ASCII symbols.

http://www.asciitable.com/

Changowero
April 12th, 2011, 04:25 AM
Thanks! Let's see how that goes xD