openfire密码破解和指定用户

来源:互联网 发布:夏普2048设置网络打印 编辑:程序博客网 时间:2024/06/06 20:17


一、密码破解

2.1 查询加密后的密码

ofuser表中查找加密码后密码。select * from ofuser where username='admin';


 

2.2 查询密匙

从表ofporperty查询加密密匙。select propValue from ofproperty where name = 'passwordKey';

 

 

2.3 解密程序

导入openfire.jar包,写程序解密。

 

package Openfire.password;

 import org.jivesoftware.util.Blowfish;

 public class Password {

    //!static Blowfish blowfish = new Blowfish("8S0OCwAmV50YduF"); //passwordKey

static Blowfish blowfish = new Blowfish("yW1SKpk09UDoCOU");//passwordKey

 

    public static void main(String[]args) {

    

     //String strSalt = "eIY8UacW0OoLBFl2SxRE9pq542/2RkQ9";

     //System.out.println(blowfish.decryptString("3feb97b22a7af130575e7ecdbf3fbbaa6db269196cc56d2c795b60a9683dcc06")); //encryptedPassword

        

     String strSalt = "eIY8UacW0OoLBFl2SxRE9pq542/2RkQ9";    

        System.out.println(blowfish.decryptString("f96cbd89345459d28409e06b1dc365fb5cdefca5f5dd5d4e31950c066ff043d9"));//encryptedPassword

    }

}

 

二、指定用户

如果中间改变数据,而这个数据有其他Openfire程序用过,这时需要对新加入Openfire程序指定管理帐户。

需要对配置文件openfire.xml增加

<admin>  

    <authorizedUsernames>userName</authorizedUsernames>  

</admin>  

并设置:<setup>true</setup>false。然后重新用浏览器登陆即可。

 

阅读全文
0 0
原创粉丝点击