Skip to content

Commit

Permalink
release 1.0.4 / add spinner / add --verbose flag
Browse files Browse the repository at this point in the history
  • Loading branch information
hahwul committed Nov 6, 2020
1 parent d7a092c commit 4fd540c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/crack/crack.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func RunTestingJWT(token string, lists []string, concurrency int, verbose bool)
s := spinner.New(spinner.CharSets[4], 100*time.Millisecond, spinner.WithWriter(os.Stderr))
if !verbose {
percent := float64(nowLine / lenWordlist)
str := fmt.Sprintf("Cracking.. [%d / %d][%f]",nowLine,lenWordlist,percent)
str := fmt.Sprintf(" Cracking.. [%d / %d][%f]",nowLine,lenWordlist,percent)
s.Suffix = str
s.Start()
}
Expand All @@ -59,7 +59,7 @@ func RunTestingJWT(token string, lists []string, concurrency int, verbose bool)
for word := range wordlists {
nowLine = nowLine + 1
percent := (float64(nowLine) / float64(lenWordlist) * 100)
str := fmt.Sprintf("Cracking.. [%d/%d][%0.2f%%]",nowLine,lenWordlist,percent)
str := fmt.Sprintf(" Cracking.. [%d/%d][%0.2f%%]",nowLine,lenWordlist,percent)
s.Suffix = str
if !found {
result, token := jwtInterface.JWTdecodeWithVerify(token, word)
Expand Down

0 comments on commit 4fd540c

Please sign in to comment.