Wechat multi open principle of SDK interface API of PC wechat robot

Time:2021-8-13

As we all know, under normal circumstances, the computer wechat client can only open one wechat. If you click again, you can’t open the second one. How is wechat implemented to prohibit a client from opening multiple wechat?
Wechat multi open principle of SDK interface API of PC wechat robot
Every time wechat starts, it calls the openmutesa() function. Wechat has its own mutex name. Every time this function is called, if the function returns true, it indicates that it has been found and that wechat has opened one. He won’t let me open the second one. If not found, open a new wechat, which is realized by this principle.
!Wechat multi open principle of SDK interface API of PC wechat robot

In OD (as shown in the figure below), use the shortcut key Ctrl + G to pop up the search: createmutew (wechat is a wide character). After searching, drop the breakpoint,
Wechat multi open principle of SDK interface API of PC wechat robot
After the breakpoint, find the function, which has three parameters: one is the mutex name, one is the bool value, and one is null
Wechat multi open principle of SDK interface API of PC wechat robot
Then use CE to find his name and change his mutex name, as shown in the following figure:
Wechat multi open principle of SDK interface API of PC wechat robot
After the change, cancel the breakpoint in the OD, and then automatically start a wechat. Then click the wechat icon on your computer, open it, and then open another wechat. In this way, two wechat are opened to realize multiple opening.
Wechat multi open principle of SDK interface API of PC wechat robot
At present, most functions have been realized and the operation is stable, such as sending various messages,
Receive various messages, group management, download files, add friends, detect zombie powder, etc,
The interface can be provided to facilitate the secondary development of various languages. Technical exchanges are welcome. Do not use it for commercial purposes.

Recommended Today

Java Engineer Interview Questions

The content covers: Java, mybatis, zookeeper, Dubbo, elasticsearch, memcached, redis, mysql, spring, spring boot, springcloud, rabbitmq, Kafka, Linux, etcMybatis interview questions1. What is mybatis?1. Mybatis is a semi ORM (object relational mapping) framework. It encapsulates JDBC internally. During development, you only need to pay attention to the SQL statement itself, and you don’t need to […]