kettle 数据库密码解密
1.找出加密后的密码:C:\Users\.kettle\shared.xml文件中找到加密的密码;2.java代码解密首先添加kettle相关mave依赖<!-- 缺少的jar包自行添加 --><dependency><groupId>pentaho-kettle</groupId><artifactId>kettle-core</
·
1.找出加密后的密码:C:\Users\.kettle\shared.xml文件中找到加密的密码;
2.java代码解密
首先添加kettle相关maven依赖
<!-- 缺少的jar包自行添加 -->
<dependency>
<groupId>pentaho-kettle</groupId>
<artifactId>kettle-core</artifactId>
<version>8.1.0.0-365</version>
</dependency>
<dependency>
<groupId>pentaho-kettle</groupId>
<artifactId>kettle-engine</artifactId>
<version>8.1.0.0-365</version>
</dependency>
<dependency>
<groupId>pentaho</groupId>
<artifactId>metastore</artifactId>
<version>8.1.0.0-365</version>
</dependency>
加密代码:
import org.pentaho.di.core.KettleEnvironment;
import org.pentaho.di.core.encryption.Encr;
import org.pentaho.di.core.exception.KettleException;
/**
* 破解kettle加密后的密码
*/
public class CrackPwd {
public static void main(String[] args) {
try {
KettleEnvironment.init();
String pwd = "Encrypted 2be98afc86aa7f2e4cb79f62886caf782";
System.out.println("解码前密码:" + pwd);
String decryptPassword = Encr.decryptPassword(pwd);
System.out.println("解码后密码:" + decryptPassword);
} catch (KettleException e) {
e.printStackTrace();
}
}
}
控制台打印:
更多推荐
已为社区贡献2条内容
所有评论(0)