cracken icon indicating copy to clipboard operation
cracken copied to clipboard

"\n" doesn't removed then read from wordlist on Windows

Open 0x123456789 opened this issue 2 years ago • 3 comments

Hi, on Windows I try the following command:

cracken.exe -w xx.txt -o out.txt ?w1?d

My wordlist is (just two words for example):

pass
xcv

And as a result I see:

xcv0
xcv1
xcv2
xcv3
xcv4
xcv5
xcv6
xcv7
xcv8
xcv9
pass
0
pass
1
pass
2
pass
3
pass
4
pass
5
pass
6
pass
7
pass
8
pass
9

So I think \n symbol is not removed properly

0x123456789 avatar Feb 04 '23 16:02 0x123456789

hi @0x123456789,

I've ran some tests in windows and I am getting the same output only when the wordlist (the xx.txt file) delimited with \r\n. When the wordlist file is correctly delimited with \n only i get the expected results. There is a difference between unix & windows in line delimiter (\n vs \r\n).

I'm pretty confident that you're file is line delimited by \r\n. to verify you can use this simple python one liner:

$ python -c "print(list(open('xx.txt', 'rb')))"

if you see something like this, you've got the correct line delimiter:

[b'pwd\n', b'xcv\n']

if you see this, you're file has wrong line delimiter:

[b'pwd\r\n', b'xcv\r\n']

Edit it somehow with a script (e.g. python).

Note: I've implemented \n as delimiter as almost all wordlists i know of use it, it contains 1 char vs 2 chars and save a bit extra space.

Hope this helps :)

shmuelamar avatar Mar 04 '23 17:03 shmuelamar

Thank you, is it possible to add some checks that delimiter is used?

0x123456789 avatar Apr 08 '23 17:04 0x123456789

I am open to accept a PR if you wish to write one @0x123456789 , but currently I am busy with other projects.

shmuelamar avatar May 12 '23 07:05 shmuelamar

Closing due to inactivity.

shmuelamar avatar May 03 '24 08:05 shmuelamar