File tree Expand file tree Collapse file tree 2 files changed +19
-2
lines changed
src/main/java/de/rub/nds/tlsscanner Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change 13
13
import de .rub .nds .tlsattacker .core .config .delegate .GeneralDelegate ;
14
14
import de .rub .nds .tlsattacker .core .exceptions .ConfigurationException ;
15
15
import de .rub .nds .tlsscanner .config .ScannerConfig ;
16
+ import de .rub .nds .tlsscanner .constants .AnsiEscapeSequence ;
16
17
import de .rub .nds .tlsscanner .report .SiteReport ;
17
18
import java .io .IOException ;
18
19
import org .apache .logging .log4j .LogManager ;
@@ -42,9 +43,9 @@ public static void main(String[] args) throws IOException {
42
43
LOGGER .info ("Performing Scan, this may take some time..." );
43
44
SiteReport report = scanner .scan ();
44
45
LOGGER .info ("Scanned in:" + ((System .currentTimeMillis ()-time )/1000 ) + "s\n " );
45
- // ANSI escape sequences to erase the progressbar
46
46
if (!config .getGeneralDelegate ().isDebug ()){
47
- ConsoleLogger .CONSOLE .info ("\033 [1A\033 [2K" );
47
+ // ANSI escape sequences to erase the progressbar
48
+ ConsoleLogger .CONSOLE .info (AnsiEscapeSequence .ANSI_ONE_LINE_UP + AnsiEscapeSequence .ANSI_ERASE_LINE );
48
49
}
49
50
ConsoleLogger .CONSOLE .info ("Scanned in: " + ((System .currentTimeMillis ()-time )/1000 ) + "s\n " + report .getFullReport (config .getReportDetail ()));
50
51
} catch (ConfigurationException E ) {
Original file line number Diff line number Diff line change
1
+ /*
2
+ * To change this license header, choose License Headers in Project Properties.
3
+ * To change this template file, choose Tools | Templates
4
+ * and open the template in the editor.
5
+ */
6
+ package de .rub .nds .tlsscanner .constants ;
7
+
8
+ /**
9
+ *
10
+ * @author Pierre Tilhaus<[email protected] >
11
+ */
12
+ public class AnsiEscapeSequence {
13
+
14
+ public static final String ANSI_ONE_LINE_UP = "\033 [1A" ;
15
+ public static final String ANSI_ERASE_LINE = "\033 [2K" ;
16
+ }
You can’t perform that action at this time.
0 commit comments