Recently, a friend said that there is a Java software is taken from a friend, because the network card address binding, do not modify the network card address can not be used, called me to see if there is no way to crack, before they are very little play these things, in the spirit of help, try the next, will have a note of the content.
1, the use of Jd-gui for anti-compilation, find the core check code, the B.class file separate from the jar package out, because the jar package compiled using encryption confusion, is not directly used, and the code is very difficult to read, but also can only be looked at;
2, will contain B.class jar package through the WinRAR decompression tool directly open, according to the package name path to find B.class and then directly delete the inside of the B.class;
3. Build a Java project with Eclipse and add the processed jar package to the project's reference path. And then according to the package of B.class to build a same package, and then build a B.java file in the package, the Jd-gui anti-compiled code to paste in, and then modify according to the prompts, if the luck is good, quickly modified, and compiled through, and can be used. I belong to the bad luck, encountered can not use. The following steps are available;
4, if good luck compile through, can normal use of the situation, in the jar package WinRAR open, find B.class is located in the packet, will compile the modified class file to compress into, put in the project can run;
5, bad luck, run up unexpectedly error, said the lack of methods, online search said Jad anti-compilation is incomplete, there are bugs, can not, only to see the Java bytecode,
6, put the separated b.class in the "d:\decode\" folder, and then call the cmd window, first switch to "d:\decode\" directory,
Then enter the command: JAVAP b.class > D:\DECODE\B1.JAVA,JAVAP will generate all the method attributes of B based on B.class, including public, private (mainly for comparison of missing methods);
Re-enter the command: Javap-verbose b.class > D:\DECODE\B2.JAVA,JAVAP will generate the corresponding Java bytecode according to B.class, first through the B1.java to find out the missing method of Jd-gui decompile,
Then find the corresponding method according to B2.java, and then see how the JVM is running, and restore the method.
This concludes .....
Some explanations for Java bytecode are attached:
http://blog.csdn.net/ygc87/article/details/12953421
http://blog.163.com/lihui_2000/blog/static/665969402012194530772/
http://tieba.baidu.com/p/1947057129
Java Code Anti-compilation notes