windows - Hooking Python code using Detours -
i built simple python gui application("app.py") trying hook using detours. understanding python should use windows dll's @ point , trying hook these function calls.
for purpose using detours withdll.exe :
withdll.exe /d:"mydll.dll" "myprogram.exe"
because withdll.exe doesn't accept running program arguments ("python.exe app.py"), tried creating bat file starter.bat follows:
cd appdir python app.py
and running:
withdll.exe /d:"mydll.dll" "starter.bat"
however approach hooks background cmd process.
is there workaround make detours hook python.exe process of script ?
i looked through detours withdll.exe source code , found out can take command line arguments, issue solved using:
withdll.exe /d:"mydll.dll" "pathtopython/python.exe" "pathtoscript/myscript.py"
Comments
Post a Comment