Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix calc_bruteforce_cardinality

The function was overestimating the cardinality
for upper-case characters and digits by mistakenly
identifying them as symbols. Thus a simple repeat
sequence like "AAAAAA" would have cardinality
26+33=59 rather than 26.
  • Loading branch information...
commit c753c8057d6e864c3eee21fd2f589eb94075d219 1 parent a12f1fd
@tekul authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 scoring.coffee
View
4 scoring.coffee
@@ -234,9 +234,9 @@ calc_bruteforce_cardinality = (password) ->
ord = chr.charCodeAt(0)
if 0x30 <= ord <= 0x39
digits = true
- if 0x41 <= ord <= 0x5a
+ else if 0x41 <= ord <= 0x5a
upper = true
- if 0x61 <= ord <= 0x7a
+ else if 0x61 <= ord <= 0x7a
lower = true
else
symbols = true
Please sign in to comment.
Something went wrong with that request. Please try again.