Search in sources :

Example 1 with UnicastRemoteObject

use of java.rmi.server.UnicastRemoteObject in project ysoserial by frohoff.

the class JRMPListener method getObject.

public UnicastRemoteObject getObject(final String command) throws Exception {
    int jrmpPort = Integer.parseInt(command);
    UnicastRemoteObject uro = Reflections.createWithConstructor(ActivationGroupImpl.class, RemoteObject.class, new Class[] { RemoteRef.class }, new Object[] { new UnicastServerRef(jrmpPort) });
    Reflections.getField(UnicastRemoteObject.class, "port").set(uro, jrmpPort);
    return uro;
}
Also used : UnicastRemoteObject(java.rmi.server.UnicastRemoteObject) UnicastServerRef(sun.rmi.server.UnicastServerRef)

Aggregations

UnicastRemoteObject (java.rmi.server.UnicastRemoteObject)1 UnicastServerRef (sun.rmi.server.UnicastServerRef)1