If the probe for SMB2 fails, close the connection and then try probing
for SMB1 as a backup.
Since there are more SMB2 servers in the wild, that is the first
attempt.
These two functions are largely duplicates, and only differ in the
boolean option passed to LoggedNegotiateProtocol(). Combine the
functions, and just take that option in as an argument to pass along.
Previous addition of GetTLSConfigForTarget (811eb38) did not modify
HTTP module to use SNI. This let to the very cryptic unknown-error:
remote error: internal error. Some servers give Fatal alerts when
they don't get an SNI extension. Discovered on a `Pagely-ARES/1.3.21`
Server
Some protocols may require more data than others. To accomodate those,
allow the BytesReadLimit to be changed by means of BaseFlags.
By setting BaseFlags.BytesReadLimit prior to calling .Open(), scanners
can override the default limit to one that is appropriate for the data
collected.
* Separate out isMaster and buildInfo commands
* Return results of both in separate sub-structs
* Include isMaster results regardless of whether buildInfo succeeds
* Generate static messages in Scanner Init()
* s/panic/log.Fatal/
* Remove unnecessary casting
* Use stack var and pass slice to avoid unnecessary alloc
* Correctly enables TLS only during retry grab when retry-tls flag is set.
* Fixes evaluation which caused too many arguments error in IPP integration test.
* Updates IPP zgrab2 schema to reflect storing all attributes in response.
* Adds Attributes member to ScanResults
* Ensures tryReadAttributes only reads attributes in the case of a postive detection. Cleans up isIPP
* Reads all attributes in IPP response
* Detects invalid length errors when reading IPP attributes.
* Returns the correct amount of uris, ipp versions, and cups versions in ScanResults.
* Implement timeout as a float value vs int
* remove unnecessary second multiplier
* whoops, missed one
* Switch type to time.Duration
* Fixup integration tests, change default and description
* Whoops, bad merge
* fix build
* Refactors sending IPP request and handling errors thereof into sendIPPRequest()
* Adds dependency of IPP zgrab2 schema on HTTP zgrab2 schema.
* Refactors out trying to grab with multiple versions into re-usable function.
* Determines whether to output nil result in a concise and accurate manner.
* Refactors reading attributes present in IPP response to its own function. Calls that in Grab and augmentWithCUPSData. Formats code using Go fmt.
* Rejects successful non-IPP responses with protocol error. Reports HTTP errors.
* Removes circular dependency upon http zgrab2 schema.
* Changes name of objects to make IPP schema actually work.