Eli Fulkerson .com HomeProjectsWarpzone
 

Welcome to Warp Zone!

Description:

Warpzone is a *nix shell program that lets you "warp out" of your current session in order to run a piped command on your local machine, using the output of whatever you are doing in the wrapped shell as its input. Note: I originally wrote/used this under Cygwin, but 0.3 is a clean rewrite that targets POSIX systems generally (Linux, the BSDs, macOS). Your mileage may still vary.

It functions by launching an interactive shell inside a pseudo-terminal and inserting itself transparently into your input/output stream. Most of the time you type and see output exactly as usual.

The hotkey to activate warpzone is Ctrl-] (ASCII 29, the "warp key"). When you press Ctrl-] a green | will be drawn and you start typing a pipeline locally. Nothing is sent to the wrapped shell yet — everything to the right of the green | is a command line that will run on your local machine. Once you hit enter, warpzone sends an enter to the wrapped shell (to execute whatever command line is sitting there), captures that command's output, and then feeds the captured output into your local pipeline. The output of that pipeline is printed to your stdout, bracketed by a pair of green horizontal rules.

By default the capture ends automatically once the wrapped shell's output has been idle for 0.2 seconds, but you can also end it manually with Ctrl-], or cap it with byte/time guardrails (see Usage below). While capturing, warpzone shows a small status line with a live throughput sparkline so you can see data arriving.

The short version — once you're inside of warpzone, if you use Ctrl-] to pipe commands, the right-hand side of the pipe runs locally, against the output of the command you ran in the wrapped shell.

The intended use case is (for instance) to be able to use advanced unix string utilities despite being in a more restrictive environment. Specifically, I wrote this tool to enable me to use my custom utilities such as ips, macdb and no (not to mention actual honest-to-god grep) while shelled into Cisco equipment.

Usage:

Run warpzone with no arguments to wrap an interactive bash. Point it at something else with --shell, for instance to wrap an ssh session:

  warpzone --shell /usr/bin/ssh --shell-arg user@host

Useful options:

These can also be set in an optional ~/.warpzonerc file (keys: shell, shell_arg, gap_ms, manual_end, max_bytes, max_seconds); command-line flags override the file.

Caveats:

One deliberate limitation: while the wrapped program is using the alternate screen buffer (vim, less, top, and friends), Ctrl-] is disabled, because injecting a visible marker into a full-screen app would corrupt its display. Exit the full-screen app first. Likewise, during a capture normal keystrokes are ignored; only Ctrl-] (to end the capture) is honored.

History:

0.1 — Initial version, written and used under Cygwin. Activation was alt-| (technically alt-\, because I did not want to enforce shift-alt-\).

0.2 — Dec 28 2018. Fixed a clash where the alt-\ escape sequence collided with apps like emacs setting up their graphical console, by switching activation to space-alt-\. Also jazzed up the output a bit. Still wrestling with the tty handling, and at the time I noted that resizing wasn't solved (the workaround was to just run "resize"), and that terminal paging wasn't quite right yet.

0.3 — Substantial rewrite. Activation moved to Ctrl-] (no more space-alt-\ dance). Window resizing is now handled properly (SIGWINCH is forwarded to the wrapped program), so the old "just use resize" workaround is gone. The local pipeline now runs explicitly on the local machine via /bin/sh -c, with captured output unlinked from /tmp as soon as it is read. Job-control signals (Ctrl-C, Ctrl-Z, etc.) are forwarded to the wrapped program's foreground process group so they behave like a normal terminal. Added configurable capture-end conditions (idle gap, manual end, byte/time guardrails), the --shell/--shell-arg options, the ~/.warpzonerc config file, alternate-screen detection, and a capture status overlay with a throughput sparkline. This version is good enough that I'm finally eating my own dogfood.

Screenshot:


Cisco-ASA# show arp | macdb

outside (ip redacted) a493.4cxx.xxxx 7925 OUI: (hex) Cisco Systems, Inc
inside (ip redacted) 000c.29xx.xxxx 56 OUI: (hex) VMware, Inc.
inside (ip redacted) 406c.8fxx.xxxx 100 OUI: (hex) Apple, Inc.
inside (ip redacted) 0015.faxx.xxxx 9530 OUI: (hex) Cisco Systems, Inc
dmz (ip redacted) 000c.29xx.xxxx 1 OUI: (hex) VMware, Inc.
dmz (ip redacted) 000c.29xx.xxxx 3 OUI: (hex) VMware, Inc.
dmz (ip redacted) 000c.29xx.xxxx 4 OUI: (hex) VMware, Inc.
dmz (ip redacted) 000c.29xx.xxxx 8 OUI: (hex) VMware, Inc.
dmz (ip redacted) 000c.29xx.xxxx 10 OUI: (hex) VMware, Inc.
dmz (ip redacted) 000c.29xx.xxxx 14 OUI: (hex) VMware, Inc.

Download:


Listing directory https://download.elifulkerson.com/files/warpzone/0.3: .git June 01 2026 04:36:15 - directory Makefile June 01 2026 04:18:38 3417 makefile script, ASCII text README.md June 01 2026 04:13:29 9235 UTF-8 Unicode text warpzone June 01 2026 04:18:43 36360 ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=b3ffb2aeb74cd8064a163ee95bb4a726f24bdc7a, for GNU/Linux 3.2.0, not stripped warpzone.1 June 01 2026 04:13:30 7083 troff or preprocessor input, ASCII text warpzone.asc June 01 2026 04:32:27 801 GnuPG signature warpzone.c January 27 2026 06:04:28 40366 C source, UTF-8 Unicode text warpzone.c.asc June 01 2026 04:32:37 801 GnuPG signature warpzone.c.md5 June 01 2026 04:32:37 45 MD5 checksum warpzone.c.sha1 June 01 2026 04:32:37 53 SHA1 checksum warpzone.c.sha256 June 01 2026 04:32:37 77 SHA256 checksum warpzone.c.sha512 June 01 2026 04:32:37 141 SHA512 checksum warpzone.md5 June 01 2026 04:32:27 43 MD5 checksum warpzone.sha1 June 01 2026 04:32:27 51 SHA1 checksum warpzone.sha256 June 01 2026 04:32:27 75 SHA256 checksum warpzone.sha512 June 01 2026 04:32:27 139 SHA512 checksum warpzone_0.3.0_amd64.deb June 01 2026 04:18:43 13924 Debian binary package (format 2.0) warpzone_0.3.0_amd64.deb.asc June 01 2026 04:32:46 801 GnuPG signature warpzone_0.3.0_amd64.deb.md5 June 01 2026 04:32:46 59 MD5 checksum warpzone_0.3.0_amd64.deb.sha1 June 01 2026 04:32:46 67 SHA1 checksum warpzone_0.3.0_amd64.deb.sha256 June 01 2026 04:32:46 91 SHA256 checksum warpzone_0.3.0_amd64.deb.sha512 June 01 2026 04:32:46 155 SHA512 checksumBrowse the download server

To compile: gcc -o warpzone.exe warpzone.c

Additional Notes:

I would like to thank R. Koucha for his pty examples (http://www.rkoucha.fr/tech_corner/pty_pdip.html) on which this program was originally based.