Skip to content

Commit

Permalink
add crack zip comment
Browse files Browse the repository at this point in the history
  • Loading branch information
lqs1848 committed Jul 15, 2021
1 parent 0e4fe05 commit df5f5bd
Show file tree
Hide file tree
Showing 11 changed files with 2,197 additions and 3 deletions.
12 changes: 12 additions & 0 deletions .classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="src"/>
<classpathentry kind="lib" path="lib/javassist.jar"/>
<classpathentry kind="lib" path="allatori.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
17 changes: 17 additions & 0 deletions .project
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>AllatoriCrack</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
2 changes: 2 additions & 0 deletions .settings/org.eclipse.core.resources.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8
2 changes: 2 additions & 0 deletions .settings/org.eclipse.core.runtime.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
line.separator=\r\n
14 changes: 14 additions & 0 deletions .settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=11
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,13 +142,13 @@ demo目录下有示例 并附有7.6原版

​ 2021/02/23 : **Bug Repair** 修复继承的方法名称被加密成与父类方法名不相同的问题 修复忽略加密却还是被加密的问题


​ 2021/07/15 : **Bug Repair** 修复加密后的jar包中的 注释(zip压缩包注释 ZipOutputStream.setComment("这个注释")) 没有被破解的Bug

**Ps:**

​ 这玩意真不好破解 全部都是类似 IiIiii.class 的文件看的脑壳疼 w(゚Д゚)w

​ 相比之下 Charles 真的是太好破解了 业界良心 ヾ(≧∇≦*)ゝ
​ 相比之下 Charles 真的是太好破解了 ヾ(≧∇≦*)ゝ



Expand Down
Binary file modified allatori_crack.jar
Binary file not shown.
2,125 changes: 2,125 additions & 0 deletions demo/log.xml

Large diffs are not rendered by default.

Binary file added demo/obf-test1.jar
Binary file not shown.
Binary file added demo/obf-test2.jar
Binary file not shown.
24 changes: 23 additions & 1 deletion src/org/lqs1848/crack/allatori/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

import javassist.ClassPool;
import javassist.CtClass;
import javassist.CtField;
import javassist.CtMethod;

public class Main {
Expand Down Expand Up @@ -78,6 +79,27 @@ public static void execute() throws Throwable {
CtClass cl = pool.makeClass(new java.io.ByteArrayInputStream(data));
CtMethod[] ms = cl.getDeclaredMethods();
boolean needRewriteFlag = false;

if(!cl.getName().startsWith("com.allatori.eclipse")) {
for (CtMethod fMethod : cl.getMethods()) {
if(!fMethod.isEmpty() && "String".equals(fMethod.getReturnType().getSimpleName())
&& cl.getName().equals(fMethod.getDeclaringClass().getName())
) {
String code = "if($_!=null && !$_.isEmpty()){"
+ "if($_.indexOf(\"www.allatori.com\")!=-1){"
+ "$_ = \"https://blog.lqs1848.top\";}"
//+ "if($_.indexOf(\"Obfuscation by\")!=-1){"
//+ "System.out.println($_);"
//+ "$_ = \"Obfuscation by\";}"
+ "if($_.indexOf(\"Allatori Obfuscator\")!=-1){"
+ "$_ = \"http://lqs1848.gitee.io\";}"
+ "; }";
fMethod.insertAfter(code);
needRewriteFlag = true;
}
}//for
}

for (CtMethod fMethod : ms) {
if (!fMethod.isEmpty() && fMethod.getName().equals("THIS_IS_DEMO_VERSION_NOT_FOR_COMMERCIAL_USE")) {
if (fMethod.getLongName().endsWith("(java.lang.String)")
Expand All @@ -86,7 +108,7 @@ public static void execute() throws Throwable {
needRewriteFlag = true;
} else if (fMethod.getLongName().endsWith("()")
&& "String".equals(fMethod.getReturnType().getSimpleName())) {
fMethod.insertAfter("if($_!=null&&!$_.isEmpty()&&$_.indexOf(\"Obfuscation by Allatori\")!=-1){\n" + copyrightStatement + "}");
fMethod.insertAfter("if($_!=null&&!$_.isEmpty()&&$_.indexOf(\"Obfuscation by\")!=-1){\n" + copyrightStatement + "}");
needRewriteFlag = true;
}
}
Expand Down

0 comments on commit df5f5bd

Please # to comment.