Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improper Unicode handling #2

Open
ventaquil opened this issue Nov 24, 2022 · 0 comments
Open

Improper Unicode handling #2

ventaquil opened this issue Nov 24, 2022 · 0 comments

Comments

@ventaquil
Copy link

When password contains Unicode characters calculated length is improper.

$ echo 'hasło' > dict.txt
$ lykan dict.txt 
Progress [>                                                                                                     ] 0.00%

Length:                    Basic character sets:
------------------------   ---------
  0:   0.000%  (0)         Lower-case: 66.667%  (4)
  1:   0.000%  (0)         Upper-case:  0.000%  (0)
  2:   0.000%  (0)         Numbers   :  0.000%  (0)
  3:   0.000%  (0)         Symbols   :  0.000%  (0)
  4:   0.000%  (0)         Other     : 33.333%  (2)
  5:   0.000%  (0) 
  6: 100.000%  (1) 
  7:   0.000%  (0) 
  8:   0.000%  (0) 
  9:   0.000%  (0) 
 10:   0.000%  (0) 
 11:   0.000%  (0) 
 12:   0.000%  (0) 
 13:   0.000%  (0) 
 14:   0.000%  (0) 
 15:   0.000%  (0) 
 16:   0.000%  (0) 
 17:   0.000%  (0) 
 18:   0.000%  (0) 
 19:   0.000%  (0) 
 20:   0.000%  (0) 
 21:   0.000%  (0) 
 22:   0.000%  (0) 
 23:   0.000%  (0) 
 24:   0.000%  (0) 
 25:   0.000%  (0) 
 26:   0.000%  (0) 
 27:   0.000%  (0) 
 28:   0.000%  (0) 
 29:   0.000%  (0) 
30+:    -nan%  (0) 

Symbols:
-----------------------
Letters:                   Numbers:                   Special:
---------                  ---------                  ---------
h: 16.667%  (1)            1:  0.000%  (0)            [:  0.000%  (0)
s: 16.667%  (1)            2:  0.000%  (0)            $:  0.000%  (0)
a: 16.667%  (1)            3:  0.000%  (0)            ]:  0.000%  (0)
o: 16.667%  (1)            4:  0.000%  (0)            *:  0.000%  (0)
p:  0.000%  (0)            5:  0.000%  (0)            ::  0.000%  (0)
C:  0.000%  (0)            6:  0.000%  (0)            !:  0.000%  (0)
b:  0.000%  (0)            7:  0.000%  (0)            ;:  0.000%  (0)
D:  0.000%  (0)            8:  0.000%  (0)            (:  0.000%  (0)
q:  0.000%  (0)            9:  0.000%  (0)            ":  0.000%  (0)
E:  0.000%  (0)            0:  0.000%  (0)            %:  0.000%  (0)
j:  0.000%  (0)                                       ':  0.000%  (0)
F:  0.000%  (0)                                       ):  0.000%  (0)
r:  0.000%  (0)                                       <:  0.000%  (0)
G:  0.000%  (0)                                       #:  0.000%  (0)
f:  0.000%  (0)                                       >:  0.000%  (0)
H:  0.000%  (0)                                       -:  0.000%  (0)
k:  0.000%  (0)                                       .:  0.000%  (0)
I:  0.000%  (0)                                       ^:  0.000%  (0)
t:  0.000%  (0)                                       /:  0.000%  (0)
J:  0.000%  (0)                                       {:  0.000%  (0)
                                                      ?:  0.000%  (0)
                                                      @:  0.000%  (0)
                                                       :  0.000%  (0)
$ echo -n 'hasło' | wc -m
5

As you can see hasło contains 5 characters but lykan returns 6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant