wpwood@darkwing.austin.ibm.com
Date: 04/28/93


From: wpwood@darkwing.austin.ibm.com
Subject: Re: How to see others' stdout
Date: Wed, 28 Apr 1993 12:42:09 GMT


In article <1rm6ejINNl96@uwm.edu> Rick Miller - Linux Device Registrar <rick@ee.uwm.edu> writes:

   In <1993Apr28.135430.3300@uk03.bull.co.uk> drigby@uk03.bull.co.uk writes:
>
>I heard that there was a prog to basically spy on the output of someone
>elses screen, is this true, and if so, has anyone got any code which will
>work on a SysV R4 system.
>
>If so, I'd be overjoyed to see it. Thanks
>

   Me too, Dave! It'd be *GREAT*!!

   With something like that, I could easily:

           1.) *see* what some clueless newbie is doing wrong, like those
               'little' things they forget to tell you about like that
               they're STUCK IN ALL-CAPS MODE AND DIDN'T THINK IT MATTERED.

           2.) grep every shell-session for stuff that would get *me* into
               trouble (either with the Law or with my *wife*), ie: proprietary
               software, nudie pic's, or drug deals. (For the last two, I'd
               have to grep for the profanity and slang which always seems to
               accompany such things.)

   I know somebody's going to scream "Big Brother!", but this would be a
   fantastic tool for SysAdmins who want to help stuck users and keep their
   systems clear of illegal/illicit use.

   It seems to me that there's a really *simple* way to do it though...
           Maybe something in the /proc filesystem?

   Rick Miller <rick@ee.uwm.edu> | <ricxjo@discus.mil.wi.us> Ricxjo Muelisto
   Send a postcard, get one back! | Enposxtigu bildkarton kaj vi ricevos alion!
             RICK MILLER // 16203 WOODS // MUSKEGO, WIS. 53150 // USA

Rick and Dave,
        From the Comp.Unix.Questions FAQ:

--- BEGIN QUOTE ---
4.11) Is it possible to "spy" on a terminal, displaying the output
      that's appearing on it on another terminal?

      There are a few different ways you can do this, although none
      of them is perfect:

      * kibitz allows two (or more) people to interact with a shell
        (or any arbitary program). Uses include:

        - watching or aiding another person's terminal session;
        - recording a conversation while retaining the ability to
          scroll backwards, save the conversation, or even edit it
          while in progress;
        - teaming up on games, document editing, or other cooperative
          tasks where each person has strengths and weakness that
          complement one another.

        kibitz comes as part of the expect distribution. See question 3.9.

        kibitz requires permission from the person to be spyed upon. To
        spy without permission requires less pleasant approaches:

      * You can write a program that grovels through Kernel structures
        and watches the output buffer for the terminal in question,
        displaying characters as they are output. This, obviously, is
        not something that should be attempted by anyone who does not
        have experience working with the Unix kernel. Furthermore,
        whatever method you come up with will probably be quite
        non-portable.

      * If you want to do this to a particular hard-wired terminal all
        the time (e.g. if you want operators to be able to check the
        console terminal of a machine from other machines), you can
        actually splice a monitor into the cable for the terminal. For
        example, plug the monitor output into another machine's serial
        port, and run a program on that port that stores its input
        somewhere and then transmits it out *another* port, this one
        really going to the physical terminal. If you do this, you have
        to make sure that any output from the terminal is transmitted
        back over the wire, although if you splice only into the
        computer->terminal wires, this isn't much of a problem. This is
        not something that should be attempted by anyone who is not very
        familiar with terminal wiring and such.
--- END QUOTE ---

This doesn't have a huge amount of info about it, but it might help.
I dunno!