It’s a quick one, but something I bashed (haha, get it?) up quickly for a coworker.
First, make a socket
Then bind a listening socket (Your netcat implementation may need -p before the port), tee the data back to your terminal and to the endpoint, which in turn talks back to the original netcat instance via the fifo.
I enjoy exploring interesting concepts in weird languages. I also like hacking on all of the things.