Selaa lähdekoodia

增加xml混淆

JustryDeng 4 vuotta sitten
vanhempi
commit
b857625748

+ 3 - 2
class-winter-core/src/main/java/winter/com/ideaaedi/classwinter/executor/DecryptExecutor.java

@@ -268,9 +268,10 @@ public class DecryptExecutor {
         
         Map<String, byte[]> replaceMap = new HashMap<>(16);
         for (String zipEntryName : needToDecryptNonClassFileSet) {
-            byte[] encryptedBytes = IOUtil.readFileFromWorkbenchRoot(zipFile, Constant.DEFAULT_ENCRYPTED_NON_CLASSES_SAVE_DIR + zipEntryName);
             // 只处理有印章的
-            if (DecryptExecutor.verifySeal(encryptedBytes)) {
+            byte[] cleanedBytes = IOUtil.readFileFromWorkbenchRoot(zipFile, zipEntryName);
+            if (DecryptExecutor.verifySeal(cleanedBytes)) {
+            byte[] encryptedBytes = IOUtil.readFileFromWorkbenchRoot(zipFile, Constant.DEFAULT_ENCRYPTED_NON_CLASSES_SAVE_DIR + zipEntryName);
                 byte[] bytes = EncryptUtil.decrypt(encryptedBytes, userIfInputPwdWhileDecrypt ? password :
                         obtainAutoGeneratedPwdWhileEncrypt(zipFilePath, Constant.DEFAULT_ENCRYPTED_BASE_SAVE_DIR));
                 replaceMap.put(zipEntryName, bytes);