Add arguments support for many payloads#72
Merged
frohoff merged 9 commits intofrohoff:multiargfrom Sep 23, 2017
Merged
Conversation
Author
|
This issue is related to #71 |
Owner
|
Thanks for the PR. This is good stuff. A couple comments:
|
Author
|
Thanks for the feedback.
|
Author
|
I added support for Please note i created an abstract class ( |
Owner
|
Thanks. Merged into multiargs branch to fix some broken tests and expand support to other payloads. |
Owner
|
Will keep building on this under PR #74. Thanks again. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
execby adding theargumentsparameter.It is now possible to call ysoserial this way :
This will generate a working payload. I also took the liberty of using
StringEscapeUtilsto 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.