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

Uploaded Python 3

File details

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

File metadata

  • Download URL: pymem_win-1.14.0.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.0.tar.gz
Algorithm Hash digest
SHA256 3ede2cca2bee1386ebe1309a2287b14691cede59cb0f50c6533e7d7ef1857922
MD5 3bf41c78608f92b04b61407b2ff861d8
BLAKE2b-256 655ae9e4d77c67e560bcec54710d39567f78308030fa1dccc2e088e270a51933

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pymem_win-1.14.0-py3-none-any.whl
  • Upload date:
  • Size: 29.9 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fcef5ebf4388fc4146a97f2cf88009ea11e3c5b779510ef4b9527ab8a44841ed
MD5 6560fd64faaa76e9f56e8a508843f738
BLAKE2b-256 45bb4b733e200d4c9d984aef747cd5761cc965e88bd534cb554c725f92bf5938

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