OpticFusion1 / MCAntiMalware

Anti-Malware for minecraft
https://www.spigotmc.org/resources/spigot-anti-malware-detects-over-200-malicious-plugins.64982/
GNU General Public License v3.0
287 stars 29 forks source link

[FEATURE REQUEST] Find a way to implement class dumping in versions above java 8 #312

Closed OpticFusion1 closed 2 years ago

OpticFusion1 commented 4 years ago

Is your feature request related to a problem? Please describe. Due to how Java 9+ works you're unable to dump classes using our current method, a new one needs to be implemented for anything above Java 8

Describe the solution you'd like N/A

Describe alternatives you've considered N/A

Additional context N/A

Zorro909 commented 4 years ago

"Class Dumping" is dumping all Classes with their respective bytecode into seperate files, correct? If that's the case, one could scan for all Classes in the current Classpath with Classgraph and then just read the underlying file via .getClass().getResourceAsStream(ClassName + ".class")

OpticFusion1 commented 4 years ago

That would be correct, current implementation can be seen with the following java -jar MCAntiMalware.jar --serverJar --dumpClasses true

Janmm14 commented 3 years ago

@OpticFusion1 What is not working with using Instrumentation to add a ClassFileTransformer for class dumping in Java 9+?

OpticFusion1 commented 3 years ago

Don't remember actually, I'd have to re-look into this issue again

Janmm14 commented 3 years ago

ok