The previous patch allows the port to be specified in the
`ScanTarget{}`.
Since the port option in the Config may not be the port currently being
scanned, delete the `GetPort()` function provided by each module.
The `GetPort()` function is also not used. While we could just change
the meaning of this function, to mean "Return the port in the Config",
it is probably better to go ahead and just remove all references to it
as there are no users.
* 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
* Changes grab to return *ScanResults. Implements ippInContentType correctly.
* Slots in an operational re-working of several HTTP module functions, and adds dependency on zgrab's http module. Includes some laregly copy-pasted sections worthy of scrutiny.
* Adds support to retry failed HTTP over HTTPS. Removes vestigial functions.
* Implements sending CUPS-get-printers request if CUPS is detected, yielding more detailed & accurate version information. Also handles URI's more correctly.
* Creates separate container to run IPP over TLS on CUPS. Runs basic tests against both containers.
* Creates virtual printer on each container to test for augmenting data with CUPS-get-printers request (which only works when printers exist).
* Augments version information with CUPS-get-printers response if possible.
* Allows specifying IPP version in constructed requests. Checks for version-not-supported server error.
* Allows resending IPP requests with different versions if we hit a version-not-supported error.
* Updates IPP zgrab2 schema to include fields added in modules/ipp/scanner.go
* Removes unnecessary TODO's
* Updates testable example for new definition of AttributeByteString
* Removes versionNotSupported's dependency on bufferFromBody. Checks bounds on generated requests' fields correctly.
* Updates zgrab2 IPP schema to match ScanResults object in modules/ipp/scanner.go
* Corrects IPP tests, bounds checking, zgrab schema formatting.
* Logs errors for unexpected behavior in buffer io operations. Updates schema to include standalone fields for attributes described in CUPS-get-printers response.
* Logs at debug level only when verbose flag is set. Prints accurate error message when CUPSVersion test fails.
* Handles HTTP request errors before checking for nil response/body. Fixes and tests convertURIToIPP.
* remove unnecessary indirection on net.Conn
* Ignore *.pyc
* fix NPE on nil handshake
* refactoring -- move status to status.go; add Open() methods for ScanTarget
* cherry-pick .gitignore fix
* pull in TLS fix
* status.go comments
* trim over-generalizations
* use /usr/bin/env bash instead of absolute path
* remove debug tcpwrap
* add integration tests for postgres
* hack for cleanup.sh to work on mingw -- use //var/lib instead of /var/lib
* cleanup should actually stop the process though
* comments / rearrange
* Bump up timeout in postgres tests; only pass user if explicitly requested to do so
* add schema stubs to new.sh
* Integration test fixes -- use /usr/bin/env bash; log all validation failures
* add postgres schemas
* fill out zcrypto.client_hello schema
* handle early get of TLSLog
* postgres: return SCAN_SUCCESS on success
* cleanup
* fix new.sh
* fix typo
* postgres container cleanup
* build.sh docs
* standardize container/image names
* add not to check for success
* shift mysql's connection management to ScanTarget.Open(); wrap Read/Write methods returned by ScanTarget.Open() to enforce timeouts
* catch schematically-valid but non-successful scans
* postgres: clean up output format; more scanning
* cleanup; better error handling; get detailed protocol version error
* refactor modules
* clean up dangling connections
* split gigantic postgres.go
* remove unused
* ServerParams gets its own type
* refactor integration tests: run zgrab2 in its own container, which is linked to the service containers, so that we don't need to keep track of unique ports on the host any more
* rename entrypoint; remove duplicate postgres tests
* comments for postgres schema
* port over ftp support from the original zgrab; add schema / integration tests for FTP; fix log line in ssh test
* Use param expansion to check for env variable [minor]
This is a *very* minor change to `docker-runner/docker-run.sh` checks to
see if the environment variable required to run the script has been set
to a non-empty string. If not, the script exits with a non-zero status
code and displays a default message:
```
❯ docker-runner/docker-run.sh
docker-runner/docker-run.sh: line 7: CONTAINER_NAME: parameter null or not set
```
This was the behavior before, but just uses a one-liner declarative bash
idiom.
For further reading on parameter expansion, see
https://stackoverflow.com/a/307735.
@justinbastress can tell me if I did something wrong and broke the
intent of the script :-)
* Add integration_test targets to makefile; use makefile instead of directly calling go build everywhere; run postgres schema through PEP8 linter
* use make in docker-runner entrypoint
* add .integration_test_setup to .gitignore
* cleanup
* add ftp schema
* more .gitignore items
* Makefile updates: Windows support; add docker-runner target; better cleanup.
* docker-runner Dockerfile: start from zgrab2_runner_base image
* cleanup postgres setup
* make travis use make
* add .gitattributes, try to prevent it from overriding lfs with crlfs in shell scripts at least
* fix folder name in Makefile
* update go (one of our dependencies now works only with >= 1.9)
* From travis: `I don't have any idea what to do with '1.9.0'.`
* explicit clean make
* fix dep order
* fix build.sh location
* popd
* use make to ensure zgrab2_runner exists
* Make docker-runner an order-dependency for integration-test-cleanup; don't do a cleanup after each integration test
* use explicit tag name for zgrab2_runner
* Add container-clean target to Makefile, to remove cyclic dependency on docker; use .id files to track docker images; add servce-base image; use Make to build / track images
* use LF in Makefiles; update .gitignore; use zgrab_service_base image in ssh container; fix line endings (?)
* remove overzealous cleanup
* let setup continue even if some containers are already running
* ftp: use zgrab2_service_base for ftp container; restart container if already running
* FTP: remove redundant prefix; add non-authtls test
* zgrab depends on *.go
* docker-runner depends on zgrab2 binary
* clean output before running integration tests
* address Zakir's comments: rename auth_*_resp -> auth_*, 'a FTP banner' -> 'an FTP banner'
* fix schema
* update/rebuild when necessary in container