番茄系统家园 - 免费重装系统!简单装系统,人人都是装机大师!
当前位置:首页>Win7资讯 > win7扫雷如何作弊?

win7扫雷如何作弊?

来源:番茄系统家园浏览:时间:2021-08-13 15:20:19

win7扫雷如何作弊?

###############################################################################--#####--#(x86)###--##programbeforerunningthisscript.Moreover,the#MineSweeper.exeshouldbeneithermaximizednorminimized.##2.Whenthisscriptrunning,dontmoveyourmouse.##############################################################################importimportwin32apiimportwin32guiimportwin32conimportwin32processimporttime,subprocessfromctypesimport*#constvariableTH32CS_SNAPMODULE=0x00000008PROCESS_ALL_ACCESS=0x1F0FFFHWND_NOTOPMOST=-2HWND_TOPMOST=-1SWP_NOSIZE=0x0001MOUSEEVENTF_LEFTDOWN=0x0002MOUSEEVENTF_LEFTUP=0x0004MOUSEEVENTF_RIGHTDOWN=0x0008MOUSEEVENTF_RIGHTUP=0x0010#structclassMODULEENTRY32(Structure):_fields_=[(dwSize,c_long),(th32ModuleID,c_long),(th32ProcessID,c_long),(GlblcntUsage,c_long),(ProccntUsage,c_long),(modBaseAddr,c_long),(modBaseSize,c_long),(hModule,c_void_p),(szModule,c_char*256),(szExePath,c_char*260)]##LoadLibrarykernel32=windll.LoadLibrary(kernel32.dll)##OpenProcessOpenProcess=kernel32.OpenProcess##CreateToolhelp32SnapshotCreateToolhelp32Snapshot=kernel32.CreateToolhelp32SnapshotCreateToolhelp32Snapshot.reltype=c_longCreateToolhelp32Snapshot.argtypes=[c_int,c_int]##Module32FirstModule32First=kernel32.Module32FirstModule32First.argtypes=[c_void_p,POINTER(MODULEENTRY32)]Module32First.rettype=c_int##Module32NextModule32Next=kernel32.Module32NextModule32Next.argtypes=[c_void_p,POINTER(MODULEENTRY32)]Module32Next.rettype=c_int##CloseHandleCloseHandle=kernel32.CloseHandleCloseHandle.argtypes=[c_void_p]CloseHandle.rettype=c_int##ReadProcessMemoryReadProcessMemory=kernel32.ReadProcessMemory#functiondefautoSweep():hWnd=win32gui.FindWindow(Minesweeper,None)ifhWnd==win32con.NULL:printFailedtofindtheMinesweeper\swindow.return1ThreadID,ProcessID=win32process.GetWindowThreadProcessId(hWnd)hProcess=OpenProcess(PROCESS_ALL_ACCESS,False,ProcessID)ifhProcess==win32con.NULL:printFailedtoopentheMinesweeper\sprocess.return1hSnapshot=c_void_p(0)me32=MODULEENTRY32()me32.dwSize=sizeof(MODULEENTRY32)hSnapshot=CreateToolhelp32Snapshot(TH32CS_SNAPMODULE,ProcessID)ret=Module32First(hSnapshot,pointer(me32))ifret==False:CloseHandle(hSnapshot)printFailedtoenumeratethemodulereturn1whileret:ifcmp(me32.szModule.lower(),minesweeper.exe)==0:mineBaseAddr=int(me32.modBaseAddr)ret=Module32Next(hSnapshot,pointer(me32))CloseHandle(hSnapshot)buffer=c_void_p(0)dwDate=c_void_p(0)topBaseAddr=mineBaseAddr+0x868B4MineInfo={count:0,row:0,column:0}try:ReadProcessMemory(hProcess,topBaseAddr,pointer(buffer),4,win32con.NULL)ReadProcessMemory(hProcess,buffer.value+0x10,pointer(buffer),4,win32con.NULL)ReadProcessMemory(hProcess,buffer.value+0x04,pointer(dwDate),4,win32con.NULL)MineInfo[count]=dwDate.valueReadProcessMemory(hProcess,buffer.value+0x08,pointer(dwDate),4,win32con.NULL)MineInfo[row]=dwDate.valueReadProcessMemory(hProcess,buffer.value+0x0C,pointer(dwDate),4,win32con.NULL)MineInfo[column]=dwDate.valueexcept:printFailedtoreadtheMinesweeper\smemorydate.return1win32gui.SetWindowPos(hWnd,HWND_TOPMOST,0,0,0,0,SWP_NOSIZE)cleft,ctop,cright,cbottom=win32gui.GetClientRect(hWnd)ifcright=0orcbottom=0:printFailedtogettherectangleofthMinesweeper\swindow.return1x,y=win32gui.ClientToScreen(hWnd,(cleft,ctop))edge=cright/(MineInfo[column]+4)+1originX=edge*2+edge/2+xoriginY=(cbottom-MineInfo[row]*edge)/2+edge/2+ywin32api.SetCursorPos((originX,originY))time.sleep(0.05)win32api.mouse_event(MOUSEEVENTF_LEFTDOWN|MOUSEEVENTF_LEFTUP,0,0,0,0)win32api.mouse_event(MOUSEEVENTF_LEFTDOWN|MOUSEEVENTF_LEFTUP,0,0,0,0)time.sleep(1)ReadProcessMemory(hProcess,buffer.value+0x44,pointer(buffer),4,win32con.NULL)ReadProcessMemory(hProcess,buffer.value+0x0C,pointer(buffer),4,win32con.NULL)buffer2=c_void_p(0)dwDate2=c_void_p(0)bFlag=[[0forcolinrange(MineInfo[row])]forrowinrange(MineInfo[column])]foriinrange(0,MineInfo[column]):ReadProcessMemory(hProcess,buffer.value+4*i,pointer(buffer2),4,win32con.NULL)ReadProcessMemory(hProcess,buffer2.value+0x0C,pointer(buffer2),4,win32con.NULL)forjinrange(0,MineInfo[row]):ReadProcessMemory(hProcess,buffer2.value+j,pointer(dwDate2),1,win32con.NULL)ifdwDate2.value==None:bFlag[i][j]=0else:bFlag[i][j]=dwDate2.valueprinti,j,bFlag[i][j]CloseHandle(hProcess)Count=0foriinrange(0,MineInfo[row]):forjinrange(0,MineInfo[column]):ifwin32gui.FindWindow(Minesweeper,None)!=win32con.NULL:win32api.SetCursorPos((originX+j*edge,originY+i*edge))ifbFlag[j][i]==0:win32api.mouse_event(MOUSEEVENTF_LEFTDOWN|MOUSEEVENTF_LEFTUP,0,0,0,0)Count+=1else:ifCount==(MineInfo[row]*MineInfo[column]-MineInfo[count]):breakwin32api.mouse_event(MOUSEEVENTF_RIGHTDOWN|MOUSEEVENTF_RIGHTUP,0,0,0,0)time.sleep(.015)else:printFailedtofindtheMinesweeper\swindow.return1printhWndwin32gui.SetWindowPos(hWnd,HWND_NOTOPMOST,0,0,0,0,SWP_NOSIZE)return0#mainif__name__==__main__:print__doc__print

subprocess.Popen(C:\ProgramFiles\MicrosoftGames\Minesweeper\MineSweeper.exe)time.sleep(2)bSuccess=autoSweep()ifbSuccess==1:input(PressENTERtoexit.)

python代码,自动扫雷

展开阅读全文?

相关阅读

  • win7自带扫雷作弊方法
  • windows7扫雷秘籍
  • win7扫雷如何作弊?
  • 推荐系统

    • 雨林木风 winxp下载 纯净版 永久激活 winxp ghost系统 sp3 系统下载

      雨林木风 winxp下载 纯净版 永久激活 winxp ghost系统 sp3 系统下载64位
      系统大小:0MB系统类型:WinXP

      雨林木风在系统方面技术积累雄厚深耕多年,打造了国内重装系统行业知名品牌,雨林木风WindowsXP其系统口碑得到许多人认可,积累了广大的用户群体,是一款稳定流畅的系统,雨林木风 winxp下载 纯净版 永久激活 winxp ghost系统 sp3 系统下载,有需要的朋友速度下载吧。

      系统等级:
      进入下载 >
    • 萝卜家园win7纯净版 ghost系统下载 x64 联想电脑专用

      萝卜家园win7纯净版 ghost系统下载 x64 联想电脑专用64位
      系统大小:0MB系统类型:Win7

      萝卜家园win7纯净版是款非常纯净的win7系统,此版本优化更新了大量的驱动,帮助用户们进行舒适的使用,更加的适合家庭办公的使用,方便用户,有需要的用户们快来下载安装吧。

      系统等级:
      进入下载 >
    • 雨林木风xp系统 xp系统纯净版 winXP ghost xp sp3 纯净版系统下载

      雨林木风xp系统 xp系统纯净版 winXP ghost xp sp3 纯净版系统下载64位
      系统大小:1.01GB系统类型:WinXP

      雨林木风xp系统 xp系统纯净版 winXP ghost xp sp3 纯净版系统下载,雨林木风WinXP系统技术积累雄厚深耕多年,采用了新的系统功能和硬件驱动,可以更好的发挥系统的性能,优化了系统、驱动对硬件的加速,加固了系统安全策略,运行环境安全可靠稳定。

      系统等级:
      进入下载 >
    • 萝卜家园win10企业版 免激活密钥 激活工具 V2023 X64位系统下载

      萝卜家园win10企业版 免激活密钥 激活工具 V2023 X64位系统下载64位
      系统大小:0MB系统类型:Win10

      萝卜家园在系统方面技术积累雄厚深耕多年,打造了国内重装系统行业的萝卜家园品牌,(win10企业版,win10 ghost,win10镜像),萝卜家园win10企业版 免激活密钥 激活工具 ghost镜像 X64位系统下载,其系统口碑得到许多人认可,积累了广大的用户群体,萝卜家园win10纯净版是一款稳定流畅的系统,一直以来都以用户为中心,是由萝卜家园win10团队推出的萝卜家园

      系统等级:
      进入下载 >
    • 萝卜家园windows10游戏版 win10游戏专业版 V2023 X64位系统下载

      萝卜家园windows10游戏版 win10游戏专业版 V2023 X64位系统下载64位
      系统大小:0MB系统类型:Win10

      萝卜家园windows10游戏版 win10游戏专业版 ghost X64位 系统下载,萝卜家园在系统方面技术积累雄厚深耕多年,打造了国内重装系统行业的萝卜家园品牌,其系统口碑得到许多人认可,积累了广大的用户群体,萝卜家园win10纯净版是一款稳定流畅的系统,一直以来都以用户为中心,是由萝卜家园win10团队推出的萝卜家园win10国内镜像版,基于国内用户的习惯,做

      系统等级:
      进入下载 >
    • windows11下载 萝卜家园win11专业版 X64位 V2023官网下载

      windows11下载 萝卜家园win11专业版 X64位 V2023官网下载64位
      系统大小:0MB系统类型:Win11

      萝卜家园在系统方面技术积累雄厚深耕多年,windows11下载 萝卜家园win11专业版 X64位 官网正式版可以更好的发挥系统的性能,优化了系统、驱动对硬件的加速,使得软件在WINDOWS11系统中运行得更加流畅,加固了系统安全策略,WINDOWS11系统在家用办公上跑分表现都是非常优秀,完美的兼容各种硬件和软件,运行环境安全可靠稳定。

      系统等级:
      进入下载 >