Today I was reading the
nc man page and stumbled on this command. I know that:
mkfifo /tmp/fis creating a named pipe at /tmp/f.
cat /tmp/fis printing whatever is written to that named pipe and the output of
cat /tmp/fis been piped to
/bin/shis running interactively and stderr is redirected to stdout.
- `the output is then piped to nc which is listening on port 1234
- and the out put is finally redirected to the named pipe again.
when run, connecting to the remote server on that port i.e 1234 opens a shell prompt and the client can execute arbitrary commands. But how does it work that way?