Skip to content

Instantly share code, notes, and snippets.

@RGamberini
Created December 1, 2019 02:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RGamberini/cf5255464162da295fb73c160a8bd0c7 to your computer and use it in GitHub Desktop.
Save RGamberini/cf5255464162da295fb73c160a8bd0c7 to your computer and use it in GitHub Desktop.
bufferSize = 2232
buffer = (ctypes.c_byte * bufferSize)()
pid = findProcessIdByName("Phantom Brave PC.exe")[0]['pid']
toFind = ctypes.create_string_buffer(b"Nameless Soul")
print(pid)
with Process.open_process(pid) as p:
startAddr = list(filter(lambda x: x >0x1CBB0000, p.search_all_memory(toFind)))[0]
startAddr += 23
for i in range(25):
p.read_memory(startAddr + (bufferSize * i), buffer)
asciiBuffer = []
for byte in buffer:
if byte != 0x00:
asciiBuffer.append(byte)
else:
break
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment