我有以下config.xml文件
<config>
<input>
<jar in="FVCellsPlugin-3.3.1-jcg.jar" out="obf-FVCellsPlugin-3.3.1-jcg.jar"/>
</input>
<keep-names>
<class template="class io.github.freakyville.fvcells.main.Main"/>
<class template="class regex:(?!io\.github\.freakyville).*\..*">
<field template="*"/>
<field template="static *"/>
<field template="public static *"/>
<method template="private+ *(**)"/>
<method template="private+ static *(**)"/>
</class>
<class template="private+ class regex:io\.github\.freakyville\.utilsupdated\..*"/>
</keep-names>
<property name="log-file" value="log.xml"/>
<property name="line-numbers" value="keep"/>
</config>所以我尝试了一些不起作用的东西,我想要混淆的所有代码都在包(或子包)io.github.freakyville(除了io.github.freakyville.utilsupdated)中。当插件被启用时,我得到了一个错误的java.lang.NoSuchMethodError: com.mongodb.client.model.geojson.c.iiiiiI(Ljava/lang/String;)Ljava/lang/String;,它表明它混淆了com.mongodb.client.model.geojson中的类,当查看jar内部时,我可以看到它混淆了geojson.c类https://gyazo.com/45c17157d5d7a213f14a9ecc2c12b4f6,这对我来说没有意义,因为我的正则(?!io\.github\.freakyville).*\..*应该匹配那个包/类路径,然后保持包/类的正确?
发布于 2021-02-22 07:21:21
啊,我想通了,我遗漏了文档中的标签(忽略了混淆过程中匹配的类)。将我的类模板添加到其中,现在它可以工作了
https://stackoverflow.com/questions/66276645
复制相似问题