$ sudo echo 'all ur base r belong to us' >/flag.txt
$ cat /flag.txt
all ur base r belong to usposix-sudo-shim is a minimal drop-in replacement for sudo, a full-feature elevated command execution system. posix-sudo-shim does not attempt to support the vast majority of sudo's many features, but rather provides minimal syntax and semantics support, in order to help in porting shell scripts between different UNIX systems, where sudo may not be present, but is called for by the scripts.
Some commands may break with sudo..., such as in Haiku nightly, where the underlying su may be broken. For such primarily single-user environments, a more reliable sudo shim would look like:
#!/bin/sh
# Assume root-level privileges and avoid PTY's
"$@"$ git clone https://github.com/mcandre/posix-sudo-shim.git
$ cp posix-sudo-shim/lib/sudo /bin$ rm /bin/sudo- vast
- shfmt (e.g.
GO111MODULE=on go get mvdan.cc/sh/v3/cmd/shfmt) - bashate
- checkbashisms
- ShellCheck
- stank (e.g.
go get github.com/mcandre/stank/...)
$ vast [lint]