mirror of
https://github.com/frohoff/ysoserial.git
synced 2026-09-26 17:01:53 +08:00
disable filter
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
package ysoserial.test.payloads;
|
package ysoserial.test.payloads;
|
||||||
|
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
import sun.rmi.transport.ObjectTable;
|
import sun.rmi.transport.ObjectTable;
|
||||||
import ysoserial.Strings;
|
import ysoserial.Strings;
|
||||||
import ysoserial.exploit.JRMPClient;
|
import ysoserial.exploit.JRMPClient;
|
||||||
import ysoserial.payloads.JRMPListener;
|
import ysoserial.payloads.JRMPListener;
|
||||||
@@ -28,13 +28,13 @@ public class JRMPListenerTest implements CustomTest, NeedsAddlClasses {
|
|||||||
Assert.assertFalse("test file shouldn't exist", testFile.exists());
|
Assert.assertFalse("test file shouldn't exist", testFile.exists());
|
||||||
|
|
||||||
// disable ObjectInputFilter if defined
|
// disable ObjectInputFilter if defined
|
||||||
Object filter = getFilter();
|
// Object filter = getFilter();
|
||||||
if (filter != null) {
|
// if (filter != null) {
|
||||||
Field f = Reflections.getField(Class.forName("sun.rmi.transport.DGCImpl"), "dgcFilter");
|
// Field f = Reflections.getField(Class.forName("sun.rmi.transport.DGCImpl"), "dgcFilter");
|
||||||
if (f != null) {
|
// if (f != null) {
|
||||||
f.set(null, filter);
|
// f.set(null, filter);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
// open listener
|
// open listener
|
||||||
Remote res = (Remote) payload.call();
|
Remote res = (Remote) payload.call();
|
||||||
|
|||||||
Reference in New Issue
Block a user