【问题标题】:Overflow while using ReadWriteMemory使用 ReadWriteMemory 时溢出
【发布时间】:2022-11-11 01:49:51
【问题描述】:

我正在尝试从十六进制编辑器中获取信息。但是 ReadWriteMemory 给了我一个关于 "<class 'OverflowError'>: int too long to convert" 的错误

这是我的代码:

from ReadWriteMemory import ReadWriteMemory

base_address = 0x7FF6D60A0000
static_address_offset = 0x0074DE40
pointer_static_address = base_address + static_address_offset
offsets = [0x08, 0x08, 0xB0, 0x08, 0x278, 0x10, 0xD0]

rmw = ReadWriteMemory()
process = rmw.get_process_by_name('010Editor.exe')
process.open()
pointer = process.get_pointer(pointer_static_address, offsets=offsets)
pointer_value = process.read(pointer)
print(pointer_value)

我该如何解决这个问题?

【问题讨论】:

  • 问题似乎与基地址的大小有关?你能使用 48 位地址吗?如果不能,你从哪里得到基地址?
  • 我使用指针找到了它。所以“010Editor.exe”+ 0074DE40 = 7FF67709DE40。我从总数中提取了 0074DE40。找到 0x7FF6D60A0000。我不知道如何使用 48 位地址。这就是我卡住的地方。

标签: python ram


【解决方案1】:

我使用 'pymem' 修复了它,所以 ReadWriteMemory 似乎无法处理 64 位应用程序。

from pymem import *
from pymem.process import *

pm = Pymem('010Editor.exe')

def GetByteNumber():
    def GetPtrAddr(base, offsets):
        addr = pm.read_longlong(base)
        for i in offsets:
            if i != offsets[-1]:
                addr = pm.read_longlong(addr + i)
        return addr + offsets[-1]
    return pm.read_int(GetPtrAddr(pm.base_address + 0x0074DE40, offsets=[0x8, 0x8, 0x60, 0x8, 0x10, 0xB0, 0xD0]))

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-03-28
    • 2021-09-04
    • 2021-08-14
    • 2012-03-01
    • 1970-01-01
    • 1970-01-01
    • 2019-06-14
    相关资源
    最近更新 更多