You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
YABR is a bidirectional Java (de)compiler, program-analysis, and transformation framework. It spans
bytecode, SSA, a structured IR, execution, and source, so a program can be lifted, analyzed,
transformed, executed, compiled, and decompiled across one ecosystem.
Projects using YABR
JStudio - A Java reverse engineering and analysis IDE.
// Load a classClassPoolpool = ClassPool.getDefault();
ClassFilecf = pool.loadClass(inputStream);
// Create a new class with a default constructorintaccess = newAccessBuilder().setPublic().build();
ClassFilenewClass = ClassFactory.createClass(pool, "com/example/MyClass", access);
// Add a field with a getter and setterFieldEntryfield = newClass.createNewField(access, "value", "I", newArrayList<>());
ClassFactory.generateGetter(newClass, field, false);
ClassFactory.generateSetter(newClass, field, false);
// Write the classnewClass.rebuild();
byte[] bytes = newClass.write();
Examples
Runnable examples are in examples/src/main/java/com/tonic/demo/,
including class creation, SSA transformation, LLVM lowering, AST mutation, decompilation, call
graphs, dependency analysis, type inference, and pattern search.
YABR is a Gradle multi-project. Production code is split into layered modules (core, bytecode,
renamer, ssa, source, analyses, execution, query) whose dependencies are acyclic and
build-enforced; the all module merges them into a single jar. See
Architecture.