Hacker News new | past | comments | ask | show | jobs | submit login
Seashells: Pipe output from command-line programs to the web in real-time (seashells.io)
139 points by tjhill 49 days ago | hide | past | favorite | 30 comments

Just sayin' you can do something like this in bash out of the box... Don't let me spoil the party though, the more the merrier.


"/dev/tcp/host/port If host is a valid hostname or Internet address, and port is an integer port number or service name, Bash attempts to open the corresponding TCP socket.

/dev/udp/host/port If host is a valid hostname or Internet address, and port is an integer port number or service name, Bash attempts to open the corresponding UDP socket."

I've got an example of a "practical" way to use it in an answer I did over here https://superuser.com/questions/563083/how-to-transfer-files...

"Seashells lets you pipe output from command-line programs to the web in real-time, even without installing any new software on your machine"

The page already told us you can do this out of the box. It's the very first sentence.

It also clearly explains the benefits provided by using the additional, optionally installed tooling.

I'm claiming this can already be accomplished using standard tools already installed, without much effort.

It won't look The Exact Same but it is functionally equivalent for many uses and is self hosted

It's not meant to be discouraging, if people find it useful then great

> self hosted

The article has two points.

1. They are providing a web server.

2. They are providing instructions on sending things to that server using netcat or an optional client/script.

I think your bash example covers point 2 only.

You seem to be missing the "live updating web page displaying what's being piped to the server" part.

> "/dev/tcp/host/port If host is a valid hostname or Internet address, and port is an integer port number or service name, Bash attempts to open the corresponding TCP socket.

that is WILD.

Beware the folly of the Dropbox comment

For the background, that was way back in the day where someone looking at things through only their own use case and concluding the just announced dropbox was a useless product (to them).

A very similar comment was famously made on slashdot about the "just released" ipod in 2001, "No wireless. Less space than a nomad. Lame."

I was thinking about both famous dismissals as I was typing my first comment.

Still thought it was worth surfacing some arcane knowledge some may find useful.

Aww, what a great idea. I'd love to use a self hosted version of this for work, but there's no way I could pipe my shell output to a 3rd party site, too many juicy secrets.

Before clicking through, it didn't even register to me that something like this would be done some way that wasn't self hosted.

I'm kinda shocked anyone uses it, I must admit.

Yeah. Looks like there's an open source version of this, similarly polished streamhut.io

Nice. Great find, thanks for doing the looking!

This would be even cooler if it could be end to end encrypted. E.g. client side it spits out a decryption key, and encrypts all traffic with it. Then on the browser, you paste that in and it will decrypt.

Obviously you have to trust the javascript to not do anything nefarious with your data, so maybe it’s not really adding much security.

Yea that’s a cool idea. You could leverage inspiration from wormhole. This podcast with the developer goes into some interesting details on key management and usability fo e2ee in the browser.


Are there any legal security issues to be concerned about as a developer of this kind of anonymous service?

I wonder every time I see a project like this, namely anonymous or transient hosting of any kind of user data, whether the developers get any kind of flak from agencies claiming it could be used to nefarious ends.

Serving plain text is obviously less of a concern than hosting images, video, etc.

But I imagine the more anonymous a service is, the more attractive it is for use by unsavory actors.

Anyone have any thoughts?

This one appears to have been created by a real people person.


With anonymous I think matt_f was referring to the users, not the creator or manager of the service, the issue being that an anonymous user could use the service to transmit illegal/immoral/... information (stolen CC info or identity data, CP, trade secrets, government secrets, and so forth) using the service.

The assumption that makes this a problem is that the service makes such users (at least slightly) less easy to trace, and/or the person(s) running the service might in some jurisdictions be seen as responsible for enabling the illegal activity.

I for one love transient web services.


Anything new here?

Previous discussion:


You can't self host? Piping server data to a remote untrusted server doesn't seem appealing. Unless I am missed something?

Maybe try streamhut: https://github.com/miguelmota/streamhut

Of course, both of them are not ready for security-related tasks such as terminal sharing. So treat them like a "console" streaming service there you broadcast your terminal to the world.

Streamhut can be made more secure with some configuration tricks, namely, don't expose it's TCP port to the public, instead, only expose it's HTTP service. Then you can create a back tunnel (with SSH -L for example) to feed data into it's TCP port in a safer manner.

However, I'd imagine a better option is to beg miguelmota the author to add support for websocket in the cli client, that way the feeder connection can be protected by TLS rather than just a raw TCP.

I'm sure someone has a use case for when the data being public is inconsequential.

Something similar has existed in the Gentoo community for many years: wgetpaste [0]. Also I distinctly remember seeing something like this before which exactly the same minus the Python package (so you could only use netcat). wgetpaste is mostly for sharing debug information in IRC but I could imagine it being useful for many other ad hoc troubleshooting type things.

[0] https://wiki.gentoo.org/wiki/Wgetpaste

For generally converting cli output to HTML see also https://github.com/pixelb/scripts/commits/master/scripts/ans...

To be even more unixy, this needs a file interface /dev/sls that you can pipe directly to.

I prefer &> it into a file within virtual host or something. And access it in secure manner.

I think the application of it is reasonable only when you are thinking of simple applications like Yes/No notifier and not outputting logs. I wonder if it works well with TQDM so I can see the code execution progress bar.

Anyone know an easy way to force this to run in interactive mode or pty or whatever? I am trying to get color output from `bat` for example.

The coolest feature idea that I will probably never use

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact