tls-attacker/TLS-Scanner

No ColorFlag

Closed this issue · 5 comments

ic0ns commented

Add a flag to suppress colours

Folgender Code:

public static String scan(String target) {
        ScannerConfig config = new ScannerConfig(new GeneralDelegate());

        config.setScanDetail(ScannerDetail.NORMAL);
        config.setReportDetail(ScannerDetail.ALL);
        config.setNoProgressbar(true);
        config.setNoColor(true);
        config.setThreads(5);
        config.setAggroLevel(30);

        config.getClientDelegate().setHost(target + ":" + 443);

        TlsScanner scanner = new TlsScanner(config);
        SiteReport report = scanner.scan();

        return report.getFullReport(config.getReportDetail());
}

produziert Strings, die immernoch

[0m -------------------------------------------------------- Nonce �[0mRandom	: �[0mNo 
Duplicates (wip)�[0m �[0m -------------------------------------------------------- PublicKey 
Parameter �[0mEC PublicKey reuse	: �[0mfalse�[0m DH PublicKey reuse	: �[0mfalse�[0m Uses 
Common DH Primes	: �[0mfalse�[0m Uses Non-Prime Moduli	: �[0mfalse�[0m Uses Nonsafe-Prime Moduli	: �[0mtrue�[0m DH Strength	: �[0m1024�[0m

derart aussehen, ist das ein coloring-problem?

This is the Ansi Escape sequence for the variable ANSI_RESET. This should not be displayed. Which operating system and console do you use?

MacOS Mojave 10.14.3

The string above never went through the console itself, though. The output from above function is stored into Redis and then retrieved by a NodeJS app and displayed in Chrome Version 72.0.3626.119 (Official Build) (64-bit)

Try the Branch NoColorRework. This should fix the problem.

works, thanks!