News for hackers. Stuff that matters.
Re:Suicide Linux (2009) by derefr on Thursday October 01, 2020 @07:48PM (#24657389)
Is there a name for this design philosophy? A lesser version of it is already what both shell scripts and PHP pages do by default. No crashing—only limping forward (likely in ridiculous invalid states.)

> if one branch exits with a nonzero exit code, the other branch is taken

That's called the Amb operator. It's actually fairly useful! Presuming you tended to write side-effect-free shell scripts, I could see enjoying this one.

> If you try to read a .json file that doesn't exist, you get the bytes "{}"

I would actually appreciate some little intermediary utility that would inject "{}" to stdout iff stdin was empty. It'd make piping maybe-JSON documents through to jq(1) work a lot more smoothly.

> If you try to connect to a port that nothing is listening on, it does its best to behave like the service that should be listening there.

I love the idea of the xinetd(8) equivalent to Busybox. A multi-protocol stub server, that knows how to speak literally every protocol, and listens on every port it can, but does nothing much over any of those protocols. It could serve as a way to slow down a Metasploit scan, by offering it an endless variety of things to try to exploit!

Re:Suicide Linux (2009) by eru on Friday October 02, 2020 @04:52AM (#24660546)
Some variants of BASIC had the infamous 'on error resume next' statement.