 "be consistent" PerlMonks

### Re: How do I generate a sequential string?

by Limbic~Region (Chancellor)
 on Apr 22, 2003 at 21:47 UTC ( #252378=note: print w/replies, xml ) Need Help??

in reply to How do I generate a sequential string?

Anonymous Monk,
As others have already pointed you in the right direction. I just want to point out that using lower case, upper case, and digits for all 10 characters , there are

839,299,365,868,340,224 possibilities.

If you do not know exactly how many characters out of the 10 are used, it gets even uglier.

• 1 = 62
• 2 = 622 = 3,844 + 62 = 3,906
• 3 = 623 = 238,328 + 3,906 = 242,234
• 4 = 624 = 14,776,336 + 242,234 = 15,018,570
• 5 = 625 = 916,132,832 + 15,018,570 = 931,151,402
• 6 = 626 = 56,800,235,584 + 931,151,402 = 57,731,386,986
• 7 = 627 = 3,521,614,606,208 + 57,731,386,986 = 3,579,345,993,194
• 8 = 628 = 218,340,105,584,896 + 3,579,345,993,194 = 221,919,451,578,090
• 9 = 629 = 13,537,086,546,263,552 + 221,919,451,578,090 = 13,759,005,997,841,642

And finally, the worst case senario is that it ends up being the very last combination you try out of a 10 character string: 853,058,371,866,181,866

I doubt this is the best way to go about it. Usually there is a way to reset it to a factory default, a super password, or some such thing - check with the vendor.

Cheers - L~R

Update: As I was typing this and doing some calculations dws put my sentiment into far fewer, but more potent words.

Update 2: I added more number variations to show how complex the problem really is.

• Comment on Re: How do I generate a sequential string?
• Replies are listed 'Best First'.
Re: Re: How do I generate a sequential string?
by jasonk (Parson) on Apr 22, 2003 at 23:46 UTC

And in case you still don't grasp how many combinations that is, if you have an amazingly fast computer that can try 100,000 combinations per second, it could still take you 270,000 years to find the password.

We're not surrounded, we're in a target-rich environment!

Create A New User
Node Status?
node history
Node Type: note [id://252378]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?