diff --git a/src/main/java/dev/ashhhleyyy/bad/ClassInspector.java b/src/main/java/dev/ashhhleyyy/bad/ClassInspector.java new file mode 100644 index 0000000..f6f85e1 --- /dev/null +++ b/src/main/java/dev/ashhhleyyy/bad/ClassInspector.java @@ -0,0 +1,24 @@ +package dev.ashhhleyyy.bad; + +import org.objectweb.asm.ClassReader; +import org.objectweb.asm.Opcodes; +import org.objectweb.asm.tree.ClassNode; + +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; + +public class ClassInspector { + public static void main(String[] args) throws IOException { + if (args.length < 1) { + System.err.println("Usage: "); + System.exit(1); + } + String path = args[0]; + byte[] data = Files.readAllBytes(Path.of(path)); + ClassReader reader = new ClassReader(data); + ClassNode cls = new ClassNode(Opcodes.ASM9); + reader.accept(cls, 0); + System.out.println("Set breakpoint here."); + } +}