Skip to main content

GitHub license Build status codecov Discord Documentation Status

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()

Metadata

Release files for Pymem 1.14.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Pymem 1.14.0
File Size Uploaded
pymem-1.14.0.tar.gz 24.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for Pymem 1.14.0
File Interpreter ABI Platform
pymem-1.14.0-py3-none-any.whl Python 3 none any Details

Total release size: 54.7 kB

Release files / pymem-1.14.0.tar.gz

Download URL pymem-1.14.0.tar.gz
Size 24.9 kB
Tags Source
SHA-256 checksum
How to use checksums
29f6c32bcad0032888afabadf97d1e4c7757f88873de4d79f7f4c1df9b9e7ef1
BLAKE2b-256 checksum
How to use checksums
1ffd1906f383fd9697c0da599580c58f5cd5af48edb55429f6ef994c447fb94e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.13.0 Windows/11

Release files / pymem-1.14.0-py3-none-any.whl

Download URL pymem-1.14.0-py3-none-any.whl
Size 29.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2b9cc64b49d0685f73d616ab1f638611f87e8d649869e7a556f050f677c42a7e
BLAKE2b-256 checksum
How to use checksums
0da523907a4b55d67cd4c0e4b9a37e32f5f1ffaf7e286dcf172a2a1bb9e12444
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.13.0 Windows/11

Release history Release notifications | RSS feed

This release

1.14.0 This release

2 release files

1.13.3

2 release files

1.13.1

3 release files

1.11.1

2 release files

1.11.0

2 release files

1.10.0

2 release files

1.9.1

2 release files

1.9.0

2 release files

1.8.5

2 release files

1.8.4

2 release files

1.8.3

2 release files

1.8.2

2 release files

1.8.1

2 release files

1.8

2 release files

1.7

2 release files

1.6

2 release files

1.5

1 release file

1.4

1 release file

1.3

1 release file

1.2

1 release file

1.1

1 release file

1.0

1 release file

0.4

1 release file

0.3

1 release file

0.2

1 release file

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page