phage-nz/ph0neutria

Still Issue with run.py

msinghal95 opened this issue · 11 comments

I did the pull request and made appropriate to the config files, when i ran it gave me this error:
root@ubuntu:/opt/ph0neutria# sudo -H -u spider python3 run.py
Traceback (most recent call last):
File "/usr/lib/python3.6/configparser.py", line 1138, in _unify_values
sectiondict = self._sections[section]
KeyError: 'Core'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "run.py", line 3, in
from core.core_utils import start_core
File "/opt/ph0neutria/core/core_utils.py", line 5, in
from .malware_utils import get_malware_urls, queue_malware_list
File "/opt/ph0neutria/core/malware_utils.py", line 4, in
from .file_utils import profile_url_file, clean_up
File "/opt/ph0neutria/core/file_utils.py", line 4, in
from .crypto_utils import hash_file, random_string
File "/opt/ph0neutria/core/crypto_utils.py", line 16, in
BASECONFIG = get_base_config(ROOTDIR)
File "/opt/ph0neutria/core/config_utils.py", line 127, in get_base_config
user_agent = parser.get('Core', 'useragent')
File "/usr/lib/python3.6/configparser.py", line 781, in get
d = self._unify_values(section, vars)
File "/usr/lib/python3.6/configparser.py", line 1141, in _unify_values
raise NoSectionError(section)
configparser.NoSectionError: No section: 'Core'

I am not sure what to do, please help

If you look at your config file (should be under /opt/ph0neutria/core/config/settings.conf) does it have a [Core] section as you see in: https://github.com/phage-nz/ph0neutria/blob/master/core/config/settings.conf.dist (line 1).

I've done a fresh install of this on a new Ubuntu 16.04.5 server and am unable to reproduce what you're experiencing.

I installed the Ubuntu 16.04.5 and then tried to ran it as the root and when i was doing it i got error in viper itself:
Traceback (most recent call last):
File "viper-web", line 21, in
import django #noqa
ImportError : No module named 'django'

I installed django and then tried to ran it and it was still giving me the same error. If it is possible ca n you please send me the ubuntu 16.04.5 that you are using so that i can just run it? Also i am doing the above as the root and not at the user, so whenever i login i do sudo su command and then do it.

Did you read the readme and use the suppied installation script? install.sh can be found in the root of the project - as explained in the readme. Were there any errors when you ran the script? There should be no reason to install django manually. Line 34 of install.sh installs the Python dependencies of Viper.

I am not sending you a copy of my VM.

If you have anything else to report, please ensure that it is either a actual bug in the install script or ph0neutria itself and that you've read the documentation (and followed it accordingly).

Yes, I read and used the installation script that was provided you in the readme file. There was were no issues in when i ran all those three of the installation script. The issue that i am facing is the one that i posted regarding django. I also performed the git pull so that i have the newest verion.

When reinstalling django, ensure to use pip3 and not pip... otherwise it'll install it for Python 2.7.

I'd recommend manually installing each of the dependency sets for Viper:

cd /opt/viper
sudo pip3 install -r requirements-base.txt
sudo pip3 install -r requirements-modules.txt
sudo pip3 install -r requirements-web.txt

Then try start viper-web (ensuring you use python3).

Thanks for giving me the instructions i am successfully able to run the viper. However when i was running the ph0neutria i am still getting the error regards to the core which i pointed out in the first issue. I changed all the config files and the plugins file with my api keys that i created. I also checked whether the settings.conf.dist has core section or not but it has that.

Rename settings.conf.dist to settings.conf

After doing that i got this
Traceback (most recent call last):
File "run.py", line 3, in
from core.core_utils import start_core
File "/opt/ph0neutria/core/core_utils.py", line 5, in
from .malware_utils import get_malware_urls, queue_malware_list
File "/opt/ph0neutria/core/malware_utils.py", line 13, in
import jsonpickle
ImportError: No module named 'jsonpickle'

I installed jsonpickle and then tried to execute it still the same error.

OK, that does look to be missing from my requirements.txt!

Please ensure that you install it using:

sudo pip3 install jsonpickle

(although it's actually not required for this version, but will be in a future release)

Thanks Chris for the help. I am finally able to run it properly

Great. Feel free to raise another Issue if you run into any more problems or have suggestions on how the installation could be improved.