Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,11 @@
<artifactId>protocol-attacker</artifactId>
<version>2.1.0</version>
</dependency>
<dependency>
<groupId>de.rub.nds</groupId>
<artifactId>terminal-utils</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
Expand Down
6 changes: 5 additions & 1 deletion src/main/java/de/rub/nds/scanner/core/execution/Scanner.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import de.rub.nds.scanner.core.report.ScanReport;
import de.rub.nds.scanner.core.report.rating.ScoreReport;
import de.rub.nds.scanner.core.report.rating.SiteReportRater;
import de.rub.nds.terminalutils.ProgressSpinner;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
Expand Down Expand Up @@ -152,7 +153,7 @@ public ReportT scan() {

// Check Scan Prerequisites
if (!checkScanPrerequisites(report)) {
LOGGER.debug("Scan cannot be performed due to prerequisites not being fulfilled");
LOGGER.info("Scan cannot be performed due to prerequisites not being fulfilled");
return report;
}

Expand All @@ -165,15 +166,18 @@ public ReportT scan() {
scanJob,
executorConfig.getParallelProbes(),
"ScannerProbeExecutor " + report.getRemoteName())) {
ProgressSpinner.startSpinnerTask("Executing:");
report.setScanStartTime(System.currentTimeMillis());
scanJobExecutor.execute(report);
} catch (InterruptedException e) {
LOGGER.warn("Scan execution interrupted");
report.setScanEndTime(System.currentTimeMillis());
Thread.currentThread().interrupt();
ProgressSpinner.stopSpinner();
return report;
}
LOGGER.debug("Scan execution complete");
ProgressSpinner.stopSpinner();

// Rating
LOGGER.debug("Retrieving site report rater for score evaluation");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@ private void executeProbesTillNoneCanBeExecuted(ReportT report) throws Interrupt
probeResult = result.get();
LOGGER.info(
"[{}/{}] {} probe executed",
currentFinishedProbes,
probeCount,
String.format("%2d", currentFinishedProbes),
String.format("%2d", probeCount),
probeResult.getType().getName());
} catch (ExecutionException e) {
LOGGER.error("Some probe execution failed", e);
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/de/rub/nds/scanner/core/probe/ScannerProbe.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import de.rub.nds.scanner.core.probe.result.*;
import de.rub.nds.scanner.core.report.PerformanceData;
import de.rub.nds.scanner.core.report.ScanReport;
import de.rub.nds.terminalutils.ProgressSpinner;
import java.math.BigInteger;
import java.util.HashMap;
import java.util.List;
Expand Down Expand Up @@ -41,8 +42,10 @@ public ScannerProbe(ProbeType type) {
@Override
public ScannerProbe<ReportT, StateT> call() {
LOGGER.debug("Executing: {}", getProbeName());
ProgressSpinner.startSpinnerTask(getProbeName() + " probe");
this.startTime = System.currentTimeMillis();
executeTest();
ProgressSpinner.stopSpinnerTask(getProbeName() + " probe");
this.stopTime = System.currentTimeMillis();

LOGGER.debug("Finished {} - Took {}s", getProbeName(), (stopTime - startTime) / 1000);
Expand Down