Author: http://www.cnblogs.com/open-coder/p/3763170.html

With some external tools, we could crack a Java program without any difficult. For some big Java program that obfuscates it’s byte code, we could even restore it’s source code with a little effort.

1) With JD-GUI, you could review java source code from .jar file:


In JD-GUI, we could search class (with full package name), review Uni-code constat string. But it is a older tool that could not catch the latest Java features.

2) Remapping obfuscated class in Jar file

Maybe you already notice that the package names and class names display like a, b, c. Because some one obfuscated this Jar file, the readable symbol replaced by confusion single characters. Such exported source code even will make eclipse confusion, and cause a lots of compiling error need to solve. One way to handle such problem is remapping those classes. You could do this with d2j-jar-remap.
d2j-jar-remap -f -c init.txt -o a-deobf.jar a.jar
init.txt is the configure that remap rules:
# rename class to some unique name!
c a/a/a/q/i=C1_i
c a/a/a/q/g=C2_g
c a/a/a/q/c=C3_c
c a/a/a/q/d=C4_d
c a/a/a/q/b=C5_b
c a/a/a/q/e=C6_e
Then, you open the new jar file with JD-GUI:
 
With such a remapping process, we could avoid some many compile errors in Eclipse, and save a lots of time for us. 

3) Export .java with some tools

a) JAD (Good at handling inner classes)

    jad -sjava example.class                                                                  # de-compile single file
    jad -o -r -sjava -dsrc tree/**/*.class                                                # de-compile a whole folder

b) JD-GUI (a bit old tool, some latest Java 7 features missing)

c) procyon (Java 7 required, latest java features provided)
   java -jar procyon-decompiler-0.5.24.jar AutoCloseableExample.class     # de-compile single file
   java -jar procyon-decompiler.jar -jar myJar.jar -o out                          # de-compile a whole jar

d) cfr (much latest tool, not so good as procyon but better than JAD and JD-GUI for some features)
   java -jar cfr_0_59.jar SwitchTest.class                                               # de-compile single file
   java -jar cfr_0_61.jar java7_jar.jar --outputdir D:/Java/tmp                 # de-compile a whole jar

A package with all tools included could be download from here.

4) Refrence

http://53873039oycg.iteye.com/blog/2015192
http://blog.csdn.net/fireofjava/article/details/8586799
http://blog.sina.com.cn/s/blog_437ff56b010166qb.html
https://code.google.com/p/dex2jar/wiki/DeObfuscateJarWithDexTool

How to Effectively crack .JAR Files?的更多相关文章

  1. jeesite部署到Tomcat后,无法访问,cannot be resolved in either web.xml or the jar files deployed with this application

    HTTP Status 500 - /WEB-INF/views/modules/sys/sysLogin.jsp (line: 3, column: 0) The absolute uri: htt ...

  2. 异常:The absolute uri: http://www.springframework.org/security/tags cannot be resolved in either web.xml or the jar files deployed with this application

    The absolute uri: http://www.springframework.org/security/tags cannot be resolved in either web.xml ...

  3. http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed wit

    异常:The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the j ...

  4. The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application问题解决方案参考

    错误信息:The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the ...

  5. maven jstl The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application

    maven jstl 报错 HTTP Status 500 – Internal Server Error Type Exception Report Message The absolute uri ...

  6. exception http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application

      http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed w ...

  7. The absolute uri: [http://java.sun.com/jsp/jstl/core] cannot be resolved in either web.xml or the jar files deployed with this application] with root cause异常处理及解释

    1.问题描述: 在web的jsp文件中想用jstl这个标准库,在运行的时候很自然的引用jar包如下: <dependency> <groupId>javax.servlet.j ...

  8. exception The absolute uri: [http://java.sun.com/jsp/jstl/core] cannot be resolved in either web.xml or the jar files deployed with this application

        1.情景展示 eclipse,运行web项目时,报错信息如下: The absolute uri: [http://java.sun.com/jsp/jstl/core] cannot be ...

  9. org.apache.jasper.JasperException: The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application

    编程中遇到:org.apache.jasper.JasperException: The absolute uri: http://java.sun.com/jsp/jstl/core cannot ...

随机推荐

  1. HTML颜色代码

    记录十种个人比较喜欢的颜色: #19CAAD   #8CC7B5  #A0EEE1  #BEE7E9  #BEEDC7 #D6D5B7  #D1BA74  #E6CEAC  #ECAD9E  #F46 ...

  2. bat中实现代码拷贝到指定目录后启动命令行并更改默认路径

      ### window书写shell脚本,实现判断指定文件是否存在,存在就删除,然后复制新文件到此目录 ``` if exist "G:\test\test2\1.txt" (d ...

  3. canvas的Chart图表插件

    今天写页面页面需求到柱状图标,今天介绍一下我所用的Chart.js图表插件 官网:http://www.bootcss.com/p/chart.js/         里面会有下载js文件和中文文档 ...

  4. redux小结

    1.创建reducers :保存初始化状态. 2.入口文件通过redux 中的 { createStore } 将 reducers保存为快照, 通过react-redux中的{ Provider } ...

  5. ArrayList的使用方法详解(转)

    1.什么是ArrayList    ArrayList就是传说中的动态数组,用MSDN中的说法,就是Array的复杂版本,它提供了如下一些好处: 动态的增加和减少元素 实现了ICollection和I ...

  6. 《一马当先 O2O创业真人秀》阿里云创客+项目提交报名中

    传统行业与互联网的相互融合,线上与线下的互通,正在掀起一股“互联网+”新风潮和创业热潮.支付宝钱包.快的打车.淘点点……这些耳熟能详的应用早已成为人们生活的一部分.而越来越多的“互联网+”创新项目,将 ...

  7. CSS/LESS tips and snippets

    如何style line-through? <style type="text/css"> span.inner { color: green; } span.oute ...

  8. 初看Mybatis 源码 (三) SQL是怎么执行的

    前面说到Java动态代理,Mybatis通过这种方式实现了我们通过getMapper方式得到的Dao接口,可以直接通过接口的没有实现的方法来执行sql. AuthUserDao mapper = se ...

  9. 使用NSURLConnection实现大文件断点下载

    使用NSURLConnection实现大文件断点下载 由于是实现大文件的断点下载,不是下载一般图片什么的.在设计这个类的时候本身就不会考虑把下载的文件缓存到内存中,而是直接写到文件系统. 要实现断点下 ...

  10. .Net深入体验与实践第一章

    什么是委托?委托和事件是什么关系? 我的理解是委托朋友,事件是一个事情比如,中午12点要吃饭了,咱家搞忘了!还在继续嗨皮,我的朋友会叫我与他一起吃饭. 什么事反射? 可以获取.Net中的每个类型(类, ...