73 views
Skip to first unread message

مصيافية أسدية

unread,
Apr 24, 2021, 6:02:30 AM4/24/21
to modern-hon...@googlegroups.com
I can't install mhn server ..is there any thing i have to do before installing it?
When I run ./install.sh I have These  Errors: 

(١)The directory '/home/osboxes/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/osboxes/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.

0

This worked for me:

$ sudo chown -R root /home/$USERNAME/.cache/pip/
$ sudo chown -R root /home/$USERNAME/.cache/pip/http/

Note: Use this way only if you always use pip as root. Otherwise pip may not use the cache directories since they are owned by root

(٢)DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Collecting virtualenv




  (٣)WARNING: Generating metadata for package hpfeeds-dev produced metadata for project name hpfeeds-threatstream. Fix your #egg=hpfeeds-dev fragments.




(٤) WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)",)': /simple/sphinxcontrib-httpdomain/





(٥)  Cloning https://github.com/threatstream/hpfeeds/ to ./env/src/hpfeeds-dev
  Running command git clone -q https://github.com/threatstream/hpfeeds/ /opt/mnemosyne/env/src/hpfeeds-dev
  WARNING: Generating metadata for package hpfeeds-dev produced metadata for project name hpfeeds-threatstream. Fix your #egg=hpfeeds-dev fragments.
Collecting Sphinx==1.2.3
  Downloading Sphinx-1.2.3-py2-none-any.whl (1.9 MB)
     |████████████████████████████████| 1.9 MB 29 kB/s 
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)",)': /simple/sphinxcontrib-httpdomain/
Server base url ["http://185.92.90.49"]: 
Honeymap url ["http://185.92.90.49:3000"]: 




(٦)Initializing database, please be patient. This can take several minutes
+ python initdatabase.py
Traceback (most recent call last):
  File "initdatabase.py", line 5, in <module>
    create_clean_db()
  File "/opt/mhn/server/mhn/__init__.py", line 116, in create_clean_db
    db.create_all()
  File "/opt/mhn/env/lib/python2.7/site-packages/flask_sqlalchemy/__init__.py", line 963, in create_all
    self._execute_for_all_tables(app, bind, 'create_all')
  File "/opt/mhn/env/lib/python2.7/site-packages/flask_sqlalchemy/__init__.py", line 955, in _execute_for_all_tables
    op(bind=self.get_engine(app, bind), **extra)
  File "/opt/mhn/env/lib/python2.7/site-packages/flask_sqlalchemy/__init__.py", line 896, in get_engine
    return connector.get_engine()
  File "/opt/mhn/env/lib/python2.7/site-packages/flask_sqlalchemy/__init__.py", line 556, in get_engine
    self._sa.apply_driver_hacks(self._app, info, options)
  File "/opt/mhn/env/lib/python2.7/site-packages/flask_sqlalchemy/__init__.py", line 861, in apply_driver_hacks
    info.database = os.path.join(app.root_path, info.database)
AttributeError: can't set attribute
Error: restart requires a process name
restart <name> Restart a process
restart <gname>:* Restart all processes in a group
restart <name> <name> Restart multiple processes or groups
restart all Restart all processes
Note: restart does not reread config files. For that, see reread and update.
.........
 How will i fix that ?????

Kenin Kenji

unread,
May 3, 2021, 6:09:10 PM5/3/21
to Modern Honey Network
You need to change the requirements.txt in mhn/server/ 
version of Flask-SQLAlchemy to 2.5.1

Emerson Oliveira

unread,
May 3, 2021, 10:12:54 PM5/3/21
to Modern Honey Network

Follow this

MHN Install: (Only in Ubuntu 18.04)

 

# cd /opt/

# sudo git clone https://github.com/pwnlandia/mhn.git

# sudo vi /opt/mhn/server/requirements.txt

set Flask-SQLAlchemy==2.5.1

# cd /opt/mhn

# sudo chmod +x ./install.sh

# sudo ./install.sh

 

===========================================================

MHN Configuration

===========================================================

Do you wish to run in Debug mode?: y/n n

Superuser email: YOUR_...@YOURSITE.COM

Superuser password:

Server base url ["http://IP"]:

Honeymap url ["http://IP:3000"]:

Mail server address ["localhost"]:

Mail server port [25]:

Use TLS for email?: y/n n

Use SSL for email?: y/n n

Mail server username [""]:

Mail server password [""]:

Mail default sender [""]:

Path for log file ["mhn.log"]:

 

Tshooting

sudo systemctl start mongodb

sudo supervisorctl status

 

expecty see like this:

geoloc                           RUNNING    pid 16719, uptime 1:25:31

honeymap                         RUNNING    pid 17223, uptime 0:30:29

hpfeeds-broker                   RUNNING    pid 980, uptime 10 days, 5:19:51

mhn-celery-beat                  RUNNING    pid 961, uptime 10 days, 5:19:51

mhn-celery-worker                RUNNING    pid 14878, uptime 3:44:43

mhn-uwsgi                        RUNNING    pid 9580, uptime 9 days, 3:46:32

mnemosyne                        RUNNING    pid 17749, uptime 0:05:26

 

if necessary (Restart services):

sudo supervisorctl restart all

Gagarin Ura

unread,
Sep 13, 2023, 8:37:59 PM9/13/23
to Modern Honey Network
Hi ! Could you help to fix it>

  Downloading kumo-0.2.tar.gz (2.2 kB)
Obtaining hpfeeds-dev from git+https://github.com/threatstream/hpfeeds/#egg=hpfeeds-dev (from -r requirements.txt (line 12))

  Cloning https://github.com/threatstream/hpfeeds/ to ./env/src/hpfeeds-dev
  Running command git clone -q https://github.com/threatstream/hpfeeds/ /opt/mnemosyne/env/src/hpfeeds-dev
Username for 'https://github.com':

pip install hpfeeds-threatstream-1.1.tar.gz

Modern Honey Network

unread,
Sep 19, 2023, 11:07:09 AM9/19/23
to Modern Honey Network
HI, I have fixed the bugs and posted on my Github. Intentional errors were made in the code. If you have any questions, ask away. Just do the installation only in a different directory and if something went wrong, then delete the directory completely. and install again. The issue would be virtualization during installation, where you are not allowed to put other modules, to bind the client to content that does not meet GNU requirements.

khose alrayyes

unread,
Sep 26, 2023, 6:04:20 PM9/26/23
to modern-hon...@googlegroups.com
Hello,
I kindly request assistance in resolving this issue.
When I install the MHN server, I encounter a problem where the page "threatstream/hpfeed" is not found.
I am using the MHN server for a project related to obtaining a degree in Information Technology, and it is absolutely essential for me to use it.
I appreciate your help and understanding.
Reply all
Reply to author
Forward
0 new messages