Pymem


NamePymem JSON
Version 1.13.1 PyPI version JSON
download
home_pagehttp://pymem.readthedocs.org/en/latest/
Summarypymem: python memory access made easy
upload_time2023-12-26 21:39:45
maintainerFabien Reboia
docs_urlNone
authorFabien Reboia
requires_python
licensemit
keywords memory win32 windows process
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![GitHub license](https://img.shields.io/github/license/srounet/pymem.svg)](https://github.com/srounet/Pymem/)
[![Build status](https://ci.appveyor.com/api/projects/status/sfdvrtuh9qa2f3aa/branch/master?svg=true)](https://ci.appveyor.com/project/srounet/pymem/branch/master)
[![codecov](https://codecov.io/gh/srounet/Pymem/branch/master/graph/badge.svg)](https://codecov.io/gh/srounet/Pymem/branch/master)
[![Discord](https://img.shields.io/discord/342944948770963476.svg)](https://discord.gg/xaWNac8)
[![Documentation Status](https://readthedocs.org/projects/pymem/badge/?version=latest)](https://pymem.readthedocs.io/?badge=latest)

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](https://pymem.readthedocs.io/en/documentation/examples/index.html) of pymem documentation.

Listing process modules
-----------------------

````python
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
-----------------------------------------------

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



            

Raw data

            {
    "_id": null,
    "home_page": "http://pymem.readthedocs.org/en/latest/",
    "name": "Pymem",
    "maintainer": "Fabien Reboia",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "srounet@gmail.com",
    "keywords": "memory win32 windows process",
    "author": "Fabien Reboia",
    "author_email": "srounet@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/14/01/dc9c5304c85e115ac8849ea71e4a98e84075553e7f701e3a3c5677c08a9d/Pymem-1.13.1.tar.gz",
    "platform": "windows",
    "description": "[![GitHub license](https://img.shields.io/github/license/srounet/pymem.svg)](https://github.com/srounet/Pymem/)\r\n[![Build status](https://ci.appveyor.com/api/projects/status/sfdvrtuh9qa2f3aa/branch/master?svg=true)](https://ci.appveyor.com/project/srounet/pymem/branch/master)\r\n[![codecov](https://codecov.io/gh/srounet/Pymem/branch/master/graph/badge.svg)](https://codecov.io/gh/srounet/Pymem/branch/master)\r\n[![Discord](https://img.shields.io/discord/342944948770963476.svg)](https://discord.gg/xaWNac8)\r\n[![Documentation Status](https://readthedocs.org/projects/pymem/badge/?version=latest)](https://pymem.readthedocs.io/?badge=latest)\r\n\r\nPymem\r\n=====\r\n\r\nA python library to manipulate Windows processes (32 and 64 bits).  \r\nWith pymem you can hack into windows process and manipulate memory (read / write).\r\n\r\nDocumentation\r\n=============\r\nYou can find pymem documentation on readthedoc there: http://pymem.readthedocs.io/\r\n\r\nDiscord Support\r\n=============\r\nFor questions and support, join us on discord https://discord.gg/xaWNac8\r\n\r\nExamples\r\n========\r\nYou can find more examples from the community in the [Examples from the community](https://pymem.readthedocs.io/en/documentation/examples/index.html) of pymem documentation.\r\n\r\nListing process modules\r\n-----------------------\r\n\r\n````python\r\nimport pymem\r\n\r\npm = pymem.Pymem('python.exe')\r\nmodules = list(pm.list_modules())\r\nfor module in modules:\r\n    print(module.name)\r\n````\r\n\r\nInjecting a python interpreter into any process\r\n-----------------------------------------------\r\n\r\n`````python\r\nfrom pymem import Pymem\r\n\r\nnotepad = subprocess.Popen(['notepad.exe'])\r\n\r\npm = pymem.Pymem('notepad.exe')\r\npm.inject_python_interpreter()\r\nfilepath = os.path.join(os.path.abspath('.'), 'pymem_injection.txt')\r\nfilepath = filepath.replace(\"\\\\\", \"\\\\\\\\\")\r\nshellcode = \"\"\"\r\nf = open(\"{}\", \"w+\")\r\nf.write(\"pymem_injection\")\r\nf.close()\r\n\"\"\".format(filepath)\r\npm.inject_python_shellcode(shellcode)\r\nnotepad.kill()\r\n`````\r\n\r\n\r\n",
    "bugtrack_url": null,
    "license": "mit",
    "summary": "pymem: python memory access made easy",
    "version": "1.13.1",
    "project_urls": {
        "Homepage": "http://pymem.readthedocs.org/en/latest/"
    },
    "split_keywords": [
        "memory",
        "win32",
        "windows",
        "process"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1cb3d993acf4cbaa8f65c066f14b74a3e06a0edcf80c2dd65edb3241274f6be7",
                "md5": "f389c9c2c6fab8156007ad072d83dbe7",
                "sha256": "ea1649469d853edae1aadb73072dcb807b547a069b9a6f2c9d106d5376bdc638"
            },
            "downloads": -1,
            "filename": "Pymem-1.13.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f389c9c2c6fab8156007ad072d83dbe7",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 29435,
            "upload_time": "2023-12-26T21:39:43",
            "upload_time_iso_8601": "2023-12-26T21:39:43.411473Z",
            "url": "https://files.pythonhosted.org/packages/1c/b3/d993acf4cbaa8f65c066f14b74a3e06a0edcf80c2dd65edb3241274f6be7/Pymem-1.13.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1401dc9c5304c85e115ac8849ea71e4a98e84075553e7f701e3a3c5677c08a9d",
                "md5": "3b59c27672c31d41cd2bda8b73612f54",
                "sha256": "82b50040e2e85179dc702d93d4857b475e0d2eb449bd5f1c50d3f40eb05ae1ad"
            },
            "downloads": -1,
            "filename": "Pymem-1.13.1.tar.gz",
            "has_sig": false,
            "md5_digest": "3b59c27672c31d41cd2bda8b73612f54",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 24420,
            "upload_time": "2023-12-26T21:39:45",
            "upload_time_iso_8601": "2023-12-26T21:39:45.311650Z",
            "url": "https://files.pythonhosted.org/packages/14/01/dc9c5304c85e115ac8849ea71e4a98e84075553e7f701e3a3c5677c08a9d/Pymem-1.13.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-26 21:39:45",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "pymem"
}
        
Elapsed time: 0.16608s