|
|
@@ -15,9 +15,11 @@ import winter.com.ideaaedi.classwinter.util.StrUtil;
|
|
|
|
|
|
import java.io.File;
|
|
|
import java.io.IOException;
|
|
|
+import java.io.UnsupportedEncodingException;
|
|
|
import java.lang.instrument.ClassFileTransformer;
|
|
|
import java.lang.instrument.Instrumentation;
|
|
|
import java.lang.management.ManagementFactory;
|
|
|
+import java.net.URLDecoder;
|
|
|
import java.nio.charset.StandardCharsets;
|
|
|
import java.security.ProtectionDomain;
|
|
|
import java.util.Arrays;
|
|
|
@@ -110,6 +112,11 @@ public class Reverses {
|
|
|
try {
|
|
|
projectPath = JarUtil.getRootPath(projectPath);
|
|
|
} catch (ClassWinterException e) {
|
|
|
+ try {
|
|
|
+ projectPath = URLDecoder.decode(projectPath, StandardCharsets.UTF_8.name());
|
|
|
+ } catch (UnsupportedEncodingException ex) {
|
|
|
+ // ignore
|
|
|
+ }
|
|
|
// 如果是不能识别的路径,那么看有没有强制指定解密该projectPath
|
|
|
if (isNeedTryDecrypt(decryptProjectPathPrefixSet, projectPath)) {
|
|
|
Logger.info(Reverses.class, "Ignore unknown path[" + e.getMessage() + "].Goon decrypt on projectPath -> " + projectPath);
|
|
|
@@ -285,6 +292,10 @@ public class Reverses {
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 是否需要试着解密projectPath指向的代码
|
|
|
+ */
|
|
|
private static boolean isNeedTryDecrypt(Set<String> decryptProjectPathPrefixSet, String projectPath) {
|
|
|
boolean needTryDecrypt = false;
|
|
|
for (String decryptProjectPathPrefix : decryptProjectPathPrefixSet) {
|