OWASP/Python-Honeypot

network thread issue

Ali-Razmjoo opened this issue · 2 comments

two issues

  1. network thread is not terminating after an error
    to reproduce the issue, run a module, and then kill the container with docker kill container_name. OHP is expected to exit from working and throw an error, but the network thread stays open and it's not terminating.

  2. when I press ctrl+c to terminate the module, pcap file is not submitted to the database.

2. when I press ctrl+c to terminate the module, pcap file is not submitted to the database.

For this will need to add

except KeyboardInterrupt:
# break and return for stopping and removing containers/images
info(messages["interrupted_by_user"])
break
code here to push the pcap files to Elasticsearch in case of interrupt

@Ali-Razmjoo, @dhirensr For issue 2, you must not have added the argument while running the containers.

sudo python3 ohp.py -m ftp/weak_password,ftp/strong_password --store-pcap

Add --store-pcap while starting the network capture process.