primitive password cracker
David KolovratnÃk
david at kolovratnik.net
Thu Jan 7 12:56:49 EST 2021
I find a parallel to counting useful. Let letters be '0' to '9'
and think of manual (in contrast to formatting range(0, 10))
construction of list of strings "0000" to "9999"
Let's start with 0000. How do you compute the next item? Start
looking from its end. I stop here in order to leave space for
Bischoop's deliberation.
To sum up in order words, the clue is to stop thinking of inner
loops for each letter and find a way to get the next combination.
Best,
David
On Thu, Jan 07, 2021 at 04:52:56PM -0000, Bischoop wrote:
> On 2021-01-07, Chris Angelico <rosuav at gmail.com> wrote:
> >
> > True. Unfortunately, it doesn't work, so what you'd have is something
> > that can be easily parameterized to not work on other numbers of
> > characters too. :)
> >
>
> My bad is I'm kinda maniac and have to know how to, I know best solution
> itertool but... I just must know, was thinking that studing the itertool
> code would give me an answer but found it's in C.
> Now I try list comprehension for it, so it's another day on it for me.
>
>
> --
> Thanks
> --
> https://mail.python.org/mailman/listinfo/python-list
More information about the Python-list
mailing list