in reply to Re: Capture Keystroke
in thread Capture Keystroke

For what it's worth, my alarm bells were ringing too. Especially after this post prompted me to go through michbach's previous posts.

That's not to say I assumed the worst. It just meant that something smelled slightly fishy.

Replies are listed 'Best First'.
Re^3: Capture Keystroke
by shmem (Chancellor) on Apr 12, 2009 at 21:36 UTC
    something smelled slightly fishy

    What is it that smells fishy? Getting mouse events, manipulating window size and stacking order, recording key strokes - all that are things we do all day long (the latter, for instance: saving those key strokes to a file, e.g. Unnamed.doc). Fishy? Is there more to it than a Pawlow's dog reaction?

    Do you have any grounds on which to insinuate criminal energy? Do you know of the OP's purposes?

    For myself, I'm capturing all output to any terminal I open, to a file, named after 'begin-end-terminal', via script(1) on UNIX. That way I have a log of all I am doing. Does that sound evil to you?

      I wasn't insinuating any "criminal energy". That's why I tried/used the word "slightly" :)

      Please see my reply to michbach. I hope you catch my tone of emotion from that node. I want the best for michbach, and to avoid any further knee-jerk thoughts (that I've fallen prey to) from other monks.
      That sounds like something I could use. Is that a module, shmem?

        No, it is a UNIX command, which appeared in BSD 3.0. It spawns your $SHELL and makes a typescript of everything printed to the terminal, including backspaces, terminal control sequences and such. See 'man script'. The script(1) command's STDERR can be directed to a file to record the timing of all that appears on the terminal. Of course, anything typed while the terminal is in '-echo' mode won't appear (e.g. passwords). The script file and the timing file can be used to replay the captured outout. Joey Hess wrote a public domain perl script called scriptreplay which does that.

        On Unix:
        > script Script started, file is typescript > ls -ld /typo^H^H^H^Hetc drwxr-xr-x 117 root root 12288 2009-04-13 16:22 /etc > exit Script done, file is typescript

        and then perl -pe 's/\e([^\[\]]|\[.*?[a-zA-Z]|\].*?\a)//g' typescript

        filters the escape codes, and prints this out as-is:

        Script started on Tue 14 Apr 2009 10:48:10 AM PDT > ls -ld /etc drwxr-xr-x 117 root root 12288 2009-04-13 16:22 /etc > exit Script done on Tue 14 Apr 2009 10:48:22 AM PDT
Re^3: Capture Keystroke
by michbach (Sexton) on Apr 13, 2009 at 11:36 UTC
    God in heaven! Let your alarm bell rings! I guess u are feeling great when your bells ring. But i call this a little bit paranoid. I dont know exactly how much keyloggers and all that hacker-waste u can download in the internet but im sure more then hundreds. You can get such software on every corner and there is no need to write one (not for me lol). There are a lot of other reasons to control mouseevent or keyevents then only hack hack hack. Its not my problem if you cant imagine that, but let it be to imply me i have a bad tendency. Every question here could be help anybody to write a scripts for hacking or other abuse. But i understand also that on such a public board a certain security must be. I try to respekt the board-rules as i know (i dont read the rules every day!) but please avoid suspicions from your side. This is not Quantanamo (evidences no need it). As i already wrote i know how to get a value (Term::ReadKey, bind etc.) of a keystroke but my core intention was to make it not circumstantial with hundred of script-lines. At the end i wanna say i solved the problem with another help so the problemm dont exist anymore. Sorry for my bad english but im to old to learn english really good. My time is limited :-) and i need ofte a long time to write my questions in this language. But i try my best and i like this board cause you get often quick and professional help. tx to all, regard michbach

      Sorry for my bad english but im to old to learn english really good. My time is limited :-) and i need ofte a long time to write my questions in this language.

      Your posts often come across as if they were written by a teenager who cannot be bothered to properly type everything out. I realize that English is not your primary language but here are two quick and easy things to work on that will greatly enhance the respect that you receive around here.

      1. Stop using text messaging shortcuts like "u" when you mean "you" and "ur" when you mean "your".
      2. If you are going to use contractions then include the apostrophe such as "I'm" instead of "im". (Bonus points for not using contractions at all such as "I have" instead of "I've".)