Make banner read options configurable via CLI #468
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.
Currently the
banner
module waits 10ms before closing connection. In my use case an XMPP server sends an initial response immediately and some additional data after a delay of about 300ms. Withnetcat
we get the full response (note the<stream:features>
at the end)while with
zgrab2
we get only the initial response:In both cases the following request was sent:
The proposed change introduces a new command line flag
--read-timeout
, which allows to change the default read timeout:Since
banner
module is a generic way to handle protocols not already built intozgrab2
, I though that it makes sense to make other read options configurable as well. Namely, in addition to--read-timeout
, this PR introduces options--buffer-size
and--max-read-size
. Relevant part ofzgrab2 banner --help
:Default values are kept the same, so this should not have unintended side effects.