Want more features on Pastebin? Sign Up, it's FREE!
Guest

ReadProcessMemory

By: a guest on Oct 4th, 2012  |  syntax: Python  |  size: 0.48 KB  |  views: 69  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. import ctypes, win32ui, win32process
  2.  
  3. PROCESS_ALL_ACCESS = 0x1F0FFF
  4. HWND = win32ui.FindWindow(None,"Soldat").GetSafeHwnd()
  5. PID = win32process.GetWindowThreadProcessId(HWND)[1]
  6. PROCESS = ctypes.windll.kernel32.OpenProcess(PROCESS_ALL_ACCESS,False,PID)
  7.  
  8. rPM = ctypes.windll.kernel32.ReadProcessMemory
  9. wPM = ctypes.windll.kernel32.WriteProcessMemory
  10.  
  11. ADDRESS1 = 0x00B97D5C
  12. ADDRESS2 = ctypes.create_string_buffer(64)
  13. rPM(PROCESS,ADDRESS1,ADDRESS2,64,None)
  14. print(ADDRESS2)
  15. input()
clone this paste RAW Paste Data