Live data from Hacker News

Make an internet radio station with one line of bash

schollz.com

11–20 of 55 posts

Re: Make an internet radio station with one line of bash

#12
I think the dissenting / mocking comments here are missing the spirit of the post.

Since bash can evoke any Turing complete program, feasibly anything could be done with one line of bash.

The authors intent as I saw was to show what that line was. Would you have known without this article?

Whether or not people are just being sarcastic, I feel we should definitely not mock but rather encourage any open and free attempts at teaching us cool things that are more novel than the “how to get started on Linux” type bs the market is inundated with.

Bravo to author.

Re: Make an internet radio station with one line of bash

#14

I think the dissenting / mocking comments here are missing the spirit of the post. Since bash can evoke any Turing complete program, feasibly anything could be done with one line of bash. The authors intent as I saw was to show what that line was. Would you have known without this article? Whether or not people are just being sarcastic, I feel we should definitely not mock but rather encourage any open and free attem…

"To solve this problem I wrote a simple server that runs in the cloud which can handle any number of realtime broadcasts uploaded using a simple curl command. This allows you to essentially broadcast radio feeds with a single line. My solution to the problem of broadcasting audio without port-forwarding was to create a free and public “dummy” server that handles any incoming traffic and forwards to any number of connected clients. This server keeps track of connected clients and routes incoming packets to them, otherwise discarding the packets."

If the author had perhaps titled their post "I wrote a multiplexing server for audio streams" it might go over better, although that doesn't have the proper click-bait appeal.

Re: Make an internet radio station with one line of bash

#18
post #7
post #6

Earlier quoted context omitted.

sudo ./launch-missiles.sh --target=[REDACTED] --missile-count=4 --username=jbiden --password=1111

I love that Biden's putting his password into ~/.bash_history

It's also visible in the process table (ps auxww). It can be erased by rewriting the arguments from inside the process (I think this is OS-specific, not the same as changing argv in-place), but that is a race condition.

The safe way is to either read it from stdin/fd (maybe call isatty(3) to check if someone doesn't echo password | ./foo), or open a file (check if permissions are 600). You could also have a named socket (check permissions!) talking to an authn agent, which could be doing some other fancy stuff like pinging your smartwatch to confirm, etc.

Post reply on HN