perlquestion
Carnyx
<p>Namasté,
!first of all I am not building in any way a keylogger or something like that!
What I am actually building is a program to analyse typing behaviour. I don't need keylogger or hidden stuff.
This is an example I used as a base for my program: </p>
<code>
use Term::ReadKey
ReadMode ('cbreak');
print "Press keys to see their ASCII values. Use Ctrl-C to quit.\n"
while (1){
$char = ReadKey (0);
last unless defined $char;
printf("Hex: %x\n", ord($char), ord($char));
}
ReadMode ('normal');
</code>
<p> If you execute this in perl you'll get the Hex code for every character you type at the exact same time you type it. So for example "spacebar = 20 in hex". But this output comes vertically and without the actual typed-in key. Showing the key is not a problem offcourse. That actually worked with my solution. But I would like my users to type in notepad. So that the output in notepad eq "Hallo i am harry" and the output in perl is like:"<code>
H Hex: 68
a Hex: 61
l Hex: 6c
l Hex: 6c
o Hex: 6f
Hex: 20
I Hex: 69
Hex: 20
a Hex: 61
m Hex: 6d
etc etc etc etc etc
</code>
Could you please help me with this... I deliberately did not post my reading part of the program (dont like malicious). If you don't want to post the solution, because it can be used for evil, can you please PM me or somthing?
Greetz,
Harry
</p>