Skip to content

Instantly share code, notes, and snippets.

View i36lib's full-sized avatar
:octocat:
V2lzaCBZb3Ugd2VyZSBIZXJlLg==

Fury i36lib

:octocat:
V2lzaCBZb3Ugd2VyZSBIZXJlLg==
  • Mars
View GitHub Profile
@raphw
raphw / BootstrapAgent.java
Last active March 26, 2024 06:56
An example agent that intercepts a method of the bootstrap class loader.
package net.bytebuddy;
import net.bytebuddy.agent.ByteBuddyAgent;
import net.bytebuddy.agent.builder.AgentBuilder;
import net.bytebuddy.description.type.TypeDescription;
import net.bytebuddy.dynamic.ClassFileLocator;
import net.bytebuddy.dynamic.DynamicType;
import net.bytebuddy.dynamic.loading.ClassInjector;
import net.bytebuddy.implementation.MethodDelegation;
import net.bytebuddy.implementation.bind.annotation.SuperCall;