Post B4O65GhbYCtiN9FdJI by joel@tumfatig.net
(DIR) More posts by joel@tumfatig.net
(DIR) Post #B4MTsxXYygkc3FIX8C by joel@tumfatig.net
0 likes, 0 repeats
Currently doing some simple complex bash scripting on OpenBSD because I can’t find the courage/patience to (re)start learning C from the beginning. The learning curve is so much tinier when it comes to integrating with shell scripts.https://yad-guide.ingk.se/That reminds me of the time I was scripting things with dialog 😆
(DIR) Post #B4MTsxiCL9G2aEH1hw by mirabilos@toot.mirbsd.org
0 likes, 0 repeats
@joel but why not ksh?
(DIR) Post #B4MUEW2xsXhH9WGTYm by ojs@c.im
0 likes, 0 repeats
@joel any specific reason why using bash instead of ksh? The latter being the default one in #OpenBSD.You just more comfortable in bash then other shells?
(DIR) Post #B4MUEWH91p2VrUtnf6 by joel@tumfatig.net
0 likes, 0 repeats
@ojs yes! :)I generally use ksh and try to keep POSIX compliant. But in this case, I have to export functions. And that doesn't seem to be possible using ksh(1); from what I saw in the manual page and a bunch of try&fail. I could probably use ksh93 but bash is already installed by some other software so I just use it.That said, when the bash scripts will work, I will probably try again to have all working in ksh.
(DIR) Post #B4MUEWQiSEhCLBNRa4 by mirabilos@toot.mirbsd.org
0 likes, 0 repeats
@joel @ojs not sure whether GNU bash even supports exporting functions after shellshock?
(DIR) Post #B4MUle90nEz7p4tJ9U by joel@tumfatig.net
0 likes, 0 repeats
@mirabilos well, right know, looks like it does. At least, the export -f on_click works as expected :)@ojs
(DIR) Post #B4MUleJe9hUYM3rnjE by mirabilos@toot.mirbsd.org
0 likes, 0 repeats
@joel @ojs egads, it exports it as BASH_FUNC_on_click%%=() { … now.As if that was more secure…
(DIR) Post #B4NwfzAahS4HAYg8fY by joel@tumfatig.net
0 likes, 0 repeats
@mirabilos I have 0 understanding of all what that means 😅@ojs
(DIR) Post #B4NwfzicevI2s6bJiK by mirabilos@toot.mirbsd.org
0 likes, 0 repeats
@joel @ojs it now prefixes BASH_func_ and suffixes percent signs to the function name, so that it’s not as easy to trigger over HTTP, but that’s still only a cosmetic mitigation of the exploits
(DIR) Post #B4O65GhbYCtiN9FdJI by joel@tumfatig.net
0 likes, 0 repeats
@mirabilos hum… ok… still I don’t do or expose BASH over HTTP 😅@ojs
(DIR) Post #B4O65Gsws1yIwKYgzY by mirabilos@toot.mirbsd.org
0 likes, 0 repeats
@joel @ojs CGIs