python 植物大战僵尸外挂辅助工具

import  win32process#进程模块
from  win32con import PROCESS_ALL_ACCESS #Opencress 权限
import  win32api#调用系统模块
import ctypes#C语言类型
from win32gui import FindWindow#界面
import  time

def GetProcssID(address,bufflength):
    pid = ctypes.c_ulong()
    kernel32 = ctypes.windll.LoadLibrary("kernel32.dll")
    hwnd = FindWindow(None,u"植物大战僵尸中文版")
    ReadProcessMemory = kernel32.ReadProcessMemory
    hpid, pid = win32process.GetWindowThreadProcessId(hwnd)
    hProcess = win32api.OpenProcess(PROCESS_ALL_ACCESS, False, pid)
    addr = ctypes.c_ulong()
    ReadProcessMemory(int(hProcess), address, ctypes.byref(addr), bufflength, None)
    win32api.CloseHandle(hProcess)
    return addr.value

def SetProcssID(address,bufflength):
    pid = ctypes.c_ulong()
    kernel32 = ctypes.windll.LoadLibrary("kernel32.dll")
    hwnd = FindWindow(None,u"植物大战僵尸中文版")
    WriteProcessMemory = kernel32.WriteProcessMemory
    hpid, pid = win32process.GetWindowThreadProcessId(hwnd)
    hProcess = win32api.OpenProcess(PROCESS_ALL_ACCESS, False, pid)
    newdata = ctypes.c_long(5000)
    WriteProcessMemory(int(hProcess),address,ctypes.byref(newdata),bufflength,None)   #修改内存地址
    win32api.CloseHandle(hProcess)

def main():
    while(True):
        SetProcssID(GetProcssID(GetProcssID(0x006A9EC0, 4)+0x768, 4)+0x5560, 4)
        print("正在运行...")
        time.sleep(5)
    #sun = GetProcssID(GetProcssID(GetProcssID(0x006A9EC0, 4) + 0x768, 4) + 0x5560, 4)
    #print ("阳光的数量:%d" % sun)

if __name__ == '__main__':
    main()
本作品采用《CC 协议》,转载必须注明作者和本文链接
讨论数量: 3

终于更新了!而且更新的还是外挂教程!

2周前 评论
MTQ_python (楼主) 2周前
TNT_God (作者) 2周前

这个看着很厉害 ,只是没懂 :joy:

1周前 评论

请勿发布不友善或者负能量的内容。与人为善,比聪明更重要!