python memory access made easy
Project description
Pymem
A python library to manipulate Windows processes (32 and 64 bits).
With pymem you can hack into windows process and manipulate memory (read / write).
Documentation
You can find pymem documentation on readthedoc there: http://pymem.readthedocs.io/
Discord Support
For questions and support, join us on discord https://discord.gg/xaWNac8
Examples
You can find more examples from the community in the Examples from the community of pymem documentation.
Listing process modules
import pymem
pm = pymem.Pymem('python.exe')
modules = list(pm.list_modules())
for module in modules:
print(module.name)
Injecting a python interpreter into any process
from pymem import Pymem
notepad = subprocess.Popen(['notepad.exe'])
pm = pymem.Pymem('notepad.exe')
pm.inject_python_interpreter()
filepath = os.path.join(os.path.abspath('.'), 'pymem_injection.txt')
filepath = filepath.replace("\\", "\\\\")
shellcode = """
f = open("{}", "w+")
f.write("pymem_injection")
f.close()
""".format(filepath)
pm.inject_python_shellcode(shellcode)
notepad.kill()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pymem-1.14.0.tar.gz
(24.9 kB
view details)
Built Distribution
pymem-1.14.0-py3-none-any.whl
(29.8 kB
view details)
File details
Details for the file pymem-1.14.0.tar.gz
.
File metadata
- Download URL: pymem-1.14.0.tar.gz
- Upload date:
- Size: 24.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.13.0 Windows/11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 29f6c32bcad0032888afabadf97d1e4c7757f88873de4d79f7f4c1df9b9e7ef1 |
|
MD5 | d828fdbce65b05134e3f6d19f58da6c2 |
|
BLAKE2b-256 | 1ffd1906f383fd9697c0da599580c58f5cd5af48edb55429f6ef994c447fb94e |
File details
Details for the file pymem-1.14.0-py3-none-any.whl
.
File metadata
- Download URL: pymem-1.14.0-py3-none-any.whl
- Upload date:
- Size: 29.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.13.0 Windows/11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2b9cc64b49d0685f73d616ab1f638611f87e8d649869e7a556f050f677c42a7e |
|
MD5 | 9afd97ee86fe0008e97bb116a2171852 |
|
BLAKE2b-256 | 0da523907a4b55d67cd4c0e4b9a37e32f5f1ffaf7e286dcf172a2a1bb9e12444 |