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.13.0.tar.gz (24.4 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.13.0-py3-none-any.whl (29.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: Pymem-1.13.0.tar.gz
  • Upload date:
  • Size: 24.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/1.0.0 urllib3/1.26.16 tqdm/4.64.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.8

File hashes

Hashes for Pymem-1.13.0.tar.gz
Algorithm Hash digest
SHA256 ac027fd3c0269cd34b15b4343690fdb53c16176fe83106e90086bd61809e08b4
MD5 60d327d152f9dcdb52b9ab2d12d2b3a3
BLAKE2b-256 6e83ccdd9d7fb3be0bb2e69db7543c5179c05e1f89947f3b641b872424982111

See more details on using hashes here.

File details

Details for the file Pymem-1.13.0-py3-none-any.whl.

File metadata

  • Download URL: Pymem-1.13.0-py3-none-any.whl
  • Upload date:
  • Size: 29.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/1.0.0 urllib3/1.26.16 tqdm/4.64.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.8

File hashes

Hashes for Pymem-1.13.0-py3-none-any.whl
Algorithm Hash digest
SHA256 86b46e085d7752794ff8da63979b1cf08531b08bd0183339589f2626b0113d76
MD5 a705e6a28122cc55ec6ca5c3a563107d
BLAKE2b-256 3614c08f9f77d84f29b4a7f1900a43b8b30886e6cad75f73a53104314aa4317c

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