-
Notifications
You must be signed in to change notification settings - Fork 744
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new HookSwitch hook type #1500
base: dev
Are you sure you want to change the base?
Conversation
Hello everyone! While using My idea for this use case is to add a new The name of the hook itself wasn't well thought so feel free to recommend a new one if needed, same for the documentation that I added. Cheers :) |
Hi, Welcome to Qiling Framework. I guess for this case we also need a test to make sure everything runs properly. (Current version of Unicorn is still broken and we are still fixing it) |
Hey! Thanks for replying! I don't mind adding a test or two. Should I expand this test to also include the new hook? Line 34 in 9a78d18
|
This is indeed an interesting idea, but let me suggest another view to this. Consider something similar to this: @toggle_hook(on=0x1000, off=0x2000)
def my_hook(ql: Qiling, *args):
... |
I like the idea! Should I just give it a try or do you have already some requirements or some idea on how it should interact with the other types of hooks? |
I didn't think it through, maybe a code hook is always required (otherwise, how can we tell when to toggle it on or off?) Please go ahead and implement what you think is useful. Consider placing that in the "extensions" folder as this is still experimental. |
Hey! Sorry for the late reply, it has been a busy month. It is not very clear to me how I would be able to move the implementation to the "extensions" folder. The hooks are declared functions of the class
If you have better recommendations pls let me know :) |
Checklist
Which kind of PR do you create?
Coding convention?
Extra tests?
Changelog?
Target branch?
One last thing