Use yGuard with javassist
Closed this issue · 6 comments
I'm using javaassist to modify a class. How can I dynamically invoke yGuard to obfuscate on the bytecode directly?
yGuard is bundled as an ant task and does not provide direct programmatic access. However, the internals of the library are all in this repo, so of course you can also use the internal API, possibly after a couple of modifications.
Note that we do not plan to add an API on top of the core functionality. It was designed as an Ant task and this is the first request to change this in about 20 years, so I guess the need is not really there.
Thanks, but any example? @yGuy Trying to save time on reading the source code ...
🤣 you want to save time by letting someone else do the work ?!
Sorry, but I am trying to save time by not working on issues that aren't important and for which I don't get paid ;-)
Serious offer: If your time is very valuable, let me know and I can see if I can find someone to work on your task.
What kind of example are you looking for?
The sources are all there and the ant task part is very well abstracted away from the core, which has no knowledge about Ant. Just use the core API or find someone who does this for you.
I didn't find documents on the core API, is that already available somewhere?
There is no such thing and never has been. The source is the truth! ;-)
There is no fixed core API. You can take a look at the main Ant task, which does the obfuscation logic, https://github.com/yWorks/yGuard/blob/master/src/main/java/com/yworks/yguard/YGuardTask.java#L31