Re:Xonsh: Python-powered, cross-platform, Unix-gazing shell
by Norther on Friday September 14, 2018 @06:08PM
(#17991432)
What's stopping a Bash script from doing something similar? You could alias ls to a malicious actor for example.
[ Parent
| on HN ]
Re:Xonsh: Python-powered, cross-platform, Unix-gazing shell
by kbd on Friday September 14, 2018 @06:23PM
(#17991552)
Well, aliases are ignored in scripts usually, but you could prepend something to the PATH so your script/exe gets found before built-ins, no? I agree, I don't see that this is a problem unique to Xonsh.
Re:Xonsh: Python-powered, cross-platform, Unix-gazing shell
by djsumdog on Saturday September 15, 2018 @02:13AM
(#17993233)
I mean, that's the underlying concept behind the fork bomb isn't it? With ":() { :|:&}" you're essentially redefining the bash noop to be a function that pipes/forks itself into itself recursively.
It's the reason './' is not in the default path as well (so you can't place an 'ls' in your home directory and have the admin run your command instead of the real ls).