• 按键公众号 :
按键精灵电脑版
立即下载

软件版本:2014.06
软件大小:22.9M
更新时间:2021-12-03

按键精灵安卓版
立即下载

软件版本:3.7.2
软件大小:46.2M
更新时间:2023-05-10

按键精灵iOS版
立即下载

软件版本:1.8.0
软件大小:29.2M
更新时间:2023-03-21

按键手机助手
立即下载

软件版本:3.8.0
软件大小:262M
更新时间:2023-05-30

快捷导航

登录 后使用快捷导航
没有帐号? 注册

发新话题 回复该主题

[类人猿] [类人猿] pc按键汇编逆向思维11 ----图色和memoryPK遍... [复制链接]

1#
按键精灵一门非常用的脚本编程工具,功能非常强大。按键精灵可以memory和图色可以相互配合使用,脚本会更加强大。

图色兄弟:你好!
memory兄弟:拟好!!


图色兄弟:只要是我眼睛能看到图色脚本,我都能做,你可以吗?

memory兄弟:可以。你看不到的,我也能做。

图色兄弟:开玩笑吧!我不信,我偏偏不信!
memory兄弟:那就来吧!我带你memory遍历全图怪物boss,你看不到一样能识别


下面图片是一张图片,已经是飞到天上,看不到任何怪物和人物。但是我们右边却能出现所有地图数据的图标。证明怪物在被遍历。





首先,结合 前面怪物数据分析,我们得到boss属性,遍历怪物,然后判断是否是boss
  1. sub scan_boss
  2. mon_amount = dm.ReadInt(hwnd, "[EA840C]+30", 0)
  3. // TracePrint mon_amount
  4. nn = 0
  5. For mon_amount
  6. montype_addr = "[[[EA840C]+10]+" & Hex(nn) & "]+0e8"
  7. mon_type= dm.ReadInt(hwnd,montype_addr,0)
  8. call jude_boss
  9. nn=nn+4
  10. Next
  11. End Sub
复制代码
我们如何显示boss的,不需要图色呢?我们可以通过一些点击地图call向服务器发送数据,然后服务器会传送数据过来怪物数据。这里用到的某游戏的显示call。显示数据的call里面包含地图数据和x,y,z坐标数据。
  1. Sub show_boss
  2. TracePrint map_id &"X="& map_x &" Y================= "& map_y
  3. dm_ret = dm.WriteInt(hwnd, Hex(addr), 0, map_x)
  4. dm_ret = dm.WriteInt(hwnd, Hex(addr + 4), 0, map_y)
  5. dm.AsmClear
  6. dm.AsmAdd "call "& GameLogicGet_call
  7. dm.AsmAdd "mov edx,dword ptr ds:[eax]"
  8. dm.AsmAdd "push 0"& Hex(addr)
  9. dm.AsmAdd "push 0"& Hex(map_id)
  10. dm.AsmAdd "mov ecx,eax"
  11. dm.AsmAdd "call dword ptr ds:[edx+0x844]"
  12. dm.AsmCall hwnd,1
  13. End Sub
复制代码
memory 读取出来boss判断
  1. Sub jude_boss
  2. Select Case mon_type//is bos
  3. Case 2001
  4. boss_name = "16级绿魔精"
  5. Case 2002
  6. boss_name = "17级绿魔精"
  7. Case 2003
  8. boss_name = "18级绿魔精"
  9. Case 2011
  10. boss_name = "21级灯笼怪"
  11. Case 2012
  12. boss_name = "22级灯笼怪"
  13. Case 2013
  14. boss_name = "23级灯笼怪"
  15. Case 2021
  16. boss_name = "26级冰妖剑士"
  17. Case 2022
  18. boss_name = "27级冰妖剑士"
  19. Case 2023
  20. boss_name = "28级冰妖剑士"
  21. Case 2031
  22. boss_name = "28级沼泽招魂使"
  23. Case 2032
  24. boss_name = "29级沼泽招魂使"
  25. Case 2033
  26. boss_name = "30级沼泽招魂使"
  27. Case 2041
  28. boss_name = "31级提风"
  29. Case 2042
  30. boss_name = "32级提风"
  31. Case 2043
  32. boss_name = "33级提风"
  33. Case 3001
  34. boss_name = "36级望齿魔人"
  35. Case 3002
  36. boss_name = "37级望齿魔人"
  37. Case 3003
  38. boss_name = "38级望齿魔人"
  39. Case 3011
  40. boss_name = "41级巴洛骨"
  41. Case 3012
  42. boss_name = "42级巴洛骨"
  43. Case 3013
  44. boss_name = "43级巴洛骨"
  45. Case 3021
  46. boss_name = "46级角蜥"
  47. Case 3022
  48. boss_name = "47级角蜥"
  49. Case 3023
  50. boss_name = "48级角蜥"
  51. Case 3031
  52. boss_name = "51级骑士亡魂"
  53. Case 3032
  54. boss_name = "52级骑士亡魂"
  55. Case 3033
  56. boss_name = "53级骑士亡魂"
  57. Case 3041
  58. boss_name = "53级塔亚龙"
  59. Case 3042
  60. boss_name = "54级塔亚龙"
  61. Case 3043
  62. boss_name = "55级塔亚龙"
  63. Case 7011
  64. boss_name = "56级死神战将"
  65. Case 7012
  66. boss_name = "57级死神战将"
  67. Case 7013
  68. boss_name = "58级死神战将"
  69. Case 7021
  70. boss_name = "61级招魂使"
  71. Case 7022
  72. boss_name = "62级招魂使"
  73. Case 7023
  74. boss_name = "63级招魂使"
  75. Case 7031
  76. boss_name = "66级死亡骑士"
  77. Case 7032
  78. boss_name = "67级死亡骑士"
  79. Case 7033
  80. boss_name = "68级死亡骑士"
  81. Case 7041
  82. boss_name = "71级黑翼法师"
  83. Case 7042
  84. boss_name = "72级黑翼法师"
  85. Case 7043
  86. boss_name = "73级黑翼法师"
  87. Case 5011
  88. boss_name = "71级鱼妖"
  89. Case 5012
  90. boss_name = "72级鱼妖"
  91. Case 5013
  92. boss_name = "73级鱼妖"
  93. Case 5021
  94. boss_name = "75级恐兽"
  95. Case 5022
  96. boss_name = "76级恐兽"
  97. Case 5023
  98. boss_name = "77级恐兽"
  99. Case 5031
  100. boss_name = "81级巨斧怪"
  101. Case 5032
  102. boss_name = "82级巨斧怪"
  103. Case 5033
  104. boss_name = "83级巨斧怪"
  105. Case 4011
  106. boss_name = "76级雪山矮人"
  107. Case 4012
  108. boss_name = "77级雪山矮人"
  109. Case 4013
  110. boss_name = "78级雪山矮人"
  111. Case 4021
  112. boss_name = "81级冰原"
  113. Case 4022
  114. boss_name = "82级冰原"
  115. Case 4023
  116. boss_name = "83级冰原"
  117. Case 4031
  118. boss_name = "86级冰雪巨人"
  119. Case 4032
  120. boss_name = "87级冰雪巨人"
  121. Case 4033
  122. boss_name = "88级冰雪巨人"
  123. Case 4041
  124. boss_name = "91级守卫者"
  125. Case 4042
  126. boss_name = "92级守卫者"
  127. Case 4043
  128. boss_name = "93级守卫者"
  129. Case 6011
  130. boss_name = "86级刺虫怪"
  131. Case 6012
  132. boss_name = "87级刺虫怪"
  133. Case 6013
  134. boss_name = "88级刺虫怪"
  135. Case 6021
  136. boss_name = "91级牙怪"
  137. Case 6022
  138. boss_name = "92级牙怪"
  139. Case 6023
  140. boss_name = "93级牙怪"
  141. Case 6031
  142. boss_name = "96级炎女"
  143. Case 6032
  144. boss_name = "97级炎女"
  145. Case 6033
  146. boss_name = "98级炎女"
  147. Case Else
  148. Goto notboss//不是boss就跳过吧
  149. End Select
  150. Call warning_boss
  151. Rem notboss
  152. End Sub
复制代码
  1. Function 特征码定位地址(模块名, 最大范围, 偏移, 特征码, 数值种类)//注意偏移是10进制,返回值0是地址,1是数值
  2. base_addr = dm.GetModuleBaseAddr(hwnd,模块名)
  3. 范围 = Hex(base_addr) & "-" & Hex(base_addr + 最大范围)
  4. TracePrint 范围
  5. 特征码= Replace(特征码," ","")//这里是去掉空格
  6. result = dm.FindData(hwnd,范围,特征码)
  7. result = split(result,"|")
  8. count = ubound(result)+1
  9. traceprint "找到"&count&"个地址"
  10. TracePrint result(0)
  11. If count>0 then
  12. ret1 = Lib.算法.十六进制转十进制(result(0))
  13. ret2 = 偏移
  14. 定位地址值 = int(ret1) + int(ret2)
  15. If 数值种类=0 Then
  16. 特征码定位地址 = 定位地址值
  17. TracePrint "call的的地址是:" & Hex(定位地址值)
  18. ElseIf 数值种类=1 Then
  19. value = dm.ReadInt(hwnd, Hex(定位地址值), 0)
  20. TracePrint "最终定位得到的数值:" & Hex(value)
  21. 特征码定位地址 = value
  22. Else
  23. TracePrint "出错,没有找到任何数值"
  24. 特征码定位地址 = 0
  25. End if
  26. End If
  27. End Function

  28. Sub warning_boss //读取boss,并且在列表打印输出
  29. montype_addr = "[[[EA840C]+10]+" & Hex(nn) & "]+0a0"//读取怪物bossX坐标
  30. boss_x= dm.ReadInt(hwnd,montype_addr,0)
  31. montype_addr = "[[[EA840C]+10]+" & Hex(nn) & "]+0a4"//读取怪物bossY坐标
  32. boss_y= dm.ReadInt(hwnd,montype_addr,0)
  33. Form1.ListBox1.list = boss_name & "," & boss_x & "," & boss_y &","&map_id &"|" & Form1.ListBox1.list
  34. End sub
  35. Sub godview
  36. dm.AsmClear
  37. dm.AsmAdd "mov esi,dword ptr ds:[0x"& GameLogicGet_call &"]"
  38. dm.AsmAdd "call esi"
  39. dm.AsmAdd "mov edx,dword ptr ds:[eax]"
  40. dm.AsmAdd "mov ecx,eax"
  41. dm.AsmAdd "mov ecx,eax"
  42. dm.AsmAdd "call dword ptr ds:[edx+0x83C]"
  43. dm.AsmCall hwnd,1
  44. Delay 500
  45. End sub
  46. Sub down_land(downland_map,boss_x,boss_y)
  47. boss_addr = dm.VirtualAllocEx(hwnd, 0, 8, 0)//分配内存空间是为了写入搜索的X,Y坐标
  48. dm_ret_boss = dm.WriteInt(hwnd, Hex(boss_addr ), 0, boss_x)
  49. dm_ret_boss = dm.WriteInt(hwnd, Hex(boss_addr + 4), 0, boss_y)
  50. dm.AsmClear
  51. dm.AsmAdd "call dword ptr ds:[0x"&GameLogicGet_call &"]"
  52. dm.AsmAdd "mov ecx,dword ptr ds:[0x"&down_land_parameter&"]"
  53. dm.AsmAdd "mov edx,dword ptr ds:[eax]"
  54. dm.AsmAdd "mov ecx,dword ptr ds:[ecx+0x1E8]"
  55. dm.AsmAdd "mov ecx,dword ptr ds:[ecx+0x7DC]"
  56. dm.AsmAdd "add ecx,0x3030"
  57. dm.AsmAdd "push 0"& Hex(boss_addr)
  58. dm.AsmAdd "push 0"& downland_map
  59. dm.AsmAdd "mov ecx,eax"
  60. dm.AsmAdd "call dword ptr ds:[edx+0x830]"
  61. dm.AsmCall hwnd, 1
  62. End sub
复制代码

最后编辑类人猿 最后编辑于 2022-03-06 18:16:09
类人猿逆向学院 QQ:578052137 技术Q群583990978
2#

学习学习

QQ:921162950,有事情联系我的QQ,有事情联系我的QQ,有事情联系我的QQ,重要的事情说三遍,别打电话!
3#

强大,学习学习

4#

不需要图色呢?我

5#

111111111

6#

3654314

7#

继续吧

8#

1111111111

9#

这个是pc的吗

10#

66666666666666666666666666666

11#

过来学习

发新话题 回复该主题