修改内存搜索方式,防止参数错误,无限循环搜索
This commit is contained in:
parent
92e47f217b
commit
63c30ee094
@ -169,7 +169,6 @@ class BaseAddr:
|
|||||||
|
|
||||||
Handle = ctypes.windll.kernel32.OpenProcess(0x1F0FFF, False, self.pid)
|
Handle = ctypes.windll.kernel32.OpenProcess(0x1F0FFF, False, self.pid)
|
||||||
array = ctypes.create_string_buffer(self.batch)
|
array = ctypes.create_string_buffer(self.batch)
|
||||||
|
|
||||||
for i in range(module_start_addr, module_end_addr, self.batch):
|
for i in range(module_start_addr, module_end_addr, self.batch):
|
||||||
if ctypes.windll.kernel32.ReadProcessMemory(Handle, ctypes.c_void_p(i), array, self.batch, None) == 0:
|
if ctypes.windll.kernel32.ReadProcessMemory(Handle, ctypes.c_void_p(i), array, self.batch, None) == 0:
|
||||||
continue
|
continue
|
||||||
@ -178,6 +177,9 @@ class BaseAddr:
|
|||||||
if key in hex_string:
|
if key in hex_string:
|
||||||
self.key_addr_tmp = i + hex_string.find(key)
|
self.key_addr_tmp = i + hex_string.find(key)
|
||||||
break
|
break
|
||||||
|
if ((i - module_start_addr) / self.batch) > 300000:
|
||||||
|
self.key_addr = 0
|
||||||
|
return -1
|
||||||
|
|
||||||
array_key = []
|
array_key = []
|
||||||
for i in range(8):
|
for i in range(8):
|
||||||
@ -204,6 +206,8 @@ class BaseAddr:
|
|||||||
:param addr:
|
:param addr:
|
||||||
:return:
|
:return:
|
||||||
"""
|
"""
|
||||||
|
if addr == 0:
|
||||||
|
return 0
|
||||||
offset = addr - self.base_address
|
offset = addr - self.base_address
|
||||||
return offset
|
return offset
|
||||||
|
|
||||||
|
@ -12,7 +12,9 @@
|
|||||||
|
|
||||||
该分支是[SharpWxDump](https://github.com/AdminTest0/SharpWxDump)的经过重构python语言版本,同时添加了一些新的功能。
|
该分支是[SharpWxDump](https://github.com/AdminTest0/SharpWxDump)的经过重构python语言版本,同时添加了一些新的功能。
|
||||||
|
|
||||||
**如果觉得好用的话的话,帮忙点个[](https://github.com/xaoyaoo/PyWxDump/)呗**
|
*
|
||||||
|
*如果觉得好用的话的话,帮忙点个[](https://github.com/xaoyaoo/PyWxDump/)
|
||||||
|
呗**
|
||||||
|
|
||||||
## 二、使用方法
|
## 二、使用方法
|
||||||
|
|
||||||
@ -109,6 +111,8 @@ print(data)
|
|||||||
|
|
||||||
```shell
|
```shell
|
||||||
python get_base_addr.py --mobile 152******** --name ****** --account ****** --key **********************************************
|
python get_base_addr.py --mobile 152******** --name ****** --account ****** --key **********************************************
|
||||||
|
|
||||||
|
# return:{'3.9.7.29': [63486984, 63488320, 63486792, 0, 63488256]}
|
||||||
```
|
```
|
||||||
|
|
||||||
参数说明:
|
参数说明:
|
||||||
@ -122,6 +126,8 @@ python get_base_addr.py --mobile 152******** --name ****** --account ****** --k
|
|||||||
# 需要降低版本使用get_wx_info.py获取key,也可以通过CheatEngine等工具获取
|
# 需要降低版本使用get_wx_info.py获取key,也可以通过CheatEngine等工具获取
|
||||||
# 最好是保存之前同微信使用过的key,非常方便
|
# 最好是保存之前同微信使用过的key,非常方便
|
||||||
|
|
||||||
|
[注]:如果参数错误,得到的对应地址偏移为0,邮箱默认为0
|
||||||
|
|
||||||
**3.2 通过CheatEngine等工具获取**
|
**3.2 通过CheatEngine等工具获取**
|
||||||
|
|
||||||
具体请查看:[CE获取基址.md](./CE%E8%8E%B7%E5%8F%96%E5%9F%BA%E5%9D%80.md)
|
具体请查看:[CE获取基址.md](./CE%E8%8E%B7%E5%8F%96%E5%9F%BA%E5%9D%80.md)
|
||||||
|
Loading…
Reference in New Issue
Block a user