4 ms·
Only one mention of socat, nothing does ad-hoc nonsense that you probably would never use again like socat. > socat TCP4-LISTEN:50000,fork EXEC:/usr/bin/ifconf
by xaduha 5y ago
Only one mention of socat, nothing does ad-hoc nonsense that you probably would never use again like socat.
> socat TCP4-LISTEN:50000,fork EXEC:/usr/bin/ifconfig
> curl --http0.9 localhost:50000
Hmmm, does http v0.9 count?
- capableweb 5y agoProbably because the example you made doesn't look like a static file server, it seems to execute a specific unix command on incoming request only. The rest of the examples from the gist is proper static file servers. I'd be interested in seeing if you can come up with a socat one-liner that works like a static file server. Would come in handy for many things, but I can't seem to figure out how to make it work.
- xaduha 5y agoMany examples here in the comments and in the gist itself don't follow it to the letter either, it's easy enough to serve one file. This one might work https://github.com/avleen/bashttpd https://github.com/avleen/bashttpd > socat TCP4-LISTEN:8080 EXEC:/usr/local/bin/bashttpd
- capableweb 5y ago> Many examples here in the comments and in the gist itself don't follow it to the letter either, it's easy enough to serve one file. Curious about what you said, I looked through the gist again and every one of the examples in the gist itself does indeed serve all the files under a path (a "static file server"). Which one are you implying does not?