嘿,我正在使用这个混淆器http://www.allatori.com/,我得到一个奇怪的错误,我对如何修复感到困惑。看起来问题出在混淆的 jar 位置,而不是让我感到困惑的正常源文件。我认为这可能与 Allatori 配置有关。
错误:`
java.lang.IllegalArgumentException
at com.allatori.IiiIIiIIii.<init>(Unknown Source)
at com.allatori.IiiIIiIIii.<init>(Unknown Source)
at com.allatori.iIiiiIIIII.E(nv:688)
at com.allatori.iIiiiIIIII.E(nv:151)
at com.allatori.iIiiiIIIII.E(nv:654)
at com.allatori.iiIIIIIiIi.A(rs:385)
at com.allatori.iiIIIIIiIi.C(rs:235)
at com.allatori.Obfuscate.H(jz:865)
at com.allatori.Obfuscate.main(jz:420)
`
聚甲醛:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>xyz.interglacticdev</groupId>
<artifactId>SMPAdmin</artifactId>
<version>DEVELOPMENT</version>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<id>copy-and-filter-allatori-config</id>
<phase>package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${basedir}/target</outputDirectory>
<resources>
<resource>
<directory>${basedir}/allatori</directory>
<includes>
<include>allatori.xml</include>
</includes>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<id>run-allatori</id>
<phase>package</phase>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
<configuration>
<executable>java</executable>
<arguments>
<argument>-Xms128m</argument>
<argument>-Xmx512m</argument>
<argument>-jar</argument>
<!-- Copy allatori.jar to 'allatori' directory to use the commented line -->
<argument>${basedir}\allatori\lib\allatori.jar</argument>
<!-- <argument>${basedir}/allatori/allatori.jar</argument> -->
<argument>${basedir}/allatori/defaultconfig.xml</argument>
</arguments>
</configuration>
</plugin>
</plugins>
</build>
<properties>
<maven.compiler.source>16</maven.compiler.source>
<maven.compiler.target>16</maven.compiler.target>
</properties>
<repositories>
<!-- This adds the Spigot Maven repository to the build -->
<repository>
<id>spigot-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>
<repository>
<name>jcenter</name>
<id>bintray-jcenter</id>
<url>https://jcenter.bintray.com</url>
</repository>
</repositories>
<dependencies>
<!--This adds the Spigot API artifact to the build -->
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.17.1-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>club.minnced</groupId>
<artifactId>discord-webhooks</artifactId>
<version>0.5.8</version>
</dependency>
</dependencies>
</project>
Allatori 配置:
<keep-names>
<class access="private+">
<field access="private+"/>
<method access="private+"/>
</class>
</keep-names>
<property name="random-seed" value="a"/>
<watermark key="secure-key-to-extract-watermark" value="a"/>
<property name="log-file" value="log.xml"/>
<property name="string-encryption" value="disable"/>
<property name="string-encryption-type" value="fast"/>
<property name="string-encryption-version" value="v4"/>
<property name="synthetize-methods" value="disable"/>
<property name="synthetize-fields" value="disable"/>
<property name="control-flow-obfuscation" value="disable"/>
<property name="extensive-flow-obfuscation" value="disable"/>
<property name="local-variables-naming" value="keep"/>
<property name="skip-renaming" value="enable"/>
<property name="line-numbers" value="keep"/>
<property name="generics" value="keep"/>
<classpath basedir="D:\Spigot\SMPAdmin]\library-jars\lib">
<jar name="*.jar"/>
</classpath>