mirror of
https://github.com/frohoff/ysoserial.git
synced 2026-09-25 16:31:54 +08:00
switched test to multiarg
This commit is contained in:
@@ -38,8 +38,8 @@ public class TestHarnessTest {
|
|||||||
PayloadsTest.testPayload(ExecMockPayload.class, new Class[] { ExecMockSerializable.class });
|
PayloadsTest.testPayload(ExecMockPayload.class, new Class[] { ExecMockSerializable.class });
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class ExecMockPayload implements ObjectPayload<ExecMockSerializable> {
|
public static class ExecMockPayload extends ExtendedObjectPayload<ExecMockSerializable> {
|
||||||
public ExecMockSerializable getObject(String command) throws Exception {
|
public ExecMockSerializable getObject(String[] command) throws Exception {
|
||||||
return new ExecMockSerializable(command);
|
return new ExecMockSerializable(command);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -52,8 +52,8 @@ public class TestHarnessTest {
|
|||||||
|
|
||||||
@SuppressWarnings("serial")
|
@SuppressWarnings("serial")
|
||||||
public static class ExecMockSerializable implements Serializable {
|
public static class ExecMockSerializable implements Serializable {
|
||||||
private final String cmd;
|
private final String[] cmd;
|
||||||
public ExecMockSerializable(String cmd) { this.cmd = cmd; }
|
public ExecMockSerializable(String[] cmd) { this.cmd = cmd; }
|
||||||
|
|
||||||
private void readObject(final ObjectInputStream ois) throws IOException, ClassNotFoundException {
|
private void readObject(final ObjectInputStream ois) throws IOException, ClassNotFoundException {
|
||||||
ois.defaultReadObject();
|
ois.defaultReadObject();
|
||||||
|
|||||||
Reference in New Issue
Block a user