viper-framework / viper

Binary analysis and management framework
Other
1.54k stars 353 forks source link

Unable to launch Viper #792

Closed izm1chael closed 3 years ago

izm1chael commented 3 years ago
Traceback (most recent call last):
  File "/home/mike/.local/bin/viper", line 8, in <module>
    sys.exit(main())
  File "/home/mike/.local/lib/python3.5/site-packages/viper/core/ui/main.py", line 47, in main
    c = console.Console()
  File "/home/mike/.local/lib/python3.5/site-packages/viper/core/ui/console.py", line 74, in __init__
    self.cmd = Commands()
  File "/home/mike/.local/lib/python3.5/site-packages/viper/core/ui/commands.py", line 15, in __init__
    self.commands = load_commands()
  File "/home/mike/.local/lib/python3.5/site-packages/viper/core/plugins.py", line 33, in load_commands
    cmd_module = importlib.import_module(cmd_name)
  File "/usr/lib/python3.5/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 986, in _gcd_import
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 661, in exec_module
  File "<frozen importlib._bootstrap_external>", line 767, in get_code
  File "<frozen importlib._bootstrap_external>", line 727, in source_to_code
  File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
  File "/home/mike/.local/lib/python3.5/site-packages/viper/core/ui/cmd/update-modules.py", line 29
    self.log("info", f'Module path: {dot_viper_modules}')
                                                       ^
SyntaxError: invalid syntax

Fresh install on Ubuntu 16.04 following steps on the Docs,

Does anyone have any way around this?

VenturiniGiacomo commented 3 years ago

Try editing the file "/home/mike/.local/lib/python3.5/site-packages/viper/core/ui/cmd/update-modules.py" at line 29 with

self.log("info", 'Module path: {dot_viper_modules}')

botherder commented 3 years ago

The syntax is correct. You need Python 3.6 to run this properly, but you are still on Python 3.5.

VenturiniGiacomo commented 3 years ago

What means "f"? in original line 29? self.log("info", f'Module path: {dot_viper_modules}')

botherder commented 3 years ago

It's Python 3.6+ new string formatting standard.