an open port has been found
| 4 | * an open port has been found |
| 5 | */ |
| 6 | public class Port implements Event { |
| 7 | public final String protocol; |
| 8 | public final int port; |
| 9 | public final String service; |
| 10 | public final String version; |
| 11 | |
| 12 | public Port(String protocol, int port) { |
| 13 | this.protocol = protocol; |
| 14 | this.port = port; |
| 15 | this.service = null; |
| 16 | this.version = null; |
| 17 | } |
| 18 | |
| 19 | public Port(String protocol, int port, String service, String version) { |
| 20 | this.protocol = protocol; |
| 21 | this.port = port; |
| 22 | this.service = service; |
| 23 | this.version = version; |
| 24 | } |
| 25 | |
| 26 | public String toString() { |
| 27 | return String.format("Port: { protocol='%s', port=%d, service='%s', version='%s' }", |
| 28 | protocol, port, service, version); |
| 29 | } |
| 30 | } |
nothing calls this directly
no outgoing calls
no test coverage detected