leibnitz27 / cfr

This is the public repository for the CFR Java decompiler
https://www.benf.org/other/cfr
MIT License
1.93k stars 249 forks source link

Decompiling specific package(s) #336

Closed drori200 closed 1 year ago

drori200 commented 1 year ago

As the title says, is it possible to decompile specific package(s) with CFR? Currently I have a jar that fails to be decompiled with my decompiler of choice (QuiltFlower) due to two package. Because of that, I have to mix the usage of CFR and QF to get the desired decompiled code.

leibnitz27 commented 1 year ago

You can just do this with --jarfilter REGEX

i.e.

java -jar cfr.jar cfr.jar --jarfilter "org.benf.cfr.reader.bytecode.analysis.opgraph.op4rewriters.checker.*"

drori200 commented 1 year ago

Is it also possible to add multiple jar filters? something like "com.example.app" and "net.example.code"

leibnitz27 commented 1 year ago

it's just a regex. So use a disjunction.

java -jar cfr.jar cfr.jar --jarfilter "^(com.example.app|net.example.code)"