|
|
@@ -110,17 +110,20 @@ public class Reverses {
|
|
|
// 获取类所在的项目运行路径
|
|
|
String projectPath = protectionDomain.getCodeSource().getLocation().getPath();
|
|
|
try {
|
|
|
- projectPath = JarUtil.getRootPath(projectPath);
|
|
|
- } catch (ClassWinterException e) {
|
|
|
+ projectPath = URLDecoder.decode(projectPath, StandardCharsets.UTF_8.name());
|
|
|
+ } catch (UnsupportedEncodingException ex) {
|
|
|
+ // ignore
|
|
|
+ }
|
|
|
+
|
|
|
+ // 如果不是强制指定解密该projectPath,那么解析其projectPath
|
|
|
+ if (!isNeedTryDecrypt(decryptProjectPathPrefixSet, projectPath)) {
|
|
|
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);
|
|
|
- } else {
|
|
|
+ projectPath = JarUtil.getRootPath(projectPath);
|
|
|
+ } catch (ClassWinterException e) {
|
|
|
+ return classfileBuffer;
|
|
|
+ } catch (Exception e) {
|
|
|
+ Logger.warn(Reverses.class, "JarUtil.getRootPath occur exception."
|
|
|
+ + " projectPath -> " + projectPath + ", e.getMessage() -> " + e.getMessage());
|
|
|
return classfileBuffer;
|
|
|
}
|
|
|
}
|