■ ■ ■ ■ ■ ■
plugin/src/main/java/com/google/tsunami/plugin/payload/Payload.java
| skipped 40 lines |
41 | 41 | | this.config = config; |
42 | 42 | | } |
43 | 43 | | |
44 | | - | /** Returns the actual payload command string */ |
| 44 | + | /** |
| 45 | + | * Get the string representation of the payload. |
| 46 | + | * |
| 47 | + | * @return the actual payload string |
| 48 | + | */ |
45 | 49 | | public final String getPayload() { |
46 | 50 | | logger.atInfo().log( |
47 | 51 | | "%s generated payload `%s`, %s use the callback server", |
| skipped 4 lines |
52 | 56 | | /** |
53 | 57 | | * Checks if the supplied payload was executed based on a given input e.g. a reflective RCE. |
54 | 58 | | * |
55 | | - | * @param input - an UTF-8 encoded string |
| 59 | + | * @param input - a UTF-8 encoded string |
| 60 | + | * @return whether this payload is executed on the scan target. |
56 | 61 | | */ |
57 | 62 | | public final boolean checkIfExecuted(String input) { |
58 | 63 | | return this.validator.isExecuted(Optional.of(ByteString.copyFromUtf8(input))); |
59 | 64 | | } |
60 | 65 | | |
61 | | - | /** Checks if the supplied payload was executed based on a given input e.g. a reflective RCE. */ |
| 66 | + | /** |
| 67 | + | * Checks if the supplied payload was executed based on a given input e.g. a reflective RCE. |
| 68 | + | * |
| 69 | + | * @param input - a sequence of bytes in the {@link ByteString} format. |
| 70 | + | * @return whether this payload is executed on the scan target. |
| 71 | + | */ |
62 | 72 | | public final boolean checkIfExecuted(ByteString input) { |
63 | 73 | | return this.validator.isExecuted(Optional.of(input)); |
64 | 74 | | } |
65 | 75 | | |
66 | | - | /** Checks if the supplied payload was executed based on a given input e.g. a reflective RCE. */ |
| 76 | + | /** |
| 77 | + | * Checks if the supplied payload was executed based on a given input e.g. a reflective RCE. |
| 78 | + | * |
| 79 | + | * @param input - an optional sequence of bytes in the {@link ByteString} format. |
| 80 | + | * @return whether this payload is executed on the scan target. |
| 81 | + | */ |
67 | 82 | | public final boolean checkIfExecuted(Optional<ByteString> input) { |
68 | 83 | | return this.validator.isExecuted(input); |
69 | 84 | | } |
| skipped 1 lines |
71 | 86 | | /** |
72 | 87 | | * Checks if the supplied payload was executed without supplying an input e.g. validation against |
73 | 88 | | * the callback server does not require input. |
| 89 | + | * |
| 90 | + | * @return whether this payload is executed on the scan target. |
74 | 91 | | */ |
75 | 92 | | public final boolean checkIfExecuted() { |
76 | 93 | | return this.validator.isExecuted(Optional.empty()); |
77 | 94 | | } |
78 | 95 | | |
79 | | - | /** Returns additional information about the paylaod to the caller. */ |
| 96 | + | /** |
| 97 | + | * Get additional attributes about this payload. |
| 98 | + | * |
| 99 | + | * @return the {@link PayloadAttributes} about this payload |
| 100 | + | */ |
80 | 101 | | public final PayloadAttributes getPayloadAttributes() { |
81 | 102 | | return this.attributes; |
82 | 103 | | } |
| skipped 2 lines |