qb-0 / pyMeow

Python Game Hacking Library
MIT License
356 stars 39 forks source link

aob scan module give me no result compared to cheat engine #51

Closed juzt3 closed 6 months ago

juzt3 commented 6 months ago

i'm scanning for this pattern "00 79 00 ?? 73 ?? ?? 7b 22 49 64 22 3a" for wich i have results in cheat engine but not in pymeow

process: dict = open_process('THEGAME.exe')
modules = enum_modules(process)
for mod in modules:
    print(mod["name"])
    try:
        res = aob_scan_module(process, mod["name"], pattern)
    except:
        continue
    print(len(res))

pleas help, what am i doing wrong?

Hypnootika commented 6 months ago

Did you try changing the "algo"? Also try only one "?".

aob_scan_module(process, mod["name"], pattern, algo=1)
aob_scan_module(process, mod["name"], pattern, algo=0)
juzt3 commented 6 months ago

i did that but nothing, i solved it by reading memory regions using PyMemoryEditor and then using aob_scan_bytes but it's quite slow


for memory_region in process2.get_memory_regions():
    base = memory_region["address"]
    size = memory_region["size"]
    information = memory_region["struct"]
    if base < mp_addr+0x84000000:
        continue
    try:
        st = r_bytes(process, base, size=size)
        res = aob_scan_bytes(_offsets.market_offers_pattern, st, single=True)
    except:
        continue
    if len(res) != 0:
        break
qb-0 commented 6 months ago

That's prob related to https://github.com/qb-0/pyMeow/blob/master/src/memcore.nim#L509 - we need to solve that one day.