下你所需,载你所想!
IT技术源码资料下载网站

微信无限多开器支持隔离运行的版本

:办公软件 2019-10-07 18:14:40

微信无限多开器支持隔离运行的版本附源码

# -*- coding: utf-8 -*-
import ctypes, time, signal, psutil, os
import tkinter as tk
RECVTEXTMSG_CALLBACK = ctypes.CFUNCTYPE(ctypes.c_int, ctypes.c_int, ctypes.c_wchar_p, ctypes.c_wchar_p)
RECVPAYMSG_CALLBACK = ctypes.CFUNCTYPE(ctypes.c_int, ctypes.c_int, ctypes.c_wchar_p, ctypes.c_wchar_p, ctypes.c_wchar_p)


# 初始化SDK
class WXSDK():
    # 引入动态链接库
    def __init__(self):
        self.sdk = ctypes.CDLL("WeChatSDK.dll")
    # 初始化接口
    def WXOpenWechat(self):
        self.pid = self.sdk.WXOpenWechat()


# 多开模块
def Open(num):
    wxsdk = WXSDK()
    for x in range(0,num):
        try:
            pid = wxsdk.WXOpenWechat()
            # 判断是否打开成功如果PID为空则死循环(可能会死循环)
            while(pid == 0):
                pid = wxsdk.WXOpenWechat()
                time.sleep(0.5)
            time.sleep(0.8)
        except:
            pass

# 结束进程模块
def kill():
    # 定义PID字典
    pid_dict = {}
    # 获取所有PID
    pids = psutil.pids()
    for pid in pids:
        p = psutil.Process(pid)
        pid_dict[pid]=p.name()
    for t in pid_dict.keys():
        if pid_dict[t] == "WeChat.exe":
            try:
                os.kill(t,signal.SIGABRT)
            except:
                while True:
                    try:
                        os.kill(t, signal.SIGABRT)
                        break
                    except:
                        continue

# 1.实例化object,建立窗口
window = tk.Tk()
# 2.给窗口可视化title
window.title("微信多开 2.0")
# 3.设置图标
# window.iconbitmap('1.ico')
# 4.设置窗口大小(窗口居中)
sw = window.winfo_screenwidth()
sh = window.winfo_screenheight()
ww = 300
wh = 300
x = (sw - ww) / 2
y = (sh - wh) / 2
window.geometry("%dx%d+%d+%d" % (ww, wh, x, y))
#锁定大小
window.maxsize(400, 200)
window.minsize(400, 200)
# 设置Label标签
lab = tk.Label(window, text='多开几个?', font=('', 14)).place(x=100, y=35)
# 设置text文本框标签
text = tk.Entry(window, text="2", font=14, textvariable="text")
text.pack()
# 改变text文本框位置
text.place(x=200,y=33,width=50,height=30)
# 俩按钮执行函数
def Open_Wechat():
    # 给上面For循环的值,int型
    Open(int(text.get()))
def Close_Windows():
    kill()
# 俩按钮并设置位置
open_wechat = tk.Button(window, text='立即多开', width=15, height=2, command=Open_Wechat).place(x=50, y=100)
window_close = tk.Button(window, text='关闭全部', width=15, height=2, command=Close_Windows).place(x=200, y=100)
# 循环显示窗口
tk.mainloop()

微信无限多开器支持隔离运行的版本附源码
打包好的软件:https://www.lanzous.com/i6bsc8f
源码:https://www.lanzous.com/i6bsidg