Skip to content

Commit

Permalink
Merge pull request #46 from essentialkaos/develop
Browse files Browse the repository at this point in the history
Version 2.0.1
  • Loading branch information
andyone authored Feb 11, 2019
2 parents 5431684 + 3857c4f commit e5b0ce2
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 15 deletions.
21 changes: 9 additions & 12 deletions cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (

const (
APP = "SSLScan Client"
VER = "2.0.0"
VER = "2.0.1"
DESC = "Command-line client for the SSL Labs API"
)

Expand Down Expand Up @@ -197,6 +197,7 @@ func process(args []string) {
checksInfo = append(checksInfo, checkInfo)
default:
grade = check(host)
fmtc.NewLine()
}

switch {
Expand Down Expand Up @@ -245,29 +246,25 @@ func check(host string) string {
IgnoreMismatch: options.GetB(OPT_IGNORE_MISMATCH),
}

fmtc.Printf("{*}%s{!} → ", host)

if !options.GetB(OPT_DETAILED) {
fmtc.TPrintf("{s}Preparing for tests…{!}")
}
fmtc.TPrintf("{*}%s{!} → {s}Preparing for tests…{!}", host)

ap, err := api.Analyze(host, params)

if err != nil {
fmtc.Printf("{r}%v{!}\n", err)
fmtc.TPrintf("{*}%s{!} → {r}%v{!}\n", host, err)
return "T"
}

for {
info, err = ap.Info(false)

if err != nil {
fmtc.TPrintf("{r}%v{!}\n", err)
fmtc.TPrintf("{*}%s{!} → {r}%v{!}\n", host, err)
return "Err"
}

if info.Status == sslscan.STATUS_ERROR {
fmtc.TPrintf("{r}%s{!}\n", info.StatusMessage)
fmtc.TPrintf("{*}%s{!} → {r}%s{!}\n", host, info.StatusMessage)
return "Err"
} else if info.Status == sslscan.STATUS_READY {
break
Expand All @@ -277,7 +274,7 @@ func check(host string) string {
message := getStatusInProgress(info.Endpoints)

if message != "" {
fmtc.TPrintf("{s}%s…{!}", message)
fmtc.TPrintf("{*}%s{!} → {s}%s…{!}", host, message)
}
}

Expand All @@ -289,9 +286,9 @@ func check(host string) string {
}

if len(info.Endpoints) == 1 {
fmtc.TPrintln(getColoredGrade(info.Endpoints[0].Grade))
fmtc.TPrintf("{*}%s{!} → "+getColoredGrade(info.Endpoints[0].Grade)+"\n", host)
} else {
fmtc.TPrintln(getColoredGrades(info.Endpoints))
fmtc.TPrintf("{*}%s{!} → "+getColoredGrades(info.Endpoints)+"\n", host)
}

if options.GetB(OPT_DETAILED) {
Expand Down
2 changes: 0 additions & 2 deletions cli/details.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,6 @@ func printDetailedInfo(ap *sslscan.AnalyzeProgress) {
fmtc.Printf("\n{c*} %s {!*}#%d (%s){!}\n", info.Host, index+1, endpoint.IPAdress)
printDetailedEndpointInfo(endpoint, info.Certs)
}

fmtc.NewLine()
}

// printCertificateInfo prints info about server certificate
Expand Down
5 changes: 4 additions & 1 deletion common/sslcli.spec
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

Summary: Pretty awesome command-line client for public SSLLabs API
Name: sslcli
Version: 2.0.0
Version: 2.0.1
Release: 0%{?dist}
Group: Applications/System
License: EKOL
Expand Down Expand Up @@ -92,6 +92,9 @@ rm -rf %{buildroot}
################################################################################

%changelog
* Sat Feb 09 2019 Anton Novojilov <[email protected]> - 2.0.1-0
- Fixed compatibility with the latest version of ek package

* Tue Jan 29 2019 Anton Novojilov <[email protected]> - 2.0.0-0
- Improved UI
- Info about HTTP transactions
Expand Down

0 comments on commit e5b0ce2

Please sign in to comment.