5

GitHub - Rongmario/ImagineBreaker: Java 17 Hackery, destroys module system + ref...

 1 year ago
source link: https://github.com/Rongmario/ImagineBreaker
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Imagine Breaker [幻想殺し]

I will destroy that illusion of yours.

(Disclaimer: use with care, I'll not be held responsible for your JVM burning up in flames)

Supports:

  1. Breaking down the Java Platform Module System (JPMS) to allow Reflection into any base or requested modules

  2. Removal of Reflection Filters, allows retrieval of any fields/methods from classes that were previously blocked:

    • jdk.internal.reflect.ConstantPool
    • jdk.internal.reflect.Reflection
    • jdk.internal.reflect.UnsafeStaticFieldAccessorImpl
    • java.lang.Class
    • java.lang.ClassLoader
    • java.lang.reflect.Constructor
    • java.lang.reflect.Field
    • java.lang.reflect.Method
    • java.lang.Module
    • java.lang.System
    • java.lang.invoke.MethodHandles$Lookup
    • java.lang.reflect.AccessibleObject
    • sun.misc.Unsafe

All of the above is achieved with 3 different ways:

  1. Reflection (needs --add-opens=java.base/jdk.lang=ALL-UNNAMED)
  2. Unsafe (needs --add-opens=java.base/jdk.internal.misc=ALL-UNNAMED)

Namesake: Toaru Majutsu no Index


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK