Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to realize the split of software such as Wechat nails by python?

2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

Today Xiaobian to share with you how python to achieve Wechat nails and other software more split of the relevant knowledge, detailed content, clear logic, I believe that most people are also too aware of this knowledge, so share this article for your reference, I hope you will learn something after reading this article, let's take a look at it.

At present, many software are limited to single instances, most of the software is implemented in Mutex, and we can use handle to kill it, and does not affect the use. Nailing is the same step, but the name of Mutex is different. The nails I tested are:

"\ Sessions\ 1\ BaseNamedObjects\ {{239B7D43-86D5-4E5C-ADE6-CEC42155B475}} DingTalk"

Here with the help of Microsoft's two software are: procexp handle

Let's start with the text:

First of all, we have to manually determine which Mutex is.

Procexp.exe is about to be used to run the program as an administrator.

Press Ctrl+L to select the Wechat process and the lower half of the figure will appear.

In the software, we can find that type is Mutant, and then there is a right button to close and a try here. I have already tried it, so I will not demonstrate it and give it to you directly.

Name\ Sessions\ 1\ BaseNamedObjects\ WeChat_GlobalConfig_Multi_Process_Mutex

After this step, the mission of this tool is completed! Next it's time to use handle and enter the following code in cmd

Handle-a-u-p 12668 "\ Sessions\ 1\ BaseNamedObjects\ WeChat_GlobalConfig_Multi_Process_Mutex"

And then we can just close the handle.

Handle-p 12668-c 460-y

Note: this code requires administrator privileges

Then we can open Wechat.

Let's use python to implement it.

The code may be different from the analysis because

"\ Sessions\ 1\ BaseNamedObjects\ WeChat_GlobalConfig_Multi_Process_Mutex"

The 1 in sometimes becomes another number, so I used the matching rule

Put the code and handle.exe in the same directory

Import osimport reimport psutil def get_pid (name): "" get all Wechat processes "process_list = psutil.pids () pids = [] for pid in process_list: if psutil.Process (pid) .name () = = name: pids.append (pid) return pids def more_open (path): pids = get_pid (" WeChat.exe ") for pid in Pids: # run through all Wechat's pid and kill Mutex cmd = f "handle-a-u-p {pid}" with os.popen (cmd) as f: result = f.read () search_result = "for i in result.split ("\ n "): if i.strip (): if i.strip () .endswith ("_ WeChat_App_Instance_Identity_Mutex_Name"): search_result + = i if not search_result: os.startfile (path) continue re_result = re.findall ('(\ d +): Mutant' Search_result Re.S) # the above loop matches Mutex's handle if re_result: for _ id in re_result: os.system (f'handle-p {pid}-c {_ id}-y') os.startfile (path) path = "D:\ Program Files (x86)\ Tencent\ WeChat\ WeChat.exe" more_open (path) above is "how python?" How to achieve Wechat nails and other software more split "all the contents of this article Thank you for reading! I believe you will gain a lot after reading this article. The editor will update different knowledge for you every day. If you want to learn more knowledge, please pay attention to the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report