# Random Password Generator



## FordGT90Concept (Apr 24, 2012)

Check/uncheck a series of rules, modify attributes if desired, and click "Generate" to create a random password.  It stores nothing on your computer for the sake of security.

Note: It has very little cross-rule checks in order to allow maximum flexibility.  If the application is hitting max attempts, try adjusting rules to give it a better chance of success.  For example, when "no duplicates is checked," make sure the minimum length is relatively low (there's only 94 characters by default).

Requires .NET Framework 4.0 (Client Profile).







Icon meanings:
-Arrows pointing in cardinal directions: A random seed to use (default: R)
-#: Minimum number of passwords to produce (default: 1) 
-Arrow pointing right: Minimum character limit (default: 8).
-Arrow pointing left: Maximum character limit (default: 32).
-Loop with arrow up: Minimum number of password attempts (default: R).  The higher this number, the higher the randomness.  Enter "R" without quotes to randomize it.
-Loop with arrow down: Maximum number of password attempts (default: 1000000). Enter "R" without quotes to randomize it (not recommended because odds are it will often take a very long time to complete).
-Plus: Adds characters to the randomization.
-X: Restricts passwords (forces another attempt).
-Pencil: The value is editable.

Version History:
-1.1.4: Added option to set threads.  M is the default which uses the processor count.
-1.1.3: Minimum number of attempts changed to R (random) and made the random seed editable.
-1.1.2: Lots of major and minor bugs fixed.
-1.1.1: Changed the "number of passwords to generate" icon and added a filter to the save dialog.
-1.1.0: Added Copy button to copy to clipboard; Save to save all results to a text file (one per line), changed textbox to combo box to show all results (regardless if more than one was intended or not), added another progress bar to show how many passwords were generated/requested, added "R" option to Min Attempts and Max Attempts which randomize the value, and added Min Attempts to increase overall randomness.
-1.0.4: Added "Exclude the following names, previous password, etc. (comma delimited)" rule.
-1.0.3: Removed the grave accent (`) from the list of default special characters.  A lot of devices don't have the grave accent as a key to use when inputting a password.
-1.0.2: Removed some obsolete code.
-1.0.1: Added "starts with", "ends with", and "hex only" rules.  Random generator more robust.
-1.0.0: Original release.

Uses modified:
-Jesper Borgstrup's Editable TextBlock in WPF for In-place Editing


----------



## brandonwh64 (Apr 24, 2012)

This is awesome! You do WONDERFUL work!


----------



## FordGT90Concept (Apr 24, 2012)

Thanks.

If anyone has new rule ideas, let me hear them.  I designed to be as easy as possible to add more.


----------



## Munki (Apr 24, 2012)

Very nice.


----------



## FordGT90Concept (Apr 25, 2012)

Would anyone be interested in this on Windows Phone 7?


----------



## Athlon2K15 (Apr 25, 2012)

could you make a random name graber. for instance i enter names of people and click button and it picks a winner? that would be useful for giveaways on tpu


----------



## Kreij (Apr 25, 2012)

One thing you may want to consider (which I put in Key-Z's password generator), is a "must start with" and "must end with" selection as some sites require passwords to start with a letter or number, or end with a special character. etc.
There could also be restrictions on which special characters are allowed, so I added a TextBox that allowed the user to limit which special characters the generator would use.
I also added "hex only" characters for WEP passwords.

I like your addition of adding the minimum number of a type of character. :toasT:


----------



## FordGT90Concept (Apr 25, 2012)

AthlonX2 said:


> could you make a random name graber. for instance i enter names of people and click button and it picks a winner? that would be useful for giveaways on tpu


That's easy and I can do one better.  Put one name (or any value) per line in a text file, drop the text file on a console program, and it will tell you a name it randomly selected.

Edit: Scratch that, I'm doing even better: a WPF application that will include a text editor as well.




Kreij said:


> One thing you may want to consider (which I put in Key-Z's password generator), is a "must start with" and "must end with" selection as some sites require passwords to start with a letter or number, or end with a special character. etc.
> There could also be restrictions on which special characters are allowed, so I added a TextBox that allowed the user to limit which special characters the generator would use.
> I also added "hex only" characters for WEP passwords.
> 
> I like your addition of adding the minimum number of a type of character. :toasT:


The start and end will add a lot of rules (8 total) but I can definitely do that.

One can narrow the list of special characters by simply click on the special characters rule and removing those they don't want or adding those they do want.

Well, "hex only" would be best achieved by unchecking a-z and special characters then deleting G-Z on the capitals line.  Because I can, I think I will add it.  It make take a lot of attempts to come up a password that is "hex only" though.


----------



## Delta6326 (Apr 25, 2012)

Very nice I just tried it about 100 times seemed to work with no problems. I tried different settings.

Now it would be cool if you could make the program so you can set a password for it and you can have an option to save the password and give it a Title like this

Title: TPU Forum
Pass: M>$9WC3Z!c/`Ft


----------



## FordGT90Concept (Apr 25, 2012)

I decide when I first started making it that it will not store anything on the computer (everything it does occurs in the volatile RAM) for security reasons.  If I decide to turn it into a complete password locker in the future, I would do that.


----------



## newtekie1 (Apr 25, 2012)

Is there a way to edit the minimum and maximum characters?

Edit:  NVM, for some reason double clicking on the text wasn't working at first.  I closed the app and re-openned it and all is working now.


----------



## Delta6326 (Apr 25, 2012)

FordGT90Concept said:


> I decide when I first started making it that it will not store anything on the computer (everything it does occurs in the volatile RAM) for security reasons.  If I decide to turn it into a complete password locker in the future, I would do that.



Could always make 2 versions But don't worry I still use a Excel file that is password protected for my stuff.


----------



## Kreij (Apr 25, 2012)

FordGT90Concept said:


> That's easy and I can do one better. Put one name (or any value) per line in a text file, drop the text file on a console program, and it will tell you a name it randomly selected.
> 
> Edit: Scratch that, I'm doing even better: a WPF application that will include a text editor as well.



I think we might need to have coding contests, Ford.
We both write the same utility, let the members vote on the one they like best, and the loser has to buy the winner a Steam game. 

BTW, nice job getting all the WPF stuff working well. I know what a PITA it can be. lol


----------



## FordGT90Concept (Apr 25, 2012)

You have no idea on the EditableTextBlock.  I spent probably a whole 8 hours trying to get that damn thing working (went on a wild goose chase too).  The application, in its present form, simply wouldn't work without it so I really needed it.


----------



## Kreij (Apr 25, 2012)

I can feel your pain. lol
Remember the fun with the MultiProgessBar ? Sheesh.

WPF is crazy powerful, I just don't know if I will ever really quite enjoy coding in XAML.


----------



## Mindweaver (Apr 25, 2012)

Nice! It wouldn't be a bad idea to add an option for the user to enable something like a password bank to store all the passwords that they create. You could also encrypt that file. 

EDIT: I would create a button to send which password to the bank that I used.


----------



## FordGT90Concept (Apr 25, 2012)

Mindweaver said:


> Nice! It wouldn't be a bad idea to add an option for the user to enable something like a password bank to store all the passwords that they create. You could also encrypt that file.
> 
> EDIT: I would create a button to send which password to the bank that I used.


The key to encrypt/decrypt the file is the weakest link and the only way to overcome that vulnerability is to require a one-way password to access the bank.  "One-way" means backup method required which also requires its own set of security.  Like I said in a previous post, the idea doesn't interest me (largely because of security concerns).  The way it is now allows you to store them however you prefer (text file, spreadsheet, third party password vault, etc.).

If I am in dire need of a new project, I would consider making another application that wraps around this one ("create new password" or "change existing password" would present what you see here).  Don't get your hopes up. 




Kreij said:


> I can feel your pain. lol
> Remember the fun with the MultiProgessBar ? Sheesh.
> 
> WPF is crazy powerful, I just don't know if I will ever really quite enjoy coding in XAML.


We gave up on that, didn't we?  Hey, it works in Windows Forms! 




AthlonX2 said:


> could you make a random name graber. for instance i enter names of people and click button and it picks a winner? that would be useful for giveaways on tpu


Done: http://www.techpowerup.com/forums/showthread.php?t=164848


----------



## FordGT90Concept (Apr 25, 2012)

1.0.1 uploaded with Kreij's rules added.  I highly recommend you disable special characters when enabling "hex only" otherwise the odds are substantially lower it will find one.  Also, it should go without saying that if you enable more than one "starts with" or "ends with" rule, you'll hit max attempts without exception because you've created an impossibility.


----------



## SK-1 (Apr 25, 2012)

Thanks Ford


----------



## FordGT90Concept (Jun 4, 2012)

1.0.3 uploaded.  I removed the grave accent because a lot of devices (e.g. Wii, Windows Phone 7, etc.) either don't have the grave accent available or they bury it in a lot of menus.


----------



## FordGT90Concept (Jun 27, 2012)

1.0.4 uploaded.  I added a new rule for not allowing passwords to contain something like a previous password, social security number, etc.  It is comma delimited so you do something like so:
name,000-000-0000,something,somethingelse,etc.


----------



## FordGT90Concept (Aug 2, 2013)

1.1.0 uploaded.  Changes are extensive:
-added Copy button to copy to clipboard
-added Save button to save all results to a text file (one per line)
-changed textbox to combo box to show all results (regardless if more than one was intended or not)
-added another progress bar to show how many passwords were generated/requested
-added Min Attempts to increase overall randomness
-added "R" option to Min Attempts and Max Attempts which randomize the value


----------



## FordGT90Concept (Aug 4, 2013)

1.1.1 uploaded.
-Changed the "number of passwords to generate" icon.
-Added a filter to the save dialog (didn't have any previously, my mistake).


----------



## FordGT90Concept (Aug 5, 2013)

1.1.2 uploaded.  Strongly recommended to upgrade to this one.
-The random number generator would burn out after about 100,000 iterations and only return 0 meaning all results after that point are worthless (they're the same).  I got that fixed.
-The requires # of each type rules had a logical flaw where it would return true, instead of false, when the associated list to chars was disabled (making it impossible to be true).  It now behaves as it should.
-The progress bar percent was stuck at 0%.  That has been fixed.
-The program now aborts all threads when closed (e.g. you start to generate and close the program; it will now close instead of hang).
-It wasn't resetting the number of attempts when moving on to a new password.  It now does.
-It now clears the execution time when clicking generate.  It will display again when it finishes.
-The button returns to "generate" instead of being stuck on "stop" when max attempts have been reached. 

Again, if you use RPG, I highly recommend updating.


----------



## Maleko (Aug 13, 2013)

Brilliant piece of software!


----------



## Deleted member 24505 (Aug 13, 2013)

Thanks Ford


----------



## FordGT90Concept (Jan 31, 2014)

1.1.3 uploaded which has two minor changes (in the OP).  With this version, you can set a static seed number.  Using that feature, you can see how truly random this software is because the same static seed, from my own testing, will not generate the same passwords.


----------



## xorbe (Jan 31, 2014)

I tried it, but it keeps generating "hunter2" ...


----------



## FordGT90Concept (Jan 31, 2014)

Uh, what?  That's unpossible!


----------



## xorbe (Jan 31, 2014)

Bash.org quote if people are lost about the joke, heh ... http://www.bash.org/?244321


----------



## FordGT90Concept (Jan 31, 2014)

Ha!


----------



## FordGT90Concept (Oct 4, 2016)

Uploaded 1.1.4 which added an option to set the number of threads.  It must be greater than 0 (because it needs something, right?) and less than or equal to the logical processor count (8 in a Core i7-6700K).  The default is M which will use the maximum number of logical processors.


----------

