Skip to content

Commit a68b24a

Browse files
Added more descriptive comment
1 parent 1771318 commit a68b24a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

java/javagadget.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,12 @@ func ErrorInvalidCommandLength(msg string) error {
1515
return fmt.Errorf("%w: %s", errInvalidCommandLength, msg)
1616
}
1717

18-
// to this function with <shell> -c or anything of the like.
18+
// This payload was generated using ysoserial-modified with the CommonsCollections6 gadget and the bash shell arg
19+
// The benefit of this payload over one generated from the unmodified ysoserial is the you do not need to
20+
// prepend it with a bash -c, and the spaces do not need to be replaced with $IFS.
21+
// It also solves redirection issues that are present in unmodified ysoserial payloads.
22+
// This payload will always run the provided command using bash, hence the name.
23+
// That said you should not need, nor should you prepend a <shell> -c to commandStr parameter passed here.
1924
func Commons6ModifiedBashCommandBytecode(commandStr string) (string, error) {
2025
if len(commandStr) > 255 || len(commandStr) < 1 {
2126
return "", ErrorInvalidCommandLength("command must be between 1 and 255 characters")

0 commit comments

Comments
 (0)