Skip to main content

pymem: python memory access made easy

Project description

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

Project details


Download files

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

Source Distribution

Pymem-1.8.2.tar.gz (22.3 kB view details)

Uploaded Source

Built Distribution

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

Pymem-1.8.2-py2.py3-none-any.whl (26.8 kB view details)

Uploaded Python 2Python 3

File details

Details for the file Pymem-1.8.2.tar.gz.

File metadata

  • Download URL: Pymem-1.8.2.tar.gz
  • Upload date:
  • Size: 22.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.5

File hashes

Hashes for Pymem-1.8.2.tar.gz
Algorithm Hash digest
SHA256 450435340f64271434926cec6387c4d455ba503cbbca579031d621b4ce9d2af2
MD5 8dcdead47d67010926a8e07ffbdefa25
BLAKE2b-256 5e3391da0d6886a4d7e91ded8eec145e5862281aa20fec8f62f9f33a33041876

See more details on using hashes here.

File details

Details for the file Pymem-1.8.2-py2.py3-none-any.whl.

File metadata

  • Download URL: Pymem-1.8.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 26.8 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.5

File hashes

Hashes for Pymem-1.8.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 eaf351832cd8acc1711089fbbe1e8cd697239afaec5c7d224e7d22e12cd2fac6
MD5 c3cd6c9ef246e578efe697e14cdf0157
BLAKE2b-256 6e842699921cb373779e27924d853ce1bd900d95f205fec520a7b00aad6de3c7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page