简体   繁体   English

用 allatori 混淆太多

[英]obfuscating with allatori obfuscates too much

I have the following config.xml file我有以下 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>

So I tried a few things without it working, all my code that i want obfuscated is in the package(or sub packages) io.github.freakyville (except io.github.freakyville.utilsupdated ). So I tried a few things without it working, all my code that i want obfuscated is in the package(or sub packages) io.github.freakyville (except io.github.freakyville.utilsupdated ). when the plugin is enabled I get an error java.lang.NoSuchMethodError: com.mongodb.client.model.geojson.c.iiiiiI(Ljava/lang/String;)Ljava/lang/String; when the plugin is enabled I get an error java.lang.NoSuchMethodError: com.mongodb.client.model.geojson.c.iiiiiI(Ljava/lang/String;)Ljava/lang/String; which shows that it is obfuscating the class inside com.mongodb.client.model.geojson , When looking inside the jar I can see that it has obfuscated the geojson.c class https://gyazo.com/45c17157d5d7a213f14a9ecc2c12b4f6 which to me doesn't make sence as my regex (?.io\.github\.freakyville).*\..* should match that package/class path and then keep the package/class right? which shows that it is obfuscating the class inside com.mongodb.client.model.geojson , When looking inside the jar I can see that it has obfuscated the geojson.c class https://gyazo.com/45c17157d5d7a213f14a9ecc2c12b4f6 which to me doesn'我的正则表达式(?.io\.github\.freakyville).*\..*应该与该包/类路径匹配,然后保持包/类正确吗?

Ah I figured it out, I missed the tag in the documentation(which ignores the classes matched in the obfuscating process).啊,我想通了,我错过了文档中的标签(忽略了混淆过程中匹配的类)。 Adding my class templates to that and now it works将我的 class 模板添加到其中,现在它可以工作了

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM