-
Notifications
You must be signed in to change notification settings - Fork 807
2216 tcp relay #2289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
2216 tcp relay #2289
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
'-' to 'infection-monkey-relay-control-message: -'
Add get_potential_users and remove pipe handling
Integrate TCPConnectionHandler and RelayUserHandler into TCPRelay Remove TCPProxy
If there's an uncaught error in the thread, the error won't propagate to the caller and we wouldn't know what went wrong from the logs. This fixes things and all uncaught errors get logged
If we were unsuccessful in starting the pipe, we don't want to sit around and wait for a relay user to connect.
sock.recv takes two parameters instead of one
run() blocks, start() starts the run method on a different thread.
When a socket is closed, select.select() returns the socket in the read_list. A closed socket can be detected by attempting to read from it. If 0 data is read, then the socket is closed. See below for more details: > If a socket is in the output readable list, you can be as-close-to-certain-as-we-ever-get-in-this-business that a recv on that socket will return something. https://docs.python.org/3/howto/sockets.html#non-blocking-sockets https://stackoverflow.com/questions/17386487/python-detect-when-a-socket-disconnects-for-any-reason https://stackoverflow.com/questions/17705239/is-there-a-way-to-detect-that-tcp-socket-has-been-closed-by-the-remote-peer-wit
Co-authored-by: Kekoa Kaaikala <kekoa.kaaikala@gmail.com>
Agent: Add TCPPortSelector
2216 relay bb tests
Previously if the agent couldn't detect the OS, agent failed with errors
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.
What does this PR do?
Fixes #2216
Add any further explanations here.
PR Checklist
Testing Checklist