Whatsapp相关(四)
书接上文:
1: 编写脚本
首先我们先通过SQLiteDatabase的insert方法.来打印相关的操作.
Java.perform(function() { console.log("insert 0: 可以发消息了") var database = Java.use('android.database.sqlite.SQLiteDatabase'); database.insert.overload("java.lang.String","java.lang.String","android.content.ContentValues").implementation = function (x,y,z) { console.log("insert 1:",x) console.log("insert 2:",z.toString()) return this.insert(x,y,z); } });
2: 测试
-
创建群聊:
输出结果如下:
insert 1: group_participant_user insert 2: pending=1 rank=0 user_jid_row_id=1 group_jid_row_id=66 insert 1: group_participant_user insert 2: pending=0 rank=2 user_jid_row_id=8 group_jid_row_id=67 insert 1: group_participant_user insert 2: pending=0 rank=0 user_jid_row_id=1 group_jid_row_id=67 insert 1: group_notification_version insert 2: announcement_version=0 participant_version=1706493159452226 group_jid_row_id=67 subject_timestamp=0 insert 1: queue insert 2: item=rO0ABXNyAChjb20ud2hhdHNhcHAuam9icXVldWUuam9iLlN5bmNEZXZpY2VzSm9iAAAAAAAAAAECAAJJAAhzeW5jVHlwZVsABGppZHN0ABNbTGphdmEvbGFuZy9TdHJpbmc7eHIAH29yZy53aGlzcGVyc3lzdGVtcy5qb2JxdWV1ZS5Kb2IdIV21tAZmuwIAAUwACnBhcmFtZXRlcnN0ACtMb3JnL3doaXNwZXJzeXN0ZW1zL2pvYnF1ZXVlL0pvYlBhcmFtZXRlcnM7eHBzcgApb3JnLndoaXNwZXJzeXN0ZW1zLmpvYnF1ZXVlLkpvYlBhcmFtZXRlcnOwR21DYM312gIABloADGlzUGVyc2lzdGVudEkACnJldHJ5Q291bnRaAAh3YWtlTG9ja0oAD3dha2VMb2NrVGltZW91dEwAB2dyb3VwSWR0ABJMamF2YS9sYW5nL1N0cmluZztMAAxyZXF1aXJlbWVudHN0ABBMamF2YS91dGlsL0xpc3Q7eHABAAAAZAAAAAAAAAAAAHQADlN5bmNEZXZpY2VzSm9ic3IAFGphdmEudXRpbC5MaW5rZWRMaXN0DClTXUpgiCIDAAB4cHcEAAAAAnNyADtjb20ud2hhdHNhcHAuam9icXVldWUucmVxdWlyZW1lbnQuQ2hhdENvbm5lY3Rpb25SZXF1aXJlbWVudAAAAAAAAAABAgAAeHBzcgBHY29tLndoYXRzYXBwLmpvYnF1ZXVlLnJlcXVpcmVtZW50Lk9mZmxpbmVQcm9jZXNzaW5nQ29tcGxldGVkUmVxdWlyZW1lbnQAAAAAAAAAAQIAAHhweAAAAAJ1cgATW0xqYXZhLmxhbmcuU3RyaW5nO63SVufpHXtHAgAAeHAAAAACdAAcODYxODEwMzg1MDA3M0BzLndoYXRzYXBwLm5ldHQAHDg2MTU4OTA2ODUxNDNAcy53aGF0c2FwcC5uZXQ= encrypted=false
-
新建社群:
输出结果如下:
insert 1: subgroup_info insert 2: subject=测试 subject_ts=1706493930000 subgroup_raw_jid=120363227696492474@g.us group_type=3 insert 1: group_relationship insert 2: subgroup_raw_id=120363227696492474@g.us parent_raw_jid=120363227430938911@g.us insert 1: group_participant_user insert 2: pending=0 rank=2 user_jid_row_id=22 group_jid_row_id=68 insert 1: group_notification_version insert 2: announcement_version=0 participant_version=1706493930808315 group_jid_row_id=68 subject_timestamp=0 insert 1: community_chat insert 2: join_ts=0 closed=false last_activity_seen_ts=0 last_activity_ts=1706493931 chat_row_id=35 insert 1: group_participant_user insert 2: pending=0 rank=2 user_jid_row_id=8 group_jid_row_id=69 insert 1: group_notification_version insert 2: announcement_version=0 participant_version=1706493930808444 group_jid_row_id=69 subject_timestamp=0 insert 1: queue insert 2: item=rO0ABXNyAChjb20ud2hhdHNhcHAuam9icXVldWUuam9iLlN5bmNEZXZpY2VzSm9iAAAAAAAAAAECAAJJAAhzeW5jVHlwZVsABGppZHN0ABNbTGphdmEvbGFuZy9TdHJpbmc7eHIAH29yZy53aGlzcGVyc3lzdGVtcy5qb2JxdWV1ZS5Kb2IdIV21tAZmuwIAAUwACnBhcmFtZXRlcnN0ACtMb3JnL3doaXNwZXJzeXN0ZW1zL2pvYnF1ZXVlL0pvYlBhcmFtZXRlcnM7eHBzcgApb3JnLndoaXNwZXJzeXN0ZW1zLmpvYnF1ZXVlLkpvYlBhcmFtZXRlcnOwR21DYM312gIABloADGlzUGVyc2lzdGVudEkACnJldHJ5Q291bnRaAAh3YWtlTG9ja0oAD3dha2VMb2NrVGltZW91dEwAB2dyb3VwSWR0ABJMamF2YS9sYW5nL1N0cmluZztMAAxyZXF1aXJlbWVudHN0ABBMamF2YS91dGlsL0xpc3Q7eHABAAAAZAAAAAAAAAAAAHQADlN5bmNEZXZpY2VzSm9ic3IAFGphdmEudXRpbC5MaW5rZWRMaXN0DClTXUpgiCIDAAB4cHcEAAAAAnNyADtjb20ud2hhdHNhcHAuam9icXVldWUucmVxdWlyZW1lbnQuQ2hhdENvbm5lY3Rpb25SZXF1aXJlbWVudAAAAAAAAAABAgAAeHBzcgBHY29tLndoYXRzYXBwLmpvYnF1ZXVlLnJlcXVpcmVtZW50Lk9mZmxpbmVQcm9jZXNzaW5nQ29tcGxldGVkUmVxdWlyZW1lbnQAAAAAAAAAAQIAAHhweAAAAAJ1cgATW0xqYXZhLmxhbmcuU3RyaW5nO63SVufpHXtHAgAAeHAAAAABdAAcODYxODEwMzg1MDA3M0BzLndoYXRzYXBwLm5ldA== encrypted=false insert 1: community_chat insert 2: join_ts=0 closed=true last_activity_seen_ts=0 last_activity_ts=0 chat_row_id=36 insert 1: group_participant_user insert 2: pending=0 rank=2 user_jid_row_id=8 group_jid_row_id=69
新建社群名称为:测试 . subgroup_raw_jid 社群的jid.
添加现有群组到新建的社群:
insert 1: subgroup_info insert 2: subject=tests123445566677 subject_ts=0 subgroup_raw_jid=120363220579189479@g.us group_type=2 insert 1: group_relationship insert 2: subgroup_raw_id=120363220579189479@g.us parent_raw_jid=120363227430938911@g.us insert 1: group_participant_user insert 2: pending=0 rank=2 user_jid_row_id=8 group_jid_row_id=69
subject=tests123445566677 现有群组名称.