jeudi 17 décembre 2015

Replacing a method in a compiled .class file

Interesting question here. So I have a .jar I received and it is obfuscated, meaning when I decompile the .class files it doesnt show up 100% perfect so I cannot recompile it. However the only method I need to change has been converted perfectly (but the class does not)). Is there a way to somehow change the .java code and inject replace the method within the class file without totally recompiling?

If this fails im going to bytecode.

Thanks!

EDIT: I think one thing I forgot to mention is that I am reflecting this code, not using it as a library. So I dont really need to "use" this code (aka I'm just reflecting and calling functions at runtime). I just want to replace this method within the file so that I dont have to reflect all the fields within the class and manually overload it.





Aucun commentaire:

Enregistrer un commentaire