Coder Social home page Coder Social logo

pyinjector's Introduction

Reaction-diffusion & spectral lighting simulation, rendered on GPU with custom OpenGL shaders.

pyinjector's People

Contributors

kmaork 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  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

pyinjector's Issues

How to use?

(I'm on Linux)Whenever I type in pid as an existing process name, and path_to_so_file as an existing dll path, it says syntax error for the pid part. What am I doing wrong?

[Linux] Failure to inject.

lafont@lafont-G3-3579:~/Desktop/csgo/injector/linux-inject-master$ inject 26609 /home/lafont/Desktop/csgo/injector/linux_so_injector-master/libGOESP.so
Traceback (most recent call last):
  File "/home/lafont/.local/bin/inject", line 8, in <module>
    sys.exit(main())
  File "/home/lafont/.local/lib/python3.6/site-packages/pyinjector/__main__.py", line 15, in main
    inject(parsed_args.pid, parsed_args.library_path)
  File "/home/lafont/.local/lib/python3.6/site-packages/pyinjector/pyinjector.py", line 47, in inject
    injector = Injector.attach(pid)
  File "/home/lafont/.local/lib/python3.6/site-packages/pyinjector/pyinjector.py", line 33, in attach
    call_c_func(libinjector.injector_attach, byref(injector_p), pid)
  File "/home/lafont/.local/lib/python3.6/site-packages/pyinjector/pyinjector.py", line 22, in call_c_func
    assert ret == 0, '{} returned {}, see injector/include/injector.h'.format(func.__name__, ret)
AssertionError: injector_attach returned -8, see injector/include/injector.h

Help please

im getting a No Access error even when running it as administrator, and if i try to compile it to have my friend test it so see if its just a me issue it wont compile properly

Failure to inject on Mac

You may get this when trying to inject on Mac: pyinjector.api.MacUnknownInjectorError: injector_attach returned -1: TASK_FOR_PID error : (os/kern) failure
This should be resolved by rerunning as root. Please comment here if it doesn't solved the issue or if you need to be able to run without root. Please state how you installed pyinjector.

Could not find libc

Using pyinjector 1.0.5 with madbg 1.2.0, I get:

pyinjector.pyinjector.InjectorError: injector_attach returned -4: Could not find libc

attempting to attach to a Python program. This is on Linux 5.15.8.

undefined symbol: injector_attach

System is Debian GNU/Linux 10 (buster) running Python 3.7.3

Installed debugger as

apt install  --no-install-recommends python3-pip python3-setuptools python3-wheel python3-dev build-essential
python3 -m pip install madbg

I have this trace trying to attach:

# python3 -m madbg attach 18964
Traceback (most recent call last):
  File "/usr/lib/python3.7/runpy.py", line 183, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "/usr/lib/python3.7/runpy.py", line 142, in _get_module_details
    return _get_module_details(pkg_main_name, error)
  File "/usr/lib/python3.7/runpy.py", line 109, in _get_module_details
    __import__(pkg_name)
  File "/usr/local/lib/python3.7/dist-packages/madbg/__init__.py", line 1, in <module>
    from .api import set_trace, set_trace_on_connect, post_mortem, run_with_debugging, attach_to_process
  File "/usr/local/lib/python3.7/dist-packages/madbg/api.py", line 10, in <module>
    from hypno import inject_py
  File "/usr/local/lib/python3.7/dist-packages/hypno/__init__.py", line 1, in <module>
    from .hypno import inject_py
  File "/usr/local/lib/python3.7/dist-packages/hypno/hypno.py", line 4, in <module>
    from pyinjector import inject
  File "/usr/local/lib/python3.7/dist-packages/pyinjector/__init__.py", line 1, in <module>
    from .pyinjector import inject, LibraryNotFoundException
  File "/usr/local/lib/python3.7/dist-packages/pyinjector/pyinjector.py", line 13, in <module>
    libinjector.injector_attach.argtypes = POINTER(injector_pointer_t), pid_t
  File "/usr/lib/python3.7/ctypes/__init__.py", line 369, in __getattr__
    func = self.__getitem__(name)
  File "/usr/lib/python3.7/ctypes/__init__.py", line 374, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: /usr/local/lib/python3.7/dist-packages/pyinjector/libinjector.cpython-37m-x86_64-linux-gnu.so: undefined symbol: injector_attach

Question!

Hey I was wondering how strong this system really is? Can it inject into 64 bit processes for example? How stable is the api? Thank you for your answer and I can completly understand if you don't want to answer. :D

Impossible to compile with PyInstaller or Py2Exe

Hello,

I have been using your library and this is great work, but I am having an issue when trying to run my program once it's compiled to a Windows executable.

It compiles without errors with PyInstaller but this is what I get when I run it :

C:\Users\razen\PycharmProjects\RAT\dist>main.exe
Traceback (most recent call last):
  File "main.py", line 1, in <module>
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "PyInstaller\loader\pyimod03_importers.py", line 495, in exec_module
  File "pyinjector\__init__.py", line 1, in <module>
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "PyInstaller\loader\pyimod03_importers.py", line 495, in exec_module
  File "pyinjector\pyinjector.py", line 6, in <module>
AttributeError: 'NoneType' object has no attribute 'origin'
[12032] Failed to execute script 'main' due to unhandled exception!

This is what I get when running the executable from Py2Exe :

C:\Users\razen\PycharmProjects\RAT\dist>main.exe
Traceback (most recent call last):
  File "main.py", line 1, in <module>
  File "<frozen zipimport>", line 259, in load_module
  File "pyinjector\__init__.pyc", line 1, in <module>
  File "<frozen zipimport>", line 259, in load_module
  File "pyinjector\pyinjector.pyc", line 6, in <module>
  File "importlib\util.pyc", line 90, in find_spec
  File "importlib\util.pyc", line 32, in resolve_name
ImportError: no package specified for '.libinjector' (required for relative module names)

This one goes further and it seems like it is an import issue.

I read somewhere that those compilers can only import libraries using the "import" command.

I also see that you import ".libinjector" another way :

libinjector_path = find_spec('.libinjector', __package__).origin

And this is probably what's causing the issue.

Is there any possible fix ?

Thanks !

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.