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.4.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.4-py3-none-any.whl (29.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pymem_win-1.14.4.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.4.tar.gz
Algorithm Hash digest
SHA256 83ba1d2791f9d146cdd5d88bd4568edd30f309130ed0427d63099c481241a24f
MD5 fc1365df96a3ac8750f03db017fc787f
BLAKE2b-256 9aaaf3dbe74690f7db9dc17994b37efa87756fd09e7eee58c54bbf8aa3cfd11d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pymem_win-1.14.4-py3-none-any.whl
  • Upload date:
  • Size: 29.8 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 4daf88a009c03b4fc0e85d49094282b818a67cac4b8d7addeaddb95a12a2e4b1
MD5 79a3ea5558e867fc15f83df3e83e4110
BLAKE2b-256 8f09398f80eb08a16dcb6d3386344e53d0be9de475388b8ce41d1ba2d89edb76

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