frida-compile icon indicating copy to clipboard operation
frida-compile copied to clipboard

Python bindings does not load the script compiled

Open hillelpinto opened this issue 1 year ago • 2 comments

When compiling a full Frida JS module (4 scripts, almost each one needs to import an other one) with frida-compile, the outputted file can be loaded by executing: frida -l

But when trying to load it using frida in python by calling create_script() i get an error

frida.InvalidArgumentError: script(line 1): SyntaxError: unexpected character

How can i load the outputted script from frida-compile also in python ?

hillelpinto avatar Jul 20 '24 21:07 hillelpinto

as a workaround I set up npx webpack, this can be used by the python API

abwesend890 avatar Mar 19 '25 11:03 abwesend890

try something like this to load you script in python

js = open(path,'r',encoding="utf8",newline='\n').read()

wildsheepz avatar May 29 '25 20:05 wildsheepz