Python-Honeypot
Python-Honeypot copied to clipboard
fix - kill network capture process if any container is killed
Description
Fix network thread issue
Issue is 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.
Steps to Reproduce
# run the command below
$ sudo python3 ohp.py -m ftp/weak_password,ftp/strong_password --store-pcap
# wait until network capture process starts
# on new terminal run the command below
$ docker kill ohp_ftpserver_strong_password
# on the terminal where you started the capture process it will not end but it should.
Related Issue
#359
Screenshots (if appropriate):


Types of changes
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] Other
Checklist
- [x] I have followed the Contributor Guidelines.
- [x] The code has been thoroughly tested in my local development environment with flake8 and pylint.
- [x] The code is Python 3 compatible.
- [x] The code follows the PEP8 styling guidelines with 4 spaces indentation.
- [x] This Pull Request relates to only one issue or only one feature
- [x] I have referenced the corresponding issue number in my commit message
- [x] I have added the relevant documentation.
- [x] My branch is up-to-date with the Upstream master branch.