Pymem


NamePymem JSON
Version 1.14.0 PyPI version JSON
download
home_pagehttps://github.com/srounet/Pymem
Summarypython memory access made easy
upload_time2024-10-27 18:59:50
maintainerNone
docs_urlNone
authorFabien Reboia
requires_python<4.0.0,>=3.8
licenseMIT
keywords
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": "https://github.com/srounet/Pymem",
    "name": "Pymem",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0.0,>=3.8",
    "maintainer_email": null,
    "keywords": null,
    "author": "Fabien Reboia",
    "author_email": "srounet@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/1f/fd/1906f383fd9697c0da599580c58f5cd5af48edb55429f6ef994c447fb94e/pymem-1.14.0.tar.gz",
    "platform": null,
    "description": "[![GitHub license](https://img.shields.io/github/license/srounet/pymem.svg)](https://github.com/srounet/Pymem/)\n[![Build status](https://ci.appveyor.com/api/projects/status/sfdvrtuh9qa2f3aa/branch/master?svg=true)](https://ci.appveyor.com/project/srounet/pymem/branch/master)\n[![codecov](https://codecov.io/gh/srounet/Pymem/branch/master/graph/badge.svg)](https://codecov.io/gh/srounet/Pymem/branch/master)\n[![Discord](https://img.shields.io/discord/342944948770963476.svg)](https://discord.gg/xaWNac8)\n[![Documentation Status](https://readthedocs.org/projects/pymem/badge/?version=latest)](https://pymem.readthedocs.io/?badge=latest)\n\nPymem\n=====\n\nA python library to manipulate Windows processes (32 and 64 bits).  \nWith pymem you can hack into windows process and manipulate memory (read / write).\n\nDocumentation\n=============\nYou can find pymem documentation on readthedoc there: http://pymem.readthedocs.io/\n\nDiscord Support\n=============\nFor questions and support, join us on discord https://discord.gg/xaWNac8\n\nExamples\n========\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.\n\nListing process modules\n-----------------------\n\n````python\nimport pymem\n\npm = pymem.Pymem('python.exe')\nmodules = list(pm.list_modules())\nfor module in modules:\n    print(module.name)\n````\n\nInjecting a python interpreter into any process\n-----------------------------------------------\n\n`````python\nfrom pymem import Pymem\n\nnotepad = subprocess.Popen(['notepad.exe'])\n\npm = pymem.Pymem('notepad.exe')\npm.inject_python_interpreter()\nfilepath = os.path.join(os.path.abspath('.'), 'pymem_injection.txt')\nfilepath = filepath.replace(\"\\\\\", \"\\\\\\\\\")\nshellcode = \"\"\"\nf = open(\"{}\", \"w+\")\nf.write(\"pymem_injection\")\nf.close()\n\"\"\".format(filepath)\npm.inject_python_shellcode(shellcode)\nnotepad.kill()\n`````\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "python memory access made easy",
    "version": "1.14.0",
    "project_urls": {
        "Documentation": "https://pymem.readthedocs.io/en/latest/",
        "Homepage": "https://github.com/srounet/Pymem",
        "Repository": "https://github.com/srounet/Pymem"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0da523907a4b55d67cd4c0e4b9a37e32f5f1ffaf7e286dcf172a2a1bb9e12444",
                "md5": "9afd97ee86fe0008e97bb116a2171852",
                "sha256": "2b9cc64b49d0685f73d616ab1f638611f87e8d649869e7a556f050f677c42a7e"
            },
            "downloads": -1,
            "filename": "pymem-1.14.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9afd97ee86fe0008e97bb116a2171852",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0.0,>=3.8",
            "size": 29833,
            "upload_time": "2024-10-27T18:59:48",
            "upload_time_iso_8601": "2024-10-27T18:59:48.911904Z",
            "url": "https://files.pythonhosted.org/packages/0d/a5/23907a4b55d67cd4c0e4b9a37e32f5f1ffaf7e286dcf172a2a1bb9e12444/pymem-1.14.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1ffd1906f383fd9697c0da599580c58f5cd5af48edb55429f6ef994c447fb94e",
                "md5": "d828fdbce65b05134e3f6d19f58da6c2",
                "sha256": "29f6c32bcad0032888afabadf97d1e4c7757f88873de4d79f7f4c1df9b9e7ef1"
            },
            "downloads": -1,
            "filename": "pymem-1.14.0.tar.gz",
            "has_sig": false,
            "md5_digest": "d828fdbce65b05134e3f6d19f58da6c2",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0.0,>=3.8",
            "size": 24890,
            "upload_time": "2024-10-27T18:59:50",
            "upload_time_iso_8601": "2024-10-27T18:59:50.369869Z",
            "url": "https://files.pythonhosted.org/packages/1f/fd/1906f383fd9697c0da599580c58f5cd5af48edb55429f6ef994c447fb94e/pymem-1.14.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-27 18:59:50",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "srounet",
    "github_project": "Pymem",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "appveyor": true,
    "lcname": "pymem"
}
        
Elapsed time: 0.36608s