Skip to content

Remove new line symbols#64

Open
ghost wants to merge 1 commit into
masterfrom
unknown repository
Open

Remove new line symbols#64
ghost wants to merge 1 commit into
masterfrom
unknown repository

Conversation

@ghost

@ghost ghost commented Feb 18, 2021

Copy link
Copy Markdown

Using "\n" produces the following error on my side:

Traceback (most recent call last):
  File "C:\Users\Enrique\Desktop\A\script.py", line 99, in <module>
    script = session.create_script(js)
  File "C:\Program Files (x86)\Python39-32\lib\site-packages\frida\core.py", line 26, in wrapper
    return f(*args, **kwargs)
  File "C:\Program Files (x86)\Python39-32\lib\site-packages\frida\core.py", line 204, in create_script
    return Script(self._impl.create_script(*args, **kwargs))
frida.InvalidArgumentError: script(line 44): SyntaxError: unexpected end of string

I'm using Frida v14.2.12. This pull request fixes the issue.

Using "\n" throws SyntaxError: Unexpected end of string
@Nerixyz

Nerixyz commented Feb 18, 2021

Copy link
Copy Markdown
Owner

Are you sure you've escaped the script correctly when loading it from python? It's supposed to be run through the frida cli.

@ghost

ghost commented Feb 18, 2021

Copy link
Copy Markdown
Author

Probably not, as it does run fine on the Frida CLI. However, this pull allows the script to be loaded from Python without having to worry about escaping chars (makes life easier).

@Nerixyz

Nerixyz commented Feb 18, 2021

Copy link
Copy Markdown
Owner

this pull allows the script to be loaded from Python without having to worry about escaping chars

At least in JetBrains IDEs this is done for you so you don't need to worry about escaping. Also, there should be a way of loading a file and executing the script this way.

@ghost ghost left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[](

url


)

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.

1 participant