Add adaptor-ip support to servers [test-code] - #92
Open
Jhangju wants to merge 2 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add --adaptor-ip support to allow binding honeypots to a specific interface [test-code]
Description:
This pull request introduces support for an optional --adaptor-ip argument, enabling honeypot servers to bind to a specified network interface or IP address instead of the default. The change touches multiple server implementations to ensure consistent behavior across protocols.
Changes
Server initialization logic updated to read the adaptor_ip parameter when provided. Adjustments made across relevant modules so that the option applies uniformly to all supported services.
To Test
honeypots --setup http:2222 --adaptor-ip 192.168.1.129 --ip 192.168.1.129
Outcome will only come from one adaptor, because the server will only run one adaptor.
root@heonypot:/opt/honey/updated/honeypots# python3 -m honeypots --setup http:2222 --adaptor-ip 192.168.1.129 --ip 192.168.1.129
[INFO] For updates, check https://github.com/qeeqbox/honeypots
[INFO] Use [Enter] to exit or python3 -m honeypots --kill
[INFO] Parsing honeypot [normal]
{"action": "process", "dest_ip": "192.168.1.129", "dest_port": "2222", "server": "http_server", "src_ip": "192.168.1.129", "src_port": "2222", "status": "success", "timestamp": "2025-12-03T11:53:43.940244"}
[INFO] servers http running...
[INFO] Everything looks good!
{"action": "connection", "dest_ip": "192.168.1.129", "dest_port": "2222", "server": "http_server", "src_ip": "192.168.1.177", "src_port": "47634", "timestamp": "2025-12-03T11:53:53.647580"}
{"action": "GET", "dest_ip": "192.168.1.129", "dest_port": "2222", "server": "http_server", "src_ip": "192.168.1.177", "src_port": "47634", "timestamp": "2025-12-03T11:53:53.647764"}