Closed NKITANAS closed 2 years ago
The pid is the process id, it is a number used as a unique identifier for your process. To find that number you can use various tools depending on your context, for example the ps
command.
Still doesn't work. Says syntax error. I'm using python 3, is that the problem?
Please comment your code and the exception you are getting
from pyinjector import inject inject(223144, "dllpath")
./main.py line 2: syntax error near unexpected token '223144'
./main.py line 2: inject(223144, "dllpath")
(dllpath is the path for the dll(It's in the same folder as the script))
Update: When I debug the script, it says exception has occurred: InjectorPermissionError
Sounds like you fixed the syntax error, now you can use the error message in the permission error to fix it.
After I followed the instructions, it says InjectorError injector_inject returned -5: dlopen failed
Are you giving it the correct path?
Yes, I tried to give it an invalid path, and it said invalid path in the debugger. In the terminal, however, it always said invalid path so I'm not sure.
I get it now. It sees the library but fails to open it. Any idea why?
You could try to load the so directly to see if it is valid. It might be compiled for a different architecture from the target process (e.g. 32/64 bit)
(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?