I am with Paladin on this one, but i felt compelled to reply none the less. As far as threading goes, this sounds like a trivally parallelizable problem. You could create N number of threads and pass each one different pieces to work on. Give each thread a different range of characters to check so that each thread works on new material only. I like to create a server thread that responds to requests for work from 'worker' threads. If a worker finds the 'answer', it signals back to the server so the server can stop further processing. Of course, if you are using a single processor then you aren't going to see speed up. This is a common misconception a lot people have about threads - that they just magically make things faster (barring super-linear speedups - they don't).

But let's stop there and think about something ... since you are wanting to put together every possible combination of characters that can be used in a password ... well, if your program finishes before you die, you will crack every password ever thought of, and no password will be good enough. Maybe you should concentrate on detecting the use of a password cracker instead, and how to track down the dog that is trying to compromise your system.

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)

In reply to (jeffa) Re: Password cracking algorithm by jeffa
in thread Password cracking algorithm by SyN/AcK

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.