Openfire 管理员密码查看

来源:互联网 发布:在哪儿玩网络创世纪 编辑:程序博客网 时间:2024/04/30 19:31
转自:http://blog.csdn.net/jwzhangjie/article/details/11920059

 

今天安装Openfire但是设置完毕后忘记密码了,然后查看资料,找到了解决方法

Openfire的密码加密是由 org.jivesoftware.util.Blowfish 实现的,不过需要加密需要获取Openfire的 passwordKey ,在安装的目录下面的openfire\embedded-db\openfire.script里面查找

然后在相同的文件里面找到

INSERT INTO OFUSER VALUES('admin',NULL,'63b8e73c0cbc612ec692196c6d8df0cf54da7c77f9c8752fc3bce938a4818a20','Administrator','jwzhangjie@163.com','001379898892206','0') //encryptedPassword

 

然后用以下Java代码就可以解密:

package openfire;    import org.jivesoftware.util.Blowfish;    public class Openfire {      static Blowfish blowfish = new Blowfish("xxxxxx");//<span style="font-family: Arial,Helvetica,sans-serif;">passwordKey</span>      public static void main(String[] args) {          System.out.println(blowfish.decryptString("xxxxxxxxxxxxxxxxxxxx")); // encryptedPassword      }  }


 

 

0 0
原创粉丝点击