Skip to content

Commit 0939309

Browse files
committed
display infos about connection establishment
1 parent f808437 commit 0939309

File tree

3 files changed

+29
-14
lines changed

3 files changed

+29
-14
lines changed

TLS-Client-Scanner/src/main/java/de/rub/nds/tlsscanner/clientscanner/probe/BasicProbe.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,15 @@ public BasicProbe(ParallelExecutor parallelExecutor, ClientScannerConfig scanner
5959

6060
@Override
6161
protected void executeTest() {
62+
LOGGER.info("Waiting for client to connect...");
6263
Config config = scannerConfig.createConfig();
6364
WorkflowTrace trace =
6465
new WorkflowConfigurationFactory(config)
6566
.createTlsEntryWorkflowTrace(config.getDefaultServerConnection());
6667
trace.addTlsAction(new ReceiveAction(new ClientHelloMessage()));
6768
State state = new State(config, trace);
6869
executeState(state);
70+
LOGGER.info("Client connected");
6971
if (state.getWorkflowTrace().executedAsPlanned()) {
7072
TlsContext traceContext = state.getTlsContext();
7173
clientAdvertisedCipherSuites = traceContext.getClientSupportedCipherSuites();

TLS-Server-Scanner/src/main/java/de/rub/nds/tlsscanner/serverscanner/Main.java

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,20 @@ public static void main(String[] args) throws IOException {
4343
long time = System.currentTimeMillis();
4444
LOGGER.info("Performing Scan, this may take some time...");
4545
ServerReport report = scanner.scan();
46-
LOGGER.info(
47-
AnsiColor.RESET.getCode()
48-
+ "Scanned in: "
49-
+ ((System.currentTimeMillis() - time) / 1000)
50-
+ "s\n"
51-
+ new ServerReportPrinter(
52-
report,
53-
config.getExecutorConfig().getReportDetail(),
54-
DefaultPrintingScheme.getDefaultPrintingScheme(),
55-
!config.getExecutorConfig().isNoColor())
56-
.getFullReport());
46+
if (report.getIsHandshaking()) {
47+
LOGGER.info(
48+
AnsiColor.RESET.getCode()
49+
+ "Scanned in: "
50+
+ ((System.currentTimeMillis() - time) / 1000)
51+
+ "s\n"
52+
+ new ServerReportPrinter(
53+
report,
54+
config.getExecutorConfig().getReportDetail(),
55+
DefaultPrintingScheme
56+
.getDefaultPrintingScheme(),
57+
!config.getExecutorConfig().isNoColor())
58+
.getFullReport());
59+
}
5760
} catch (ConfigurationException e) {
5861
LOGGER.error("Encountered a ConfigurationException aborting.", e);
5962
}

TLS-Server-Scanner/src/main/java/de/rub/nds/tlsscanner/serverscanner/execution/TlsServerScanner.java

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -286,19 +286,29 @@ protected boolean checkScanPrerequisites(ServerReport report) {
286286

287287
if (isConnectable()) {
288288
isConnectable = true;
289-
LOGGER.debug(config.getClientDelegate().getHost() + " is connectable");
289+
LOGGER.debug("{} is connectable", config.getClientDelegate().getHost());
290290
configSelector.findWorkingConfigs();
291291
report.setConfigProfileIdentifier(configSelector.getConfigProfileIdentifier());
292292
report.setConfigProfileIdentifierTls13(
293293
configSelector.getConfigProfileIdentifierTls13());
294294
if (configSelector.isSpeaksProtocol()) {
295295
speaksProtocol = true;
296-
LOGGER.debug(config.getClientDelegate().getHost() + " speaks " + getProtocolType());
296+
LOGGER.debug(
297+
"{} speaks {}", config.getClientDelegate().getHost(), getProtocolType());
297298
if (configSelector.isIsHandshaking()) {
298299
isHandshaking = true;
299-
LOGGER.debug(config.getClientDelegate().getHost() + " is handshaking");
300+
LOGGER.debug("{} is handshaking", config.getClientDelegate().getHost());
301+
} else {
302+
LOGGER.error("{} is not handshaking", config.getClientDelegate().getHost());
300303
}
304+
} else {
305+
LOGGER.error(
306+
"{} does not speak {}",
307+
config.getClientDelegate().getHost(),
308+
getProtocolType());
301309
}
310+
} else {
311+
LOGGER.error("{} is not connectable", config.getClientDelegate().getHost());
302312
}
303313

304314
report.setServerIsAlive(isConnectable);

0 commit comments

Comments
 (0)