sensepost / objection

📱 objection - runtime mobile exploration
GNU General Public License v3.0
7.42k stars 852 forks source link

Cannot launch objection on Python3.7 and Mobexler #574

Closed miakushka closed 1 year ago

miakushka commented 1 year ago

Good day!

An exception is thrown when I try to use objection with Python3.7 on Mobexler machine:

 Mobexler@Mobexler  ~  objection                                                                 ✔  867  15:20:12 
Traceback (most recent call last):
  File "/home/mobexler/.local/bin/objection", line 5, in <module>
    from objection.console.cli import cli
  File "/home/mobexler/.local/lib/python3.7/site-packages/objection/console/cli.py", line 8, in <module>
    from .repl import Repl
  File "/home/mobexler/.local/lib/python3.7/site-packages/objection/console/repl.py", line 6, in <module>
    import delegator
  File "/home/mobexler/.local/lib/python3.7/site-packages/delegator.py", line 9, in <module>
    from pexpect.popen_spawn import PopenSpawn
  File "/usr/lib/python3/dist-packages/pexpect/__init__.py", line 75, in <module>
    from .pty_spawn import spawn, spawnu
  File "/usr/lib/python3/dist-packages/pexpect/pty_spawn.py", line 14, in <module>
    from .spawnbase import SpawnBase
  File "/usr/lib/python3/dist-packages/pexpect/spawnbase.py", line 224
    def expect(self, pattern, timeout=-1, searchwindowsize=-1, async=False):
                                                                   ^
SyntaxError: invalid syntax

Any ideas on how can I fix this?

Thank you in advance!

miakushka commented 1 year ago

Unfortunately, the latest Frida (16.0.1) cannot be used on Python 3.6 or lower, so I had to switch to Python3.7.

miakushka commented 1 year ago

Solved by updating "requests" and "pexpect" to the latest version.