Nerixyz / instagram_mqtt

Realtime and Push Notification (FBNS) support for the instagram-private-api
MIT License
244 stars 49 forks source link

Remove new line symbols #64

Open ghost opened 3 years ago

ghost commented 3 years ago

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.

Nerixyz commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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.