Package eu.tneitzel.rmg.networking
Class DGCClientSocketFactory
- java.lang.Object
-
- java.rmi.server.RMISocketFactory
-
- eu.tneitzel.rmg.networking.DGCClientSocketFactory
-
- All Implemented Interfaces:
RMIClientSocketFactory,RMIServerSocketFactory
public class DGCClientSocketFactory extends RMISocketFactory
The DGCClientSocket factory is used when the --ssrf-response option was specified on the command line. In this case, the user may supplies an SSRF response that contains a remote object reference. These references create outbound DGC connections upon deserialization. To prevent these outbound connections, we use a dummy socket factory. This factory returns sockets that discard all incoming data and return an malformed DGC response when being read. Since no outgoing data is expected when using --ssrf-response, this socket factory is set to the default RMI socket factory if the --ssrf-response option is used.- Author:
- Tobias Neitzel (@qtc_de)
-
-
Constructor Summary
Constructors Constructor Description DGCClientSocketFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ServerSocketcreateServerSocket(int port)SocketcreateSocket(String host, int port)-
Methods inherited from class java.rmi.server.RMISocketFactory
getDefaultSocketFactory, getFailureHandler, getSocketFactory, setFailureHandler, setSocketFactory
-
-
-
-
Method Detail
-
createSocket
public Socket createSocket(String host, int port) throws IOException
- Specified by:
createSocketin interfaceRMIClientSocketFactory- Specified by:
createSocketin classRMISocketFactory- Throws:
IOException
-
createServerSocket
public ServerSocket createServerSocket(int port) throws IOException
- Specified by:
createServerSocketin interfaceRMIServerSocketFactory- Specified by:
createServerSocketin classRMISocketFactory- Throws:
IOException
-
-