安卓微信RPC发送文字+图片

安卓微信RPC发送文字+图片

定位发送数据包函数

1
2
Log.i("MicroMsg.MMKernel", "Kernel not null, has initialized.");
// m50.a0.d()

image-20250802222920165

1
Assert.assertTrue("worker thread has not been set", this.e != null);

image-20250802223110520

sendTextMsg

1
doScene /cgi-bin/micromsg-bin/newsendmsg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
public int doScene(g g0, ad0.n n0) {
List list0;
Class class0 = k0.class;
this.d = n0;
b c$b0 = new b();
c$b0.a = new w54();
c$b0.b = new x54();
c$b0.c = "/cgi-bin/micromsg-bin/newsendmsg";
c$b0.d = 0x20A;
c$b0.e = 0xED;
c$b0.f = 1000000237;
c c0 = c$b0.a();
this.e = c0;
w54 w540 = (w54)c0.a.a;
e4 e40 = this.o;
if(e40 == null) {
list0 = ((f4)((k0)a0.q(class0)).SI()).WD0(this.g);
}
else {
if(e40.getStatus() != 5) {
Log.w("MicroMsg.NetSceneSendMsg", "msg:%d status:%d should not be resend !", new Object[]{this.o.getMsgId(), this.o.getStatus()});
}

this.o.c(1);
((f4)((k0)a0.q(class0)).SI()).FE0(this.f, this.o);
list0 = new ArrayList();
((ArrayList)list0).add(this.o);
this.o = null;
}

if(list0.size() == 0) {
Log.w("MicroMsg.NetSceneSendMsg", "no sending message");
return -2;
}

((LinkedList)this.h).clear();
for(int v1 = 0; v1 < list0.size(); ++v1) {
e4 e41 = (e4)list0.get(v1);
if(e41.z2() == 1) {
i23 i230 = new i23();
l14 l140 = new l14();
l140.d = e41.u();
l140.e = true;
i230.d = l140;
i230.g = (int)(e41.getCreateTime() / 1000L);
i230.f = e41.getType();
i230.e = e41.getContent();
i230.h = r0.a(s0.r(), e41.getCreateTime()).hashCode();
if(((ba2.s0)j.c(ba2.s0.class)).xr(e41.u())) {
i230.j = ((k0)a0.q(class0)).wl().c4(e41.u());
}

if(this.p == null) {
this.p = ((x0)j.c(x0.class)).by0();
}

Log.i("MicroMsg.NetSceneSendMsg", "using message source assembler %s", new Object[]{this.p});
this.p.e(i230, e41);
Log.i("MicroMsg.NetSceneSendMsg", "reqCmd.MsgSource:%s", new Object[]{i230.i});
w540.e.add(i230);
w540.d = w540.e.size();
((LinkedList)this.h).add(e41);
Log.i("MicroMsg.NetSceneSendMsg", "Req MsgSource %s", new Object[]{i230.i});
}
}

int v2 = this.dispatch(g0, this.e, this);
if(v2 < 0) {
Log.i("MicroMsg.NetSceneSendMsg", "mark all failed. do scene %d", new Object[]{v2});
for(int v = 0; v < ((LinkedList)this.h).size(); ++v) {
this.j1(v);
}
}

return v2;
}

1
2
3
4
5
6
function sendTextMsg(talker, content) {
var a0 = Java.use('m50.a0')
var TextMsgModle = Java.use("be0.t");
var text_msg = TextMsgModle.$new(talker, content, 1, 0, null)
a0.d().f(text_msg);
}

sendImage

1
Log.e("MicroMsg.ChattingUI.SendImgComponent", "send image list is null or nil");
1
long v15 = u0.SD0().b(3, t40.d.n(), s, s9, v14, z4, 0x7F080365); 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// com.tencent.mm.modelimage.e0.b(int, java.lang.String, java.lang.String, java.lang.String, int, boolean, int) : long

public long b(int v, String s, String s1, String s2, int v1, boolean z, int v2) {
boolean z1 = s0.a(s2, s1, z);
f c0$f0 = c0.a(be0.c0.e.e);
c0$f0.i = v;
c0$f0.i(s);
c0$f0.j(s1);
c0$f0.j = s2;
c0$f0.k = z1;
c0$f0.l = this;
c0$f0.n = v1;
c0$f0.m = this.g;
c0$f0.p = true;
c0$f0.o = v2;
c0$f0.h = 10;
m0 m00 = (m0)c0$f0.a().a;
this.g(m00);
return m00.getMsg().getMsgId();
}


image-20250803012603719

1
2
3
4
5
6
7
function sendImage(talker, image_path) {
var s0 = Java.use('qc0.s0')
var current_wxid = s0.r()
var u0 = Java.use('com.tencent.mm.modelimage.u0')
u0.SD0().b(3, current_wxid, talker, image_path, 0, true, 0)

}

其他

收藏列表中转发小程序

1
2
//8.0.37
Log.i("MicroMsg.FavAppBrandLogic", "buildAppBrandMsgParamsForIntent image path:%s", new Object[]{s});

image-20250812123326948

1
Log.i("MicroMsg.FavoriteIndexUI", "after filter, nothing")
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
if(list0 != null && !list0.isEmpty()) {
if(Util.isNullOrNil(s1)) {
return;
}

boolean z = y1.T5(s1);
f0 f00 = new f0();
LinkedList linkedList0 = new LinkedList();
Iterator iterator0 = list0.iterator();
while(true) {
label_7:
int v = 0;
if(!iterator0.hasNext()) {
break;
}

Object object0 = iterator0.next();
a0 a00 = (a0)object0;
if(f00.a(a00)) { //<-----------------
goto label_7;
}

b0.d(a00.field_localId, 1, 0, this.S);
linkedList0.add(a00);
xd1.i0.b i0$b0 = z ? xd1.i0.b.f : xd1.i0.b.e;
xd1.i0.c i0$c0 = xd1.i0.c.e;
if(z) {
v = o0.n(s1);
}

i0.c(i0$b0, a00, i0$c0, v);
}

if(linkedList0.isEmpty()) {
Log.i("MicroMsg.FavoriteIndexUI", "after filter, nothing");
kq3.j.T(this.getApplicationContext(), "所选内容不可转发"); // Bookmarked on 2025-08-12 12:47:49 CST
return;
}
// ...
}

image-20250812124958238

聊天界面强制转发

1
2
3
4
5
6
7
8
9
if(!y0.g(false, list0, s, o0)) {
kq3.j.A(context0, "你选择的消息中,语音、动画表情、名片、游戏、支付消息、卡券、特殊消息不能转发给朋友,是否继续?", "", "发送", "取消", new com.tencent.mm.ui.chatting.b1.a(list0, o0, context0, z, s, v), new com.tencent.mm.ui.chatting.b1.b(o0));
return true;
}

Class class0 = j.class;
if(list0.isEmpty()) {
Log.w("MicroMsg.ChattingEditModeLogic", "check contain invalid send to friend msg error, select item empty");
}