The SMTP module was matching on "STMP" when verifying the contents of the scan response. This PR fixes the typo and adds a test for the VerifySMTPContents() function.
* telnet module should not return success when it finds something other than telnet
* telnet module should not return success when it finds something other than telnet
* Adds verification step for POP3 banners
* Add validation for IMAP banners & fix some formatting problems
* Verify SMTP banners exist and are successful
* Add check for is_dnp3 flag which seems to be working as expected
* Fix dropping SCAN_APPLICATION_ERROR in IMAP
* Fix dropping SCAN_APPLICATION_ERROR in POP3
* Fix dropping SCAN_APPLICATION_ERROR in SMTP
* Add protocol and blacklist indicators to email protocols
Co-authored-by: Elliot Cubit <elliotcubit@elliots-mbp.lan>
This abstracts more of the help text into the ScanModule definition,
removing some more of the need for `zgrab2.AddCommand()`
https://github.com/zmap/zgrab2/pull/248
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.