Closed codyprime closed 2 years ago
lgtm
Hi @codyprime, thanks for this, it will be super helpful. Is there a reason why this has been merged to a feature branch and not to master? Could it be ported to master?
Hi @codyprime, thanks for this, it will be super helpful. Is there a reason why this has been merged to a feature branch and not to master? Could it be ported to master?
Hi! The reason for the feature branch was because A) I was using the feature branch :) and B) That enabled some volume testing.
I've cherry-picked the commit and created a PR on the master
branch: https://github.com/zmap/zgrab2/pull/349
The golang textproto library does a few things when parsing the HTTP headers:
This all makes sense when parsing HTTP, but for a scanner some may want to have the exact headers, to match on order, non-canonical keys, etc.
This adds that option, if '--raw-headers' is specified during an HTTP scan. This is accomplished by implementing a tee reader on the pconn interface, that tees before the bufio reader is put in place. The tee copy can be disabled once the headers have been read, so as to not waste memory while consuming the HTTP body.
How to Test
stdout output should look like: