Skip to content
Propeng edited this page Feb 15, 2011 · 3 revisions

TransShell works by linking a process's output and input to a channel or nick). When linked, stdout/err will be redirected through IRC to that channel and PRIVMSGs to that channel/nick starting with Config.chan_prefix will be treated as stdin.

Command

To link a process, the link command is used. link takes 3 arguments:

  • The channel name or nickname to link to.
  • The program to be linked.
  • (Optional) Arguments to that program.

Example: shell> ;link #channel bash --debug or shell> ;link TransShellUser yum install gedit.

To reverse the effect of link, unlink is used. It takes one argument:

  • The channel or nickname that was linked to.

Example: shell> ;unlink #channel

Full Session Example

  1. The admin types ;link #channel /dev/sh in the shell prompt.
  2. TransShell runs sh and redirects stdout to #channel.
  3. sh prompts ~$ , so TransShell sends [sh] ~$ to #channel.
  4. A user in the channel responds to the prompt, and sends ;cd /.
  5. TransShell sends cd / to sh's stdin.
  6. sh responds by switching the directory to the root directory, and now prompts /$ .
  7. TransShell sends [sh] /$ to #channel.
  8. Finally, the admin unlinks sh by typing ;unlink #channel in the shell prompt.

Clone this wiki locally