Re: [OT] - Realizzare un semplice keylogger per "tastiera" USB
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Giorgio Luciani ha scritto:
> gianluca@bucchianico.net ha scritto:
>> Salve a tutti,
>> ho la necessità di scrivere un programmino C che sia ingrado di
>> leggere ciò che una tastiera USB invia.
>> Il dispositivo non è proprio una tastiera ma un lettore di tessere che
>> viene visto da Linux (e da Windows) come una testiera USB e quindi se
>> eseguo una lettura mentre è aperto un editor di testo, sullo schermo
>> mi compare la sequenza numerica letta e poi va a capo.
>> Purtroppo io deve intercettare questo evento in background ed eseguire
>> successivi processi.
>> Qualcuno può darmi qualche spunto? Ho iniziato a vedere il sorgente di
>> un keylogger ma è troppo maestoso rispetto a ciò che serve a me.
>>
>> Grazie a tutti,
>> Gianluca
>>
>>
> Ciao, in generale becchi l'output semplicemente con un cat sul device
> corretto in /dev/input/ (nel mio caso, per la tastiera ps2,
> /dev/input/event0) e puoi redirigerlo come ti pare (ad es. via pipe)
> (devi essere root o comunque avere i diritti in lettura).
> Per trovare a realtime il nome esatto del device usb puoi provare a fare
> un grep su
>
> cat /proc/bus/input/devices
>
> Il problema è poi interpretare i raw data ottenuti come stringhe di
> caratteri.
> Prova a vedere qui, per farti un'idea:
> http://www.linuxquestions.org/questions/showthread.php?t=454869
> http://www.redsend.org/?p=142
>
> My two cents
>
Grazie per la risposta.
Avevo gia provato a stampare l'output di /dev/input/etc...etc... ma
non era tanto comprensibile!
Ho visto il link che mi hai dato e cercherò di trasformare lo script
Python in C...o in PHP!:)
Grazie ancora, se hai novità fammi sapere!
Gianluca
- --
echo aculnaiG | awk 'BEGIN { FS = "" }
{ for (i = NF; i >= 1; i-- )
printf $i }'; echo
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGm0fVK1z3HmyB2QIRApirAJwPndHZxOcn9SY6y5UXGNgv0ywLRwCeLTF5
GOweB1+OhhFWlYf8clju8Z4=
=xysL
-----END PGP SIGNATURE-----
Reply to: