{ "info": { "author": "Nicolas VERDIER, Reid Castner", "author_email": "contact@n1nj4.eu, rbcastner@gmail.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "Programming Language :: Python :: 3" ], "description": "# memorpy3\n\nPython 3 port of memorypy library using ctypes to search/edit windows programs memory.\n\n## install\n\n```\npip install memorpy3\n```\n\n## usage examples :\n\nIn this example open a notepad.exe and type in some text we will edit from memory !\n\n```python\n>>> from memorpy3.MemWorker import MemWorker\n>>> mw=MemWorker(pid=3856) #you can also select a process by its name with the kwarg name=\n>>> l=[x for x in mw.umem_search(\"hello\")]\n>>> l\n[('', )]\n>>> a=l[0][1]\n>>> a\n\n>>> a+4\n\n>>> print a\n\n>>> a.dump()\n00328790: 46 00 72 00 61 00 6E 00 63 00 65 00 29 00 00 00 F.r.a.n.c.e.)...\n003287A0: 00 00 00 00 00 00 00 00 F3 8F 57 0C 7F 6A 00 10 ..........W..j..\n003287B0: 63 00 6F 00 75 00 63 00 6F 00 75 00 20 00 74 00 c.o.u.c.o.u. .t.\n003287C0: 68 00 69 00 73 00 20 00 69 00 73 00 20 00 61 00 h.i.s. .i.s. .a.\n003287D0: 20 00 6D 00 65 00 73 00 73 00 61 00 67 00 65 00 .m.e.s.s.a.g.e.\n003287E0: 20 00 49 00 20 00 74 00 79 00 70 00 65 00 64 00 .I. .t.y.p.e.d.\n003287F0: 20 00 69 00 6E 00 20 00 6E 00 6F 00 74 00 65 00 .i.n. .n.o.t.e.\n00328800: 70 00 61 00 64 00 2E 00 65 00 78 00 65 00 20 00 p.a.d...e.x.e. .\n00328810: 21 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 !...............\n00328820: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................\n00328830: 00 00 00 00 04 00 27 00 F7 8F 74 2B 6A 6A 00 00 ......'...t+jj..\n00328840: 30 7A 32 00 C0 8B 32 00 00 00 00 00 00 00 00 00 0z2...2.........\n00328850: 01 00 01 00 01 01 00 00 00 00 00 00 00 00 00 00 ................\n00328860: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................\n00328870: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................\n00328880: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................\n00328890: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................\n003288A0: 01 00 00 01 00 00 01 00 00 00 00 01 00 00 00 00 ................\n003288B0: 07 00 00 07 59 6A 00 00 B8 79 32 00 E8 35 32 00 ....Yj...y2..52.\n003288C0: 50 54 9D ED E6 EB 55 42 82 89 F8 A3 1E 68 72 28 PT....UB.....hr(\n003288D0: 03 00 00 03 7F 6A 00 00 C0 8B 32 00 E8 35 32 00 .....j....2..52.\n003288E0: AA BA 43 9F 5C 80 8F 67 E2 8F 75 3F 6E 6A 00 0C ..C.\\..g..u?nj..\n003288F0: F0 FE 30 00 70 FE 30 00 F0 FD 30 00 1D 17 ED 00 ..0.p.0...0.....\n00328900: B6 8F 75 6B 7B 6A 00 08 00 00 00 00 00 00 00 00 ..uk{j..........\n00328910: 11 10 0A 61 00 00 00 00 00 00 00 00 A0 00 00 00 ...a............\n00328920: 0D 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................\n00328930: 00 00 80 41 00 00 80 41 00 00 80 3D 00 00 80 3D ...A...A...=...=\n00328940: 00 00 D0 00 00 00 30 00 1E FF 20 1F 00 00 00 00 ......0... .....\n00328950: 71 80 0E 00 30 00 30 00 30 00 30 00 30 00 30 00 q...0.0.0.0.0.0.\n00328960: 30 00 30 00 30 00 30 00 30 00 30 00 30 00 30 00 0.0.0.0.0.0.0.0.\n00328970: 30 00 30 00 30 00 30 00 30 00 30 00 30 00 30 00 0.0.0.0.0.0.0.0.\n00328980: 30 00 30 00 30 00 30 00 30 00 30 00 30 00 30 00 0.0.0.0.0.0.0.0.\n>>> a.read(100).decode(\"utf-16-le\")\nu'hello this is a message I typed in notepad.exe !\\x00\\x00'\n>>> a.write(\"pwned\".encode(\"utf-16-le\"))\n1\n>>> a.read(100).decode(\"utf-16-le\")\nu'pwned this is a message I typed in notepad.exe !\\x00\\x00'\n```\n\nLook back at your notepad and the text should be changed ! :)\nA quicker way to do this could be :\n\n```python\n>>> mw.umem_replace(\"hello\",\"pwned\")\n```\n\nSome other interesting features like searching for different values types in memory and monitor their changes are also implemented through the Locator class. For example if you are looking to cheat in a game and you start with 200 ammo, you could do something like :\n\n```python\n>>> lo=Locator(mw)\n>>> lo.feed(200)\n...\n,\n,\n,\n...]}\n```\n\nUse some ammo and \"refeed\" the locator (do this a couple of times until there is one result left)\n\n```python\n>>> lo.feed(199)\n{'double': [],\n 'float': [],\n 'int': [],\n 'long': [],\n 'short': [],\n 'uint': [],\n 'ulong': [],\n 'ushort': []}\n>>> a=_[\"int\"][0]\n>>> a.read()\n199\n>>>a.write(999999)\n1\n```\n\n## Cutting a release\n```shell\n$ pip install -r requirements-dev.txt\n$ bumpversion major|minor|patch\n$ python setup.py sdist\n$ twine upload dist/*\n```", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/rbcastner/memorpy", "keywords": "", "license": "BSD", "maintainer": "", "maintainer_email": "rbcastner@gmail.com", "name": "memorpy3", "package_url": "https://pypi.org/project/memorpy3/", "platform": "Windows", "project_url": "https://pypi.org/project/memorpy3/", "project_urls": { "Homepage": "https://github.com/rbcastner/memorpy" }, "release_url": "https://pypi.org/project/memorpy3/2.0.2/", "requires_dist": null, "requires_python": "", "summary": "Python 3 port of the memorypy library using ctypes to search/edit windows programs memory", "version": "2.0.2" }, "last_serial": 5543882, "releases": { "2.0.0": [ { "comment_text": "", "digests": { "md5": "fa4b440f01873556b00a6e3399fb4644", "sha256": "bb103f66f81222072b574aaa0e7c7cba9c01d91dd5baf94ab6904e285701cdc6" }, "downloads": -1, "filename": "memorpy3-2.0.0.tar.gz", "has_sig": false, "md5_digest": "fa4b440f01873556b00a6e3399fb4644", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14869, "upload_time": "2019-07-17T02:55:26", "url": "https://files.pythonhosted.org/packages/10/75/cfa2b828938dfa6c07e5b2a0a893db0873db9fe570ae5dc827f2654d419c/memorpy3-2.0.0.tar.gz" } ], "2.0.1": [ { "comment_text": "", "digests": { "md5": "245be888994b4cd97b33be7cf291db35", "sha256": "98df409689953989eb080f82f0079b55a4ea9058e2c6e40fbccaefd247477e2f" }, "downloads": -1, "filename": "memorpy3-2.0.1.tar.gz", "has_sig": false, "md5_digest": "245be888994b4cd97b33be7cf291db35", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14958, "upload_time": "2019-07-17T03:30:35", "url": "https://files.pythonhosted.org/packages/cf/59/0cb4c77d45867d07b01f828ee31d3711ce3cddb8099e417ff8cab617a3d3/memorpy3-2.0.1.tar.gz" } ], "2.0.2": [ { "comment_text": "", "digests": { "md5": "0743d6d4271ffaf5d8ff1e1aa8be81b9", "sha256": "4276457d35990a811b31d76a7cf878cb54ee741847097d94e26fbe0b78fb9e85" }, "downloads": -1, "filename": "memorpy3-2.0.2.tar.gz", "has_sig": false, "md5_digest": "0743d6d4271ffaf5d8ff1e1aa8be81b9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14614, "upload_time": "2019-07-17T03:50:06", "url": "https://files.pythonhosted.org/packages/7a/be/7dbccc8eaa004f65c4b4d90e85144d14d798e2ef10fd506fb8090d985b6c/memorpy3-2.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0743d6d4271ffaf5d8ff1e1aa8be81b9", "sha256": "4276457d35990a811b31d76a7cf878cb54ee741847097d94e26fbe0b78fb9e85" }, "downloads": -1, "filename": "memorpy3-2.0.2.tar.gz", "has_sig": false, "md5_digest": "0743d6d4271ffaf5d8ff1e1aa8be81b9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14614, "upload_time": "2019-07-17T03:50:06", "url": "https://files.pythonhosted.org/packages/7a/be/7dbccc8eaa004f65c4b4d90e85144d14d798e2ef10fd506fb8090d985b6c/memorpy3-2.0.2.tar.gz" } ] }