Git Product home page Git Product logo

wechatferry's People

Contributors

danbai225 avatar hcaihao avatar kengrofork avatar lich0821 avatar lzb112 avatar rehiy avatar stkevintan avatar supermoonie avatar xinggq1 avatar yang0961 avatar yitiaoaishuijiaodexianyu avatar zsjinwei avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wechatferry's Issues

[🐛BUG] wcfhttp 里面的 post text 接口,@某人发送消息,是不是有 bug?

描述这个 bug
对 bug 作一个清晰简明的描述,包括:

  • post text 接口,@某人 发送消息,对方收到消息,不显示有人 @ 我
    这是我 post 的数据
    {
    "msg": "@wxid_xxxx22 你好呀 这个 at 到底怎么用的 ",
    "receiver": "xxxx11111@chatroom",
    "aters": "@wxid_xxxx22"
    }

    返回的 message 也是“成功“,但是在手机上看到的消息不提示,有人@我,还有显示的就是纯文本,正常应该显示昵称的

使用环境(请补全下列信息):

  • 操作系统:【Windows 10】
  • 操作系统版本:【64 位】
  • Python 版本:【3.10.11 64 位 】
  • wcfhttp 和 wcferry 版本:【39.0.2.0】

[🐛BUG] 私聊场景缺少接收者ID

描述这个 bug
void DispatchMsg(DWORD reg)
{
WxMsg_t wxMsg;

wxMsg.id      = GET_QWORD(reg + g_WxCalls.recvMsg.msgId);
wxMsg.type    = GET_DWORD(reg + g_WxCalls.recvMsg.type);
wxMsg.is_self = GET_DWORD(reg + g_WxCalls.recvMsg.isSelf);
wxMsg.ts      = GET_DWORD(reg + g_WxCalls.recvMsg.ts);
wxMsg.content = GetStringByWstrAddr(reg + g_WxCalls.recvMsg.content);
wxMsg.sign    = GetStringByStrAddr(reg + g_WxCalls.recvMsg.sign);
wxMsg.xml     = GetStringByStrAddr(reg + g_WxCalls.recvMsg.msgXml);

string roomid = GetStringByWstrAddr(reg + g_WxCalls.recvMsg.roomId);
if (roomid.find("@chatroom") != string::npos) { // 群 ID 的格式为 xxxxxxxxxxx@chatroom
    wxMsg.is_group = true;
    wxMsg.roomid   = roomid;
    if (wxMsg.is_self) {
        wxMsg.sender = GetSelfWxid();
    } else {
        wxMsg.sender = GetStringByStrAddr(reg + g_WxCalls.recvMsg.wxid);
    }
} else {
    wxMsg.is_group = false;
     ** 在此处是私聊场景 **
    if (wxMsg.is_self) {
         ** 假设我是A,与B私聊,发送者是我A,则本条消息丢失了接收者B的信息,只知道是我A发出的,而不知道是我发给谁的 **
         ** 因为B的信息存储在0x48偏移也就是roomid中,也就是缺少了这句wxMsg.roomid   = roomid; **
         ** 也可以考虑新增一个字段来表示接收者 wxMsg.receiver= roomid; **
        wxMsg.sender = GetSelfWxid();  
    } else {
        wxMsg.sender = roomid;
    }
}

...
}

[🐛BUG] 无法正常读取到别人发送消息

描述这个 bug
对 bug 作一个清晰简明的描述,包括:
使用python下面的demo.py的方式来运行时,出现下面的错误,无法正常读取到别人发送消息。但主动发送(wcf.send_text)是正常的。
Traceback (most recent call last):
File "D:\111\wechatBot.py", line 57, in process_msg
msg = wcf.get_msg()
File "D:\Anaconda3\envs\test\lib\site-packages\wcferry\client.py", line 264, in get_msg
return self.msgQ.get(block, timeout=1)
File "D:\Anaconda3\envs\test\lib\queue.py", line 179, in get
raise Empty
_queue.Empty
环境:Python 3.9.16,Windows10 x64

[🐛BUG] 使用/text接口私聊企微用户时会发送失败

使用/text接口私聊企微用户时会发送失败

  • 操作系统:Windows Server 2006
  • 操作系统版本:64 位
  • Python 版本:3.10.11

image

红色圈起、处于loading状态的这条信息使用/text发送的,其他都是通过微信客户端和企业微信客户端发送的。

感謝,能用

項目能使用,
由於我個人不熟悉PY,所以根據幾個不同的demo拼湊起來使用,PY把消息轉發到服務端然後再根據結果執行回復。
不過希望能增加下PY封裝的SDK說明文檔。

[🐛BUG] 当微信昵称超过5个字的时候,调用user-info接口报错

描述这个 bug
自己多次测试发现当微信昵称在5个字(包括5个字),调用user-info接口正常。超过5个字就会报错。用的wcfHttp最新版本,swagger上测试的。

使用环境(请补全下列信息):

  • 操作系统:Windows11
  • 操作系统版本:64 位
  • Python 版本:3.11

屏幕截图
image

[💡SUG] 增加接收群邀请API

描述你希望的解决方案
WX20230821-111840
找到调用接受群邀请api地址和入参

其他
请问如何找到接受群邀请api地址和入参

[🐛BUG] Python 客户端 Demo 输出 Call FUNC_IS_LOGIN failed: Timed out

描述这个 bug

  • 启动微信客户端并登录后,控制台持续输出 Call FUNC_IS_LOGIN failed: Timed out
  • 安装后第一次启动就出现!
  • 重启微信后能否解决?(使用任务管理器,杀掉微信进程) 否!
  • 直接运行 最新发布 里的 cpp.exe 是否正常? 否!运行 exe 后 log 如下
[2023-03-05 23:41:39.162] [debug] [WCF] [log.cpp::26::InitLogger] InitLogger with debug level
[2023-03-05 23:41:39.163] [debug] [WCF] [spy.cpp::24::InitSpy] WeChat version: 3.8.1.26
[2023-03-05 23:41:39.163] [error] [WCF] [spy.cpp::26::InitSpy] 不支持当前版本
[2023-03-05 23:41:39.163] [info] [WCF] [sdk.cpp::76::WxInitSDK] WxInitSDK done.
[2023-03-05 23:42:08.840] [info] [WCF] [sdk.cpp::123::WxDestroySDK] WxDestroySDK done.
[2023-03-05 23:42:12.984] [debug] [WCF] [log.cpp::26::InitLogger] InitLogger with debug level
[2023-03-05 23:42:12.985] [debug] [WCF] [spy.cpp::24::InitSpy] WeChat version: 3.8.1.26
[2023-03-05 23:42:12.985] [error] [WCF] [spy.cpp::26::InitSpy] 不支持当前版本
[2023-03-05 23:42:12.985] [info] [WCF] [sdk.cpp::76::WxInitSDK] WxInitSDK done.
[2023-03-05 23:42:26.616] [info] [WCF] [sdk.cpp::123::WxDestroySDK] WxDestroySDK done.

使用环境(请补全下列信息):

  • 操作系统:
    版本 Windows 11 专业版
    版本 22H2
    安装日期 ‎2022/‎9/‎22
    操作系统版本 22621.1265
    体验 Windows Feature Experience Pack 1000.22638.1000.0

  • 操作系统版本:【64 位】

  • Python 版本:【3.11.0 64 位】

执行 Demo 并终止截图
image

[🐛BUG] 消息转发失败 httpCode 201

描述这个 bug
对 bug 作一个清晰简明的描述,包括:

  • 消息转发失败
  • 但是post请求还是能打印body参数

使用环境(请补全下列信息):

  • 操作系统:win10
  • 操作系统版本:x64
  • Python 版本:3.11.3

屏幕截图
添加屏幕截图以帮助解释您的问题。(可选)
图片

没有获取群列表功能 关联不上

你希望添加的功能是否与某个问题相关?
关于这个问题的简洁清晰的描述,例如,当 [...] 时,我总是很沮丧。

描述你希望的解决方案
关于解决方案的简洁清晰的描述。

描述你考虑的替代方案
关于你考虑的,能实现这个功能的其他替代方案的简洁清晰的描述。

其他
你可以添加其他任何的资料、链接或者屏幕截图,以帮助我们理解这个新功能。

[💡SUG]希望作者可以增加拦截pc发消息的功能

我的应用场景:我在微信群中通过 WeChatRobot 接入了 stable-diffusion-webui 共大家玩耍文生图,然而我自己想在pc端微信向群里发送文字时并不能被 WeChatRobot 拦截到,经在群里和作者沟通后,明白了还要自己开发拦截pc发消息的功能,但本人试了一天后始终无法解决,希望作者有时间可以加上此功能!

[💡SUG] 希望增加ws client支持

你希望添加的功能是否与某个问题相关?
目前我看到的是启动的server,希望可以支持启动websocket client

描述你希望的解决方案
传入ip和port 自动连接 websocket 断线重连

描述你考虑的替代方案

其他

[💡SUG]希望作者可以添加屏蔽某些群聊以及公众号消息的功能

今天发现一个问题,控制台显示接收了公众号的推送消息后,群聊的消息被吞掉了,并没有打印出来,继续观察,出现了两次这样的问题,群成员在发送消息的瞬间恰好接收到了公众号的消息,造成了该群成员的消息被吞掉了!
希望作者可以增加功能:
1、屏蔽指定群聊消息、屏蔽指定公众号信息
2、踢除指定群成员(一些群成员发送广告或者hs内容)

[🐛BUG] pyauto运行报错

2023-10-08 14:06:23,316 开始初始化...
Exception ignored in: <function Wcf.del at 0x000000000355EC10>
Traceback (most recent call last):
File "D:\ProgramData\Anaconda3\envs\paddle_env\lib\site-packages\wcferry\client.py", line 111, in del
self.cleanup()
File "D:\ProgramData\Anaconda3\envs\paddle_env\lib\site-packages\wcferry\client.py", line 115, in cleanup
if not self._is_running:
AttributeError: 'WcfV2' object has no attribute '_is_running'
Traceback (most recent call last):
File "f:/stockstar/project/python/WeChatFerry-master/clients/pyauto/demo.py", line 79, in
main()
File "f:/stockstar/project/python/WeChatFerry-master/clients/pyauto/demo.py", line 14, in main
receiver = Register()
File "f:\stockstar\project\python\WeChatFerry-master\clients\pyauto\wcfauto\auto_res\bot.py", line 18, in init
self._wcf = Wcf(debug=debug, **kwargs)
TypeError: init() missing 1 required positional argument: 'host'

[🐛启动错误] 启动时提示 Stream removed 错误

描述这个 bug
启动时提示 Stream removed 错误

使用环境(请补全下列信息):

  • 操作系统: Windows 7
  • 操作系统版本: 64 位
  • Python 版本 3.7.9
  • 微信 3.7.0.30
    崩溃信息
    C:\Users\min\Documents\code\python\WeChatRobot-master>C:\Python\Python37_32\pyth
    on.exe -V
    Python 3.7.9

C:\Users\min\Documents\code\python\WeChatRobot-master>C:\Python\Python37_32\pyth
on.exe main.py
Traceback (most recent call last):
File "main.py", line 51, in
main()
File "main.py", line 26, in main
wcf = Wcf()
File "C:\Python\Python37_32\lib\site-packages\wcferry\client.py", line 75, in
init
self.self_wxid = self.get_self_wxid()
File "C:\Python\Python37_32\lib\site-packages\wcferry\client.py", line 108, in
get_self_wxid
rsp = self._stub.RpcGetSelfWxid(wcf_pb2.Empty())
File "C:\Python\Python37_32\lib\site-packages\grpc_channel.py", line 946, in
call
return _end_unary_response_blocking(state, call, False, None)
File "C:\Python\Python37_32\lib\site-packages\grpc_channel.py", line 849, in
_end_unary_response_blocking
raise _InactiveRpcError(state)
grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:

    status = StatusCode.UNKNOWN
    details = "Stream removed"
    debug_error_string = "UNKNOWN:Error received from peer ipv6:%5B::1%5D:10

086 {created_time:"2022-11-22T03:39:56.873238164+00:00", grpc_status:2, grpc_mes
sage:"Stream removed"}"

http接口文档在哪 [💡SUG] 一句话描述你希望新增的功能或特性

你希望添加的功能是否与某个问题相关?
关于这个问题的简洁清晰的描述,例如,当 [...] 时,我总是很沮丧。

描述你希望的解决方案
关于解决方案的简洁清晰的描述。

描述你考虑的替代方案
关于你考虑的,能实现这个功能的其他替代方案的简洁清晰的描述。

其他
你可以添加其他任何的资料、链接或者屏幕截图,以帮助我们理解这个新功能。

[🐛BUG] 回调给信息数据不太准确好像

{thumb='', sign='xxxxxxxx', type=1, roomId='null', content='111', isGroup=false, sender='xxxxxxxxx', isAt=false, xml='<msgsource>
	<silence>1</silence>
	<membercount>4</membercount>
	<signature>v1_fy2iu6Yr</signature>
	<tmp_node>
		<publisher-id></publisher-id>
	</tmp_node>
</msgsource>
', extra='', id='1616667964132650741', isSelf=false, ts=1691552686}

这是一个群组消息 isGroup是false, roomId是空

使用的wcfhttp v39.0.2.1

如何获取wxCalls中各函数的地址及参数

请问: load_calls.cpp中定义的如下函数地址及参数是如何确定的,是否有对应的工具或者相应的方法文档说明?这样的工具方法是对所有版本的微信都适用的吗?

 #define SUPPORT_VERSION L"3.9.2.23"
WxCalls_t wxCalls = {
    0x2FFD638,                                      // Login Status
    { 0x2FFD484, 0x2FFD590, 0x2FFD500, 0x30238CC }, // User Info: wxid, nickname, mobile, home
    { 0x768140, 0xCE6C80, 0x756960 },               // Send Message
    /* Receive Message:
          Hook,  call, msgId, type, isSelf, ts, roomId, content, wxid, sign, thumb, extra, msgXml */
    { 0xD19A0B, 0x756960, 0x30, 0x38, 0x3C, 0x44, 0x48, 0x70, 0x180, 0x194, 0x1A8, 0x1BC, 0x1FC },
    { 0x768140, 0XF59E40, 0XCE6640, 0x756960 },           // Send Image Message
    { 0x76AE20, 0xF59E40, 0xB6D1F0, 0x756960 },           // Send File Message
    { 0xB8A70, 0x3ED5E0, 0x107F00, 0x3ED7B0, 0x2386FE4 }, // Send xml Message
    { 0x771980, 0x4777E0, 0x239E888 },                    // Send Emotion Message
    /* Get Contacts:
        call1, call2, wxId, Code, Remark,Name, Gender, Country, Province, City*/
    { 0x75A4A0, 0xC089F0, 0x10, 0x24, 0x58, 0x6C, 0x0E, 0x00, 0x00, 0x00 },
    /* Exec Sql:
          Exec,     base,   start,   end,   slot, name*/
    { 0x141BDF0, 0x2366934, 0x1428, 0x142C, 0x3C, 0x50 },
    { 0xA17D50, 0xF59E40, 0xA18BD0, 0xA17E70 }, // Accept New Friend application
    { 0x78CF20, 0xF59E40, 0xBD1DC0 },           // Add chatroom members
    { 0x78CF20, 0xF59E40, 0xBD22A0 },           // Delete chatroom members
    { 0x7B2E60, 0x15E2C20, 0x79C250 },          // Receive transfer
    /* Receive PYQ
        hook,    call,     call1,    call2,    call3,      start, end,  ts,  wxid, content, xml, step*/
    { 0x14F9E15, 0x14FA0A0, 0xC39680, 0x14E2140, 0x14E21E0, 0x20, 0x24, 0x2C, 0x18, 0x3C, 0x384, 0xB48 }
};

[🐛BUG] 微信经常性的出现未响应的情况

描述这个 bug
今天按照demo运行的时候,微信经常性的出现未响应的情况,一般在运行多次demo之后微信出现卡死现象(主要是修改代码后重新运行),重启微信之后就可以了。然后再多次运行代码又会复现问题。

使用环境(请补全下列信息):

  • 操作系统:win10 ltsc 21H2 (19044.1288)
  • 操作系统版本:64 位
  • Python 版本:3.7.9 64位
  • WeChatFerry版本:3.7.0.30.24

屏幕截图
wechat_version
wechat_version_log
wechat_error

崩溃信息
微信崩溃原因描述文件是在那个地方?

[💡SUG] 能否打成 Docker 镜像

你希望添加的功能是否与某个问题相关?
感谢,不知道是否可以连底层的PC一起打个docker image,否则再服务端不太好部署

[💡SUG]关于wxMsg类只有sender wxid只有 rec wixd的问题

if (roomid.find("@ChatRoom") != string::npos) { // 群 ID 的格式为 xxxxxxxxxxx@chatroom
wxMsg.is_group = true;
wxMsg.roomid = roomid;
if (wxMsg.is_self) {
wxMsg.sender = GetSelfWxid();
} else {
wxMsg.sender = GetStringByAddress(*p + g_WxCalls.recvMsg.wxId);
}
} else {
wxMsg.is_group = false;
if (wxMsg.is_self) {
wxMsg.sender = GetSelfWxid();
} else {
wxMsg.sender = roomid;
}
}
请问下,消息不是应该有个 发送者的ID和一个接收者的ID吗? 运行的时候如果是自己手机端发的消息,就只有sender是自己的wxid。PC端就不知道是发给谁的了,这个问题是在编wxMsg这个类时,没有设计接收发送者wxid和接收者wxid?还是说原始的消息体就只有这样的结构?
看了下spy的注释,是说私聊的时候 wxid 本来就是空的,那于客户端显示的时候,怎么知道是谁的消息?

[💡SUG] 让微信及时保存原图片到硬盘,避免文件夹里找不到图片

你希望添加的功能是否与某个问题相关?
微信收到图片时,若不点击图片,大概率不会立即保存到硬盘上(每天夜里会自动保存,但是太迟了)。需要手工点击一下聊天里的图片,才会保存。。

描述你希望的解决方案
希望能增加个接口,让微信能及时把图片保存到硬盘。

[🐛BUG] [error] [WCF] [rpc_server.cpp::372::PushMessage] nng_send: Timed out

描述这个 bug
对 bug 作一个清晰简明的描述,包括:

  • 什么问题?
    .\wcf start 5555启动微信,正常建立链接一段时间后,客户端无法收到消息,/logs/wcf 日志显示[2023-09-08 09:04:51.994] [error] [WCF] [rpc_server.cpp::372::PushMessage] nng_send: Timed out
    image

客户端接收代码:
image

客户端发送代码:
image
image

  • 是否安装后第一次启动就出现?是的
  • 重启微信后能否解决?重启微信可以解决
  • 直接运行 最新发布 里的 cpp.exe 是否正常?正常

使用环境(请补全下列信息):

  • 操作系统:Windows Server 2012 R2
  • 操作系统版本:64 位
  • Python 版本:3.10.11 64 位

屏幕截图
image

rust编译提示找不到‘protoc’

编译这个项目的rust版本,一直提示

--- stdout
cargo:rerun-if-changed=proto/wcf.proto
cargo:rerun-if-changed=.
--- stderr
thread 'main' panicked at 'Could not find protoc installation and this build crate cannot proceed without
this knowledge. If protoc is installed and this crate had trouble finding
it, you can set the PROTOC environment variable with the specific path to your
installed protoc binary.You can download it from https://github.com/protocolbuffers/protobuf/releases or from your package manager.
For more information: https://docs.rs/prost-build/#sourcing-protoc

windows已经安装了基本环境,rust也加入了protobuf的引用,但还是提示这个,请问你是怎么编译的呀

有没有办法在Windows server中多开呢?

目前尝试过两种办法
1、用两个不同的Windows账号登录并启动wcfhttp,结果是后启动的wcfhttp会提示Call FUNC_IS_LOGIN failed: Timed out
2、使用Sandboxie(沙箱软件),在沙箱中运行两个wcfhttp,结果是后启动的wcfhttp会提示请求超时
有没有其他可行的办法呢?

[💡SUG] 接收的图片、语音存至本地

你希望添加的功能是否与某个问题相关?
能收到图片和语音数据并正常打印,但是不知这串数据如何利用?

描述你希望的解决方案
是否可以考虑提供类似接口或解密手段

    msg.is_pic() -> Bool
    msg.is_voice() -> Bool
    msg.get_pic(encode='base64') ->str
    msg.get_voice(encode='base64') ->str
    msg.save_pic(path='./1.jpg')
    msg.save_voice(path='./1.amr')

[🐛提问] 我应该怎么获取支持的版本

不支持当前微信版本

  • 提示不支持当前微信版本,我应该怎么获取支持的版本

使用环境(请补全下列信息):

  • 操作系统: Windows 10
  • 操作系统版本: 64 位
  • Python 版本: 3.10.11
  • 微信版本
    image

屏幕截图
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.