Skip to main content
Quarantined

This project has been quarantined by PyPI admins. It cannot be installed or modified until a security review is complete.

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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pymem_win-1.14.1.tar.gz (24.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pymem_win-1.14.1-py3-none-any.whl (30.0 kB view details)

Uploaded Python 3

File details

Details for the file pymem_win-1.14.1.tar.gz.

File metadata

  • Download URL: pymem_win-1.14.1.tar.gz
  • Upload date:
  • Size: 24.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.3

File hashes

Hashes for pymem_win-1.14.1.tar.gz
Algorithm Hash digest
SHA256 74fd4b8505e6122423c767cadde25d768dfd0e0e5addc61f43bf7ad67bf59318
MD5 e642005c944569b5569be3bdd403e230
BLAKE2b-256 63d1054ad7a41d1b693f5f473b64cb30bd9351bc6dd3ab3ef03351de927e67d7

See more details on using hashes here.

File details

Details for the file pymem_win-1.14.1-py3-none-any.whl.

File metadata

  • Download URL: pymem_win-1.14.1-py3-none-any.whl
  • Upload date:
  • Size: 30.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.3

File hashes

Hashes for pymem_win-1.14.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8832ae6408fe2a10c23f3ec4d985df060149b9bbf2ef66dbd1df750b72d38ac3
MD5 37654cd7ef2438eda54cdf4c4dda1e14
BLAKE2b-256 6d10fab059bb88eea8dc6264ef884384d6c3e8c28d3665f25db8e13fb41bbcaa

See more details on using hashes here.

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