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

Exception: InvalidArgumentError: malformed package #235

Open
monkeywave opened this issue Jun 25, 2023 · 0 comments
Open

Exception: InvalidArgumentError: malformed package #235

monkeywave opened this issue Jun 25, 2023 · 0 comments

Comments

@monkeywave
Copy link

Hi,

what is the intended way to change a value provided through Python to the JavaScript part?

Currently when I'm replacing a boolean value (provided through the terminal interface) I get the following error message:

Exception type : InvalidArgumentError 
Exception message : malformed package
Stack trace : ['File : /friTap/friTap.py , Line : 480, Func.Name : main, Message : ssl_log(parsed.exec, parsed.pcap, parsed.verbose,', 'File : /friTap/friTap.py , Line : 368, Func.Name : ssl_log, Message : instrument(process)', 'File : /friTap/friTap.py , Line : 250, Func.Name : instrument, Message : script = process.create_script(script_string, runtime=runtime)', 'File : /home/monkeywave/.local/lib/python3.10/site-packages/frida/core.py , Line : 86, Func.Name : wrapper, Message : return f(*args, **kwargs)', 'File : /home/monkeywave/.local/lib/python3.10/site-packages/frida/core.py , Line : 628, Func.Name : create_script, Message : return Script(self._impl.create_script(source, **kwargs))  # type: ignore']

The replacement is done in Python with the following code:

if anti_root:
            script_string = script_string.replace('export let anti_root = false', "export let anti_root = true")
script = process.create_script(script_string, runtime=runtime)

The JavaScript code is generated from the TypeScript code by frida-compile.

Thx for your help

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

1 participant