munu has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's minimum standard of quality and will not be displayed.

Replies are listed 'Best First'.
Re: Is there any way to record keystrokes.
by tachyon (Chancellor) on Aug 04, 2004 at 07:01 UTC

    Record or capture? Term::Readkey or Term::InKey will let you capture keystrokes. If you are looking to do stealth keylogging I will leave you on your own for that as most of the uses that spring to mind are illegal, immoral and quite possibly fattening.

    What is it you want to actually do?

    Details removed by request, even though by way of justification, keylogging in Perl it is essentially too CPU intensive to be practical, and really only of academic interest.

    As pointed out to me a cynic might view your collated posts as how can I write worm/trojan code in Perl. If that *is* the question the answer is you don't, which may well be fortunate for all of us. You can do it in under 100 bytes of assembler or alternatively about a MB of VB ;-)

    cheers

    tachyon

    A reply falls below the community's threshold of quality. You may see it by logging in.
Re: Is there any way to record keystrokes.
by tbone1 (Monsignor) on Aug 04, 2004 at 12:34 UTC
    Yes. Yes there is.

    In fact, why don't you try it on 127.0.0.1 first, munu? Send your results to the spamkings, spyware writers, and the IRS. I'm sure they would be VERY interested.

    *sigh* This world is going downhill so fast. In the good old days, the evil people would actually try to create evil on their own, rather than get other people to do their evil for them. I blame it on the whole uplift phenomenon. Now excuse me, I need to go complain about kids these days with their fax machines and hula hoops ...

    --
    tbone1, YAPS (Yet Another Perl Schlub)
    And remember, if he succeeds, so what.
    - Chick McGee

Re: Is there any way to record keystrokes.
by zentara (Cardinal) on Aug 04, 2004 at 14:06 UTC
    I see that poor munu got downvoted for this post, but it is a good question to ask every now and then, just to "raise awareness" of the possibilities. By the way, Bash-3.0 just came out, I'm leary to try it until I see some reports on it from the c gurus. The bad guys are out there, and this may be kind of OT, but someone has been trying to mess with me recently, I think by hacking at Wine. They have managed to create a directory in my homedir, but nothing else. How do I know? Well my instance of Agent running under Wine, locked up, and after I killed it, a myterious directory, full of myterious files appeared. I hate it when that happens. :-)

    I'm not really a human, but I play one on earth. flash japh
      By the way, Bash-3.0 just came out,

      Thanks for bringing it into my attention. I hope the old readline bugs have finally got corrected. I'll download and try.

Re: Is there any way to record keystrokes.
by DrHyde (Prior) on Aug 04, 2004 at 08:03 UTC
    Of course. Check that STDIN is a terminal, and then read it, and write the results to a file.