viper-framework / viper

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

Looking for config in the wrong location #744

Closed kscarlett closed 4 years ago

kscarlett commented 5 years ago

After finally being able to get viper to install, running viper-cli returns the following:

Traceback (most recent call last):
  File "/usr/local/bin/viper-cli", line 8, in <module>
    from viper.core.ui import console
  File "/usr/local/lib/python3.5/dist-packages/viper/core/ui/console.py", line 18, in <module>
    from viper.core.session import __sessions__
  File "/usr/local/lib/python3.5/dist-packages/viper/core/session.py", line 10, in <module>
    from viper.core.database import Database
  File "/usr/local/lib/python3.5/dist-packages/viper/core/database.py", line 22, in <module>
    from viper.core.storage import get_sample_path, store_sample
  File "/usr/local/lib/python3.5/dist-packages/viper/core/storage.py", line 8, in <module>
    from viper.core.project import __project__
  File "/usr/local/lib/python3.5/dist-packages/viper/core/project.py", line 10, in <module>
    from viper.core.config import __config__
  File "/usr/local/lib/python3.5/dist-packages/viper/core/config.py", line 190, in <module>
    __config__ = Config()
  File "/usr/local/lib/python3.5/dist-packages/viper/core/config.py", line 60, in __init__
    shutil.copy(cwd_viper, self.config_file)
  File "/usr/lib/python3.5/shutil.py", line 235, in copy
    copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "/usr/lib/python3.5/shutil.py", line 114, in copyfile
    with open(src, 'rb') as fsrc:
FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/lib/python3.5/dist-packages/viper.conf.sample'

It would seem it is trying to read the config file in the wrong location?

Environment:

kscarlett commented 5 years ago

I tried again today after reading through the code. It works as expected after creating viper.conf in ~/.viper/ manually.

I still feel like this is not intended or clear enough, so adding this to the documentation might be beneficial. I'll wait for a response first, since I don't know if creating this file manually is the expected way to do this, or whether this is something that's broken (I don't see why it was looking for the config in that location in the first place).

botherder commented 4 years ago

This is an installation issue. I'm closing this because the root cause is #766.