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

throw new SyntaxError("unexpected character") when trying to load script compiled with frida-compile -c #487

Closed
dogtopus opened this issue May 10, 2023 · 4 comments

Comments

@dogtopus
Copy link

See title.

@trufae
Copy link
Member

trufae commented May 10, 2023

Can you explain what did you do?

is this happening just after building r2frida?
Are you trying to run a frida compiled script withon r2frida?
Which version of frida-compile are you using?
Can you share the steps to reproduce?
Did you tried using r2frida-compile instead?

@dogtopus
Copy link
Author

dogtopus commented May 10, 2023

is this happening just after building r2frida?

I believe yes.

Are you trying to run a frida compiled script withon r2frida?

Yes. Specifically using the frida-compile tool within an npm package that contains the agent. Similar to frida-agent-example.

Which version of frida-compile are you using?

16.1.9

Can you share the steps to reproduce?

Mostly just run frida-compile agent/index.ts -o _agent.js -c via npm and load with :. _agent.js right away in r2frida. This is also via remote connection to frida-server running on Windows if that makes any difference.

I can try to reproduce this with a minimal example but that might take a bit of time.

Did you tried using r2frida-compile instead?

No but I could try.

@trufae
Copy link
Member

trufae commented May 10, 2023

If i understood the issue properly this happens to me only on windows. Works fine on linux and mac. Its a known issue after updating to frida16 and iirc until 16.1.18 i wasnt able to build the agent in ubuntu20. And that same version also fixed the windows compilation using the pip's frida-compile.

i'll look into that next week, it's not clear to me where the bug is yet.

can you confirm the same behaviour? (Only happens on windows)

@trufae
Copy link
Member

trufae commented May 18, 2023

dupe of dupe of #444 (there are 5 issues about r2frida not working on windows) when thats a known issue and probably a bug in frida, i'm slowly investigating the issue but i didnt managed to find the reason why the compiled scripts are not parsed properly by frida inside r2frida.

@trufae trufae closed this as completed May 18, 2023
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

No branches or pull requests

2 participants