import pymem
import subprocess
try:
mem = pymem.Pymem("mspaint.exe") ### reads memory of mspaint.exe
except:
subprocess.Popen("mspaint.exe")
mem = pymem.Pymem("mspaint.exe")
mem.inject_python_interpreter() ### injects the python interpreter to be able to understand python code
### code which we will be injecting
code = """
import tkinter as tk
win = tk.Tk()
win.mainloop()
"""
mem.inject_python_shellcode(code) ### injecting the code
but when I run the app it shows:
File "C:\Users\code1tech\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pymem\__init__.py", line 178, in start_thread
pymem.logger.debug('New thread_id: 0x%08x' % thread_h)
TypeError: %x format: an integer is required, not NoneType
I'm trying to run this code:
but when I run the app it shows:
can anybody help?