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.6.tar.gz (25.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.6-py3-none-any.whl (30.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pymem_win-1.14.6.tar.gz
  • Upload date:
  • Size: 25.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.6.tar.gz
Algorithm Hash digest
SHA256 0bdec21a7ae4c23d38215df7ca650bfa6a81a185f302bd8a3f585c3ddcbb6c63
MD5 a7ac1cfd6901620ef1d067dae0162c04
BLAKE2b-256 00413c4e1bd00140fbc1e2f1744bb0c77099ff993b8b19ae0d16997db3cff855

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pymem_win-1.14.6-py3-none-any.whl
  • Upload date:
  • Size: 30.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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 eef73559e9e2c2eb277587ee8966760a04b262bb98bc93d02a0302de6f282ecb
MD5 e2861d59dedee16dfbc87aed41361613
BLAKE2b-256 9f08109e2087d3802a3c686af2e3055e1e6b5e44dd2de1d8876527c03019bc39

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