Sign in to follow this  
Followers 0
brodie28

Generating random numbers that only come up once

5 posts in this topic

I am writing a bit of a brute force program that needs to find an eight digit number.

Instead of just counting from 00000000 to 999999999 I was wondering if it was possible to constantly generate numbers in between that range in a way that the numbers will only occur once... I don't want it to waste time trying the same number twice.

Share this post


Link to post
Share on other sites



Hmmm, thats a good question.

If you know how this is what i'd probably do.

Create an array to store the already tested values.

Do a for loops to check if the value you are trying has already been used.

If not continue brute forcing.

If so, generate another number.

although this way could waste a little bit of time... but the only way i can think of :)

~hope this helped you some..

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

The thing you two are looking for is permutation + array I believe... Good luck with that. Might want to find another language to do your brute force with other than AutoIt for many reasons.

Edited by SmOke_N

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

Unless the chances of you accurately arriving at a number by choosing it at random are higher than doing it sequentially, why would you bother going to the extra effort?

Do you get feedback from whatever you are trying to crack (too high, too low, etc)? If so, use the binary split algorithm (try half way, if not valid split half of the half you had and keep doing this recursively until you get it). If not, just process it sequentially.

Share this post


Link to post
Share on other sites

get a random numb generator (aka one that generates more then 1 digit numb at a time... thats like 100 million different combos... good luck with that, my random numb generator would take like... a long time to generate... i have one that can do things like 6-letter words, with all characters in them... up to things with 100 trillion results, which would take many hours to generate.


What goes around comes around... Payback's a bitch.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0