Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
expander length limit on cmdline
04-01-2012, 02:26 PM
Post: #1
expander length limit on cmdline
I'd like to change the min and max length arguments on the command line, e.g.

Code:
./expander.bin min max < infile > outfile

Otherwise I have to recompile it every time I want the expander operates with another length limitation.
Find all posts by this user
04-01-2012, 02:49 PM
Post: #2
RE: expander length limit on cmdline
this can be done easily by the following commands::
Code:
expander < 1.* > 1_e.out
len [min_length] [max_length] < 1_e.out > 1_e_len.out
sort -u 1_e_len.out -o 1_e_len_u.out
just set the [min_length] [max_length]
1_e_len_u.out << this is your final result.. : )
Find all posts by this user
04-01-2012, 02:52 PM (This post was last modified: 04-01-2012 06:09 PM by james123.)
Post: #3
RE: expander length limit on cmdline
hashcat-utils-0.5_expander.patch

Code:
9,11d8
< #define LEN_MIN 1
< #define LEN_MAX 8
<
49c46
<   if (argc != 1)
---
>   if (argc != 3)
51c48
<     fprintf (stderr, "usage: %s < infile > outfile\n", argv[0]);
---
>     fprintf (stderr, "usage: %s len_min len_max < infile > outfile\n", argv[0]);
59a57,60
>   int len_min = atoi(argv[1]);
>
>   int len_max = atoi(argv[2]);
>
70c71
<     for (n = LEN_MIN; n <= LEN_MAX; n++)
---
>     for (n = len_min; n <= len_max; n++)
Find all posts by this user
04-01-2012, 03:08 PM
Post: #4
RE: expander length limit on cmdline
@M@LIK
Thanks for your suggestion, but it has a little flaw.
If my max_len is greater then the one in #define LEN_MAX it won't work correctly.

@james123
If I understand that correctly, this is already done in hashcat-utils v0.6?
Thanks for the patch! This is exactly what I was looking for.
Find all posts by this user
04-01-2012, 06:12 PM
Post: #5
RE: expander length limit on cmdline
(04-01-2012 03:08 PM)gscp Wrote:  If I understand that correctly, this is already done in hashcat-utils v0.6?

No it does not. The patch was for the beta. Updated the post for 0.5
Find all posts by this user