MCPcopy Create free account
hub / github.com/Y4tacker/JavaSec / agentmain

Method agentmain

6.JavaAgent/LicenceCrack/src/main/java/MyAgent.java:9–25  ·  view source on GitHub ↗
(String agentArgs, Instrumentation inst)

Source from the content-addressed store, hash-verified

7
8public class MyAgent {
9 public static void agentmain(String agentArgs, Instrumentation inst){
10 inst.addTransformer(new MyTransformer("E:\\LicenceCrack\\target\\classes\\CrackLicenseTest.class"),true);
11 Class[] loadedClass = inst.getAllLoadedClasses();
12 for (Class clazz : loadedClass){
13 String className = clazz.getName();
14 if (inst.isModifiableClass(clazz)){
15 if (className.equals("CrackLicenseTest")){
16 try {
17 inst.retransformClasses(clazz);
18 } catch (UnmodifiableClassException e) {
19 e.printStackTrace();
20 }
21 }
22
23 }
24 }
25 }
26 public static void main(String[] args) throws Exception {
27
28 int flag = 0;

Callers

nothing calls this directly

Calls 1

equalsMethod · 0.80

Tested by

no test coverage detected