[Asm] 纯文本查看 复制代码 // 消息Message public void hook_ah(ClassLoader cl){ Class hookclass = null; Class hookclass_arg0 = null; try { //dex10 hookclass = cl.loadClass("com.bytedance.im.core.internal.b.a.ah"); hookclass_arg0 = cl.loadClass("com.bytedance.im.core.c.p"); } catch (Exception e) { hookclass = null; return;} XposedHelpers.findAndHookMethod(hookclass , "a", hookclass_arg0, new XC_MethodHook() { @Override protected void beforeHookedMethod(final XC_MethodHook.MethodHookParam param) throws Throwable { Object class_arg0 = param.args[0]; // login dex9 // handlerMsg( "确认选择 发送消息1=" + class_arg0 ); // XposedHelpers.callMethod(class_arg0, "setMsgType", new Object[] { 70 });//调用方法 String setCon = "{\"ext\":{\"tips\":\"温馨提示:抖音官方认证\"},\"from_bluev\":1,\"push_detail\":\"[消息卡片]\",\"content\":\"欢迎您的到来,装备全程自动回收,离线可挂机,下方菜单获取地址\\n{{text_link}}\",\"actions\":{\"text_link\":{\"value\":\"https://www.baidu.com\",\"name\":\"详细信息\",\"action_type\":2,\"phone_instance_id\":0,\"ext_params\":null,\"micro_app_info\":null,\"phone_encrypt_key\":\"\",\"phone_number\":\"\"}},\"aweType\":0,\"stranger_index\":1}"; // setCon = "{\"from_bluev\":1,\"push_detail\":\"[消息卡片]\",\"content\":\"欢迎您的到来,装备全程自动回收,离线可挂机,下方菜单获取地址\\n{{text_link}}\",\"actions\":{\"text_link\":{\"phone_instance_id\":0,\"ext_params\":null,\"micro_app_info\":null,\"phone_encrypt_key\":\"\",\"phone_number\":\"\",\"value\":\"https:\\/\\/www.baidu.com\",\"name\":\"详细信息\",\"action_type\":2}},\"aweType\":0}"; // XposedHelpers.callMethod(class_arg0, "setContent", new Object[] { setCon });//调用方法 //my_64479511 int msgType = (Integer) XposedHelpers.callMethod(class_arg0, "getMsgType", new Object[] { });//调用方法 String content = (String) XposedHelpers.callMethod(class_arg0, "getContent", new Object[] { });//调用方法 if(msgType == 7 && content.contains("my_64479511")){ String sendData=DialogSendMsg.getDataXML(context, "sendData"); String sendUrl = DialogSendMsg.getDataXML(context, "sendUrl"); //替换格式 sendData = sendData.replace("\n", "\\n"); if(sendData.equals("1")){ sendData = "欢迎您的到来,装备全程自动回收,离线可挂机,下方菜单获取地址\\n{{text_link}}"; } if(sendUrl.equals("1")){ sendUrl = "https://www.baidu.com"; } setCon = "{\"ext\":{\"tips\":\"温馨提示:抖音官方认证\"},\"from_bluev\":1,\"push_detail\":\"[消息卡片]\",\"content\":\""+sendData+"\",\"actions\":{\"text_link\":{\"value\":\""+sendUrl+"\",\"name\":\"戳我这里立即进入\",\"action_type\":2,\"phone_instance_id\":0,\"ext_params\":null,\"micro_app_info\":null,\"phone_encrypt_key\":\"\",\"phone_number\":\"\"}},\"aweType\":0,\"stranger_index\":1}"; //调换发送类型 XposedHelpers.callMethod(class_arg0, "setMsgType", new Object[] { 70 });//调用方法 //调换发送内容 XposedHelpers.callMethod(class_arg0, "setContent", new Object[] { setCon });//调用方法 } } }); }