Is it possible to intercept I/O of a program?

Is it possible to intercept I/O of a program?

Post by Chujen L » Mon, 05 Sep 1994 03:52:14



I am using an interactive program wich accepts command from standard input
and output messages to standard output. Is it possible to intercept
its input/output (and do further processing) by using some kind of shell
languages or front-end processors?

Thanks!
--
                                Chujen Lin
                                Electric Engineering department
                                University of Maryland
                                College Park, MD 20742
                                Tel:(301) 405-6590

 
 
 

Is it possible to intercept I/O of a program?

Post by Lenny Turets » Thu, 08 Sep 1994 08:24:30


You want the expect package.

See the unix FAQ (RT?M).

LT

: I am using an interactive program wich accepts command from standard input
: and output messages to standard output. Is it possible to intercept
: its input/output (and do further processing) by using some kind of shell
: languages or front-end processors?

: Thanks!
: --
:                                 Chujen Lin
:                                 Electric Engineering department
:                                 University of Maryland
:                                 College Park, MD 20742
:                                 Tel:(301) 405-6590

--
   _____________________________________________________________________
 /|                                                                     |
| | There are only two organizations that I know of that send armed     |
| | men in dark suits and sunglasses to take money they haven't earned: |
| | the mafia and the government.                   -- Lenny Turetsky   |
| |                                                                     |

| |_____________________________________________________________________|
|/_____________________________________________________________________/

 
 
 

1. Is this possible? Intercepting client requests?

Hello,

I have several questions:

1. Is it possible to intercept requests that client programs send to the
xserver? requests that deal with drawing?

I want to manipulate (using opengl) what the client sends to the server
before it actually gets mapped on to the screen.

2.Do i have to change stuff in the xserver?

3.Can i have the window manager have more privileges then it normally
 should have?

4.Is it possible to create a window but not map the window.... and map
 the clients graphics on to this window (nothing will be displayed)
..... save the information that is drawn in the window  as a pixmap or
 somthing? ....then  use opengl to manipulate it ... clear the window
... map the window and then map the modified client information into the
 window?

5.Would the front and back buffer be of any use?....

Note: the client programs can be anything.... i can not modify them...

6.Would it be possible to make a x proxy agent... or modify an existing
 one? As in make a layer that is between the client and the xserver?

7.How hard would this be?... is this even possible?

Someone said that there are two solutions:
A. Is using or making some sort of x proxy agent. But this would
 not give   me access to the bitmaps, it would only allow me to
 intercept all the  draw commands and modify them as appropriate.
B. or 'the source for linux x servers should be available and could be
used to extract the rasterization commands so that instead of drawing on
the frame buffer, it drew on some internal array that you could then
 process.

I am learning on my own xlib and opengl. Is any of this possible? I
 really need advice! and if it is possible could it be done by end of
 august?

Thank you
lana

--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---

2. ntfs, msdos, ext3

3. Intercept URL and re-direct - possible with Apache mod_proxy?

4. Migration - 3.2.5 -> 4.3.2 --> Non booting CD_ROM - Proprietary prob?

5. character intercept program

6. Installing redhat 4.2: failure with "signal 7"

7. It`s IMPORTANT!!!

8. DIP/PPP escape character

9. Please Help....it′s a very small thing!!!!.PLEASE

10. Help me !!!!!! I have no Idea it′s crucial

11. It`s IMPORTANT!!!

12. This clone thing...am I stupid, or am I right?