import weblogic.security.internal.SerializedSystemIni;
import weblogic.security.internal.encryption.EncryptionService;
import weblogic.utils.encoders.BASE64Decoder;
import weblogic.utils.encoders.BASE64Encoder;
/**
* 需要包含 C:\bea\wlserver_10.3\server\lib\相关jar包!否则会抛出异常
*
* @author powerxsu
* @project testspring
* @date Oct 24, 2009
* @version 1.0
*/
public class CrackData {
public static void main(String[] args) {
byte[] salt, keys;
/**
* 找到weblogic对应domain下的
* user_projects\domains\base_domain\security\SerializedSystemIni.dat文件
* 把它拷贝到当前project的"security"目录下覆盖即可
* 这样就可以把config.xml中的加密的密码串拿出来进行解密处理了!^_^
*/
String path = SerializedSystemIni.getPath();
System.out.println(path);
salt = SerializedSystemIni.getSalt();
keys = SerializedSystemIni.getEncryptedSecretKey();
String data = "";
for (int i = 0; i < salt.length; i++) {
data += salt[i] + ",";
}
System.out.println("salt:" + data);
data = "";
for (int i = 0; i < keys.length; i++) {
data += keys[i] + ",";
}
System.out.println("Key:" + data);
// EncryptionService
// svr=SerializedSystemIni.getExistingEncryptionService();
EncryptionService svr = SerializedSystemIni.getEncryptionService();
System.out.println(svr);
System.out.println(svr.getAlgorithm());
if (args.length > 1) {
if (args[0].equals("encrypt")) {
byte[] edata = svr.encryptString(args[1]);
String s = (new BASE64Encoder()).encodeBuffer(edata);
System.out.println("Encode:" + s);
}
if (args[0].equals("decrypt")) {
try {
byte[] edata = (new BASE64Decoder()).decodeBuffer(args[1]);
String txt = svr.decryptString(edata);
System.out.println("Decode:" + txt);
} catch (Exception ex) {
ex.printStackTrace();
}
}
}
// decrypt awF/L0fQdXgGs2JoKePo5Q==
// 模拟加密处理-------!
String _pass = "lbxhis";
byte[] edata2 = svr.encryptString(_pass);
String s = (new BASE64Encoder()).encodeBuffer(edata2);
System.out.println("Encode:" + s);
// 模拟解密处理--------!
try {
String pass = "awF/L0fQdXgGs2JoKePo5Q==";
byte[] edata = (new BASE64Decoder()).decodeBuffer(pass);
String txt = svr.decryptString(edata);
System.out.println("Decode:" + txt);
} catch (Exception ex) {
System.err.println("/**\n" + " * 找到weblogic对应domain下的\n"
+ " * user_projects\\domains\\base_domain\\security\\SerializedSystemIni.dat文件\n"
+ " * 把它拷贝到当前project的\"security\"目录下覆盖即可\n" + " * 这样就可以把config.xml中的加密的密码串拿出来进行解密处理了!^_^\n"
+ " */" + "\n\n 或者您输入的待解密的字符串不正确!");
}
}
}
详细解决方案
weblogic9/weblogic10 DES3解密步骤详解
热度:929 发布时间:2012-09-03 09:48:39.0
相关解决方案
- weblogic10,sessionid丢失有关问题
- weblogic10 如何部署web项目
- weblogic10.3.2有IP连接数限制吗?该如何处理
- weblogic9.0ji qun解决办法
- weblogic9.0ji qun,该如何处理
- weblogic9.1如何配置jms 多谢了
- weblogic10.3 关于jdk的改换
- weblogic9.2怎样在console页面查看日志解决方案
- 求助啦!weblogic9.1该如何配置呀!!
- JBuilder2006+WebLogic9.0问题
- tomcat 移置 weblogic9.2上常见错误1
- weblogic9 eclipse 远道调试监听
- weblogic10.3配备SQLServer 连接池
- 转 weblogic10.3 org.hibernate.hql.ast.HqlToken报错有关问题
- weblogic9.2.3.0的有关问题处理办法
- 装配应用服务器BEA weblogic9.2
- BEA weblogic9.2在myeclipse8.5的配备使用
- AIX环境上JDK1.5 + WebLogic9.2.2安装配置手册
- Weblogic10 & Myeclipse 配备
- Weblogic10 与 Websphere MQ7集验方案[1]
- weblogic9.2配备虚拟路径
- weblogic8 weblogic9 端口改动
- [转]Weblogic9、十、10R3版本线程池手动调节
- weblogic10.3 org.hibernate.hql.ast.HqlToken报错有关问题
- weblogic9/weblogic10 DES3解密步骤详解
- Windows 上整合 weblogic10 jsf1.2 hibernate3
- Weblogic10.3项目部署出错的一些常见有关问题分析
- weblogic10.3中java.lang.OutOfMemoryError错误处理
- weblogic10.3+sitemesh全方位支配
- weblogic10 jar摩擦的解决方案