Giter Club home page Giter Club logo

jeanextreme002 / pymemoryeditor Goto Github PK

View Code? Open in Web Editor NEW
52.0 6.0 9.0 159 KB

:floppy_disk: Multi-platform library developed with ctypes for reading, writing and searching process memory, in a simple and friendly way with Python 3. The package supports Windows and Linux (32-bit and 64-bit).

Home Page: https://pypi.org/project/PyMemoryEditor/

License: MIT License

Python 100.00%
python3 ctypes winapi win32api writeprocessmemory memory process cheat debug scanning

pymemoryeditor's People

Contributors

jeanextreme002 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

pymemoryeditor's Issues

Issue when using pip

Hey there, I found your library and wanted to give it a shot. Sadly i get this error when i try to install it with pip.

Collecting PyMemoryEditor
  Using cached PyMemoryEditor-1.0.1.tar.gz (8.9 kB)
  Using cached PyMemoryEditor-1.0.0.tar.gz (8.8 kB)

C:\PythonScripts\venv\lib\site-packages\secretstorage\dhcrypto.py:16: CryptographyDeprecationWarning: int_from_bytes is deprecated, use int.from_bytes instead
  from cryptography.utils import int_from_bytes
C:\PythonScripts\venv\lib\site-packages\secretstorage\util.py:25: CryptographyDeprecationWarning: int_from_bytes is deprecated, use int.from_bytes instead
  from cryptography.utils import int_from_bytes
    ERROR: Command errored out with exit status 1:
     command: 'C:\PythonScripts\venv\Scripts\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Stephan\\AppData\\Local\\Temp\\pip-install-gqj_swgx\\pymemoryeditor_050413fbc9c7458a9b65714938878af2\\setup.py'"'"'; __file__='"'"'C:\\Users\\Stephan\\AppData\\Local\\Temp\\pip-install-gqj_swgx\\pymemoryeditor_050413fbc9c7458a9b65714938878af2\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\Stephan\AppData\Local\Temp\pip-pip-egg-info-ooyckyr2'
         cwd: C:\Users\Stephan\AppData\Local\Temp\pip-install-gqj_swgx\pymemoryeditor_050413fbc9c7458a9b65714938878af2\
    Complete output (11 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\Stephan\AppData\Local\Temp\pip-install-gqj_swgx\pymemoryeditor_050413fbc9c7458a9b65714938878af2\setup.py", line 3, in <module>
        from PyMemoryEditor import __version__
      File "C:\Users\Stephan\AppData\Local\Temp\pip-install-gqj_swgx\pymemoryeditor_050413fbc9c7458a9b65714938878af2\PyMemoryEditor\__init__.py", line 11, in <module>
        from .process import Process
      File "C:\Users\Stephan\AppData\Local\Temp\pip-install-gqj_swgx\pymemoryeditor_050413fbc9c7458a9b65714938878af2\PyMemoryEditor\process\__init__.py", line 4, in <module>
        from .util import get_process_id_by_process_name, get_process_id_by_window_title, pid_exists
      File "C:\Users\Stephan\AppData\Local\Temp\pip-install-gqj_swgx\pymemoryeditor_050413fbc9c7458a9b65714938878af2\PyMemoryEditor\process\util.py", line 3, in <module>
        from win32gui import FindWindow
    ModuleNotFoundError: No module named 'win32gui'
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/74/81/5c8d3976b2848dd53ea727d223e5d4eab3eb006cdf416857d69fcf4b03c2/PyMemoryEditor-1.0.1.tar.gz#sha256=780317b41a217b08fadc9c676aa177f90ca86bdb5a930e73c1a8e9ce6ac147ea (from https://pypi.org/simple/pymemoryeditor/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
    ERROR: Command errored out with exit status 1:
     command: 'C:\PythonScripts\venv\Scripts\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Stephan\\AppData\\Local\\Temp\\pip-install-gqj_swgx\\pymemoryeditor_32ccc9919d69435085226baba88986be\\setup.py'"'"'; __file__='"'"'C:\\Users\\Stephan\\AppData\\Local\\Temp\\pip-install-gqj_swgx\\pymemoryeditor_32ccc9919d69435085226baba88986be\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\Stephan\AppData\Local\Temp\pip-pip-egg-info-du7jun_s'
         cwd: C:\Users\Stephan\AppData\Local\Temp\pip-install-gqj_swgx\pymemoryeditor_32ccc9919d69435085226baba88986be\
    Complete output (11 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\Stephan\AppData\Local\Temp\pip-install-gqj_swgx\pymemoryeditor_32ccc9919d69435085226baba88986be\setup.py", line 3, in <module>
        from PyMemoryEditor import __version__
      File "C:\Users\Stephan\AppData\Local\Temp\pip-install-gqj_swgx\pymemoryeditor_32ccc9919d69435085226baba88986be\PyMemoryEditor\__init__.py", line 11, in <module>
        from .process import Process
      File "C:\Users\Stephan\AppData\Local\Temp\pip-install-gqj_swgx\pymemoryeditor_32ccc9919d69435085226baba88986be\PyMemoryEditor\process\__init__.py", line 4, in <module>
        from .util import get_process_id_by_process_name, get_process_id_by_window_title, pid_exists
      File "C:\Users\Stephan\AppData\Local\Temp\pip-install-gqj_swgx\pymemoryeditor_32ccc9919d69435085226baba88986be\PyMemoryEditor\process\util.py", line 3, in <module>
        from win32gui import FindWindow
    ModuleNotFoundError: No module named 'win32gui'
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/1d/8f/5f7aa65f0ad10fdc93e76075922d4c6e92100a763eb0a7237f06ef74d646/PyMemoryEditor-1.0.0.tar.gz#sha256=7382f832841047a7707b96821224fb42a4f7c78cc0db35c4cea5240fe538b7d4 (from https://pypi.org/simple/pymemoryeditor/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement PyMemoryEditor
ERROR: No matching distribution found for PyMemoryEditor

Freeze script in search_by_value function

@JeanExtreme002, crackme.exe is Unreal Engine 5 application

try:
  with OpenProcess(process_name = "crackme.exe") as p:
    for addr in p.search_by_value(str, len(target), target, ScanTypesEnum.EXACT_VALUE):
        value = p.read_process_memory(addr, str, len(target))

        new = value.replace(target, replacet)

        print("Found at: 0x{0} {1} {2} {3}".format(str(addr), value, "->", new))

        size = len(target)

        p.write_process_memory(addr, str, size, new)
except Exception as e:
    print(e)
Traceback (most recent call last):
  File "C:\Users\NUMAiei\Downloads\WindowsNoEditor\Binaries\Win64\crack.py", line 33, in <module>
    replace(p, sqlt, rsqlt)
  File "C:\Users\NUMAiei\Downloads\WindowsNoEditor\Binaries\Win64\crack.py", line 8, in replace
    for addr in p.search_by_value(str, len(target), target, ScanTypesEnum.EXACT_VALUE):
  File "C:\Python312\Lib\site-packages\PyMemoryEditor\win32\functions.py", line 199, in SearchAddressesByValue
    for offset in searching_method(region_data, size, target_value_bytes, bufflength, scan_type, pytype is str):
  File "C:\Python312\Lib\site-packages\PyMemoryEditor\util\scan.py", line 27, in scan_memory_for_exact_value
    for found_index in searcher.search(memory_region_data, memory_region_data_size):
  File "C:\Python312\Lib\site-packages\PyMemoryEditor\util\search\kmp.py", line 45, in search
    if offset == self.__pattern_length:
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyboardInterrupt

CrySearch GUI working is great. I think I understand why this is so, he uses other WinAPI methods to bypass antiVMA (virtual memory access)

Pip Install missing Module

Hey, I'm having trouble to find a recent python library that reads memory... and finally found yours :)
But when I try to install it with pip as instructed in the readme, I get a big error that resumes in "ModuleNotFoundError: No module named 'psutil'". Hope it can get fixed soon! ty

Full Stacktrace:

"ERROR: Command errored out with exit status 1:
     command: 'c:\users\caioc\appdata\local\programs\python\python39\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\caioc\\AppData\\Local\\Temp\\pip-install-hglfu2zq\\pymemoryeditor_a167eaa3425c468d8cf90f12fc053e8c\\setup.py'"'"'; __file__='"'"'C:\\Users\\caioc\\AppData\\Local\\Temp\\pip-install-hglfu2zq\\pymemoryeditor_a167eaa3425c468d8cf90f12fc053e8c\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\caioc\AppData\Local\Temp\pip-pip-egg-info-gubp11kt'
         cwd: C:\Users\caioc\AppData\Local\Temp\pip-install-hglfu2zq\pymemoryeditor_a167eaa3425c468d8cf90f12fc053e8c\
    Complete output (11 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\caioc\AppData\Local\Temp\pip-install-hglfu2zq\pymemoryeditor_a167eaa3425c468d8cf90f12fc053e8c\setup.py", line 3, in <module>
        from PyMemoryEditor import __version__
      File "C:\Users\caioc\AppData\Local\Temp\pip-install-hglfu2zq\pymemoryeditor_a167eaa3425c468d8cf90f12fc053e8c\PyMemoryEditor\__init__.py", line 11, in <module>
        from .process import Process
      File "C:\Users\caioc\AppData\Local\Temp\pip-install-hglfu2zq\pymemoryeditor_a167eaa3425c468d8cf90f12fc053e8c\PyMemoryEditor\process\__init__.py", line 4, in <module>
        from .util import get_process_id_by_process_name, get_process_id_by_window_title, pid_exists
      File "C:\Users\caioc\AppData\Local\Temp\pip-install-hglfu2zq\pymemoryeditor_a167eaa3425c468d8cf90f12fc053e8c\PyMemoryEditor\process\util.py", line 5, in <module>
        import psutil
    ModuleNotFoundError: No module named 'psutil'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output."

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.