News for hackers. Stuff that matters.
Re:Safe ways to do things in bash by koolba on Monday May 14, 2018 @09:49PM (#17070996)
> It's funny how many things that seem kind of incredible for a pure bash solution, ...

My go to example of “Bash can do whaaat?!” is the source for xip.io. A custom DNS server written in a handful of lines of Bash!

https://github.com/basecamp/xip-pdns/blob/master/bin/xip-pdn...

Re:Safe ways to do things in bash by ddtaylor on Monday May 14, 2018 @10:58PM (#17071304)
I have made a lot of DNS products and doing the same thing happening here is a few lines of code in most any language. This code, while entertaining, cannot handle very simple DNS packets because of its "compression encoding.
Re:Safe ways to do things in bash by kiallmacinnes on Tuesday May 15, 2018 @12:27AM (#17071645)
This is ran behind PowerDNS, which handles the compression prior to handing off to this code, so that shouldn't be a problem.
Re:Safe ways to do things in bash by brazzledazzle on Tuesday May 15, 2018 @04:51AM (#17072563)
Which means it’s not really doing any of the heavy lifting.
Re:Safe ways to do things in bash by xyproto on Tuesday May 15, 2018 @06:51AM (#17073019)
Which is also the case for most bash scripts, the heaving lifting is done by all the executables that are called from bash, not in native bash.
Re:Safe ways to do things in bash by opinionator1 on Tuesday May 15, 2018 @09:17AM (#17073660)
Nobody said it couldn't be done, just that it shouldn't. Fun stunt but ultimately suitable only for toys or as a gimmick.
Re:Safe ways to do things in bash by digitalsushi on Tuesday May 15, 2018 @09:36AM (#17073788)
I've developed on consumer grade routers from big vendors - Asus, linksys, netgear etc, and they are all using identical quality scripts for a large majority of the router's data processing. These scripts may not be pristine, but they are sure not always just a toy.