Openfire 管理员密码查看

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

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

INSERT INTO OFPROPERTY VALUES('passwordKey','xxxxxxxxxxxx') //passwordKey
然后在相同的文件里面找到

INSERT INTO OFUSER VALUES('admin',NULL,'63b8e73c0cbc612ec692196c6d8df0cf54da7c77f9c8752fc3bce938a4818a20','Administrator','[email protected]','001379898892206','0') //encryptedPassword
然后用以下Java代码就可以解密:

package openfire;

import org.jivesoftware.util.Blowfish;

public class Openfire {
	static Blowfish blowfish = new Blowfish("xxxxxx");//passwordKey
	public static void main(String[] args) {
		System.out.println(blowfish.decryptString("xxxxxxxxxxxxxxxxxxxx")); // encryptedPassword
	}
}

依赖库: http://download.csdn.net/download/jwzhangjie/6305515

你可能感兴趣的:(openfire)