Skip to content
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

fix: when hooking a constructor with Frida, call $new instead of `$… #1605

Merged
merged 1 commit into from
Aug 6, 2022

Conversation

Areizen
Copy link
Contributor

@Areizen Areizen commented Aug 6, 2022

Description

Fix the javascript generated by Frida action that, in case of a constructor, generate a call to $init instead of $new to instantiate the object.

…init`. `$init` cannot be used to instantiate an object and is reserved for hooking$
@skylot
Copy link
Owner

skylot commented Aug 6, 2022

@Areizen thanks!
Do I understand correctly that $init is also work, but $new is just more correct (i.e. create object instead of hooking constructor)?

@Areizen
Copy link
Contributor Author

Areizen commented Aug 6, 2022

In fact $init cannot be called, it result in an error. It is only used as a keyword to hook the constructor. The method that can be used to instantiate an object is another keyword $new which can be called (but not hooked).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants