Universal Password Generator

Moderator: Forum moderators

Post Reply
User avatar
mikeslr
Posts: 3080
Joined: Mon Jul 13, 2020 11:08 pm
Has thanked: 179 times
Been thanked: 991 times

Universal Password Generator

Post by mikeslr »

Attached is a Universal Password Generator. 'Universal' as it should work under any Puppy. It is the result of some research by me and a lot of good suggestions by several Puppy devs who actually know how to program. At best, I muddle. Special thanks to MochiMoppel and williams both of whose solutions worked. For a complete history see this thread, viewtopic.php?p=141014#p141014.

Basically, I wanted an application (with a menu entry) to generate random/secure passwords without having to go online or run a program under Wine. The above thread will provide links to a couple good applications that will generate 'Pass Phrases'. Pass Phrases are a string of words chosen randomly. They may be more secure than passwords because of their length. And may be easier for someone to remember than random symbols. Someone, but not me. And AFAICT, passphrase generators run under python. So I opted for the 'simpler' solution.

The operative code uses urandom and is

Code: Select all

for i in $(seq 1 10); do echo $(tr -dc 'A-Za-z0-9!"#$%&()*+,-./:;<=>?@[\\]^_`{|}~' < /dev/urandom | head -c 16); done > /tmp/passwords.txt
defaulttexteditor /tmp/passwords.txt

If you want to change it (/root/my-applications/bin/passgen):

"seq 1 to 10" defines how many passwords will be generated; as is 10
"$(tr -dc 'A-Za-z0-9!"#$%&()*+,-./:;<=>?@[\\]^_`{|}~'" specifies what symbols to randomly use; and
"head -c 16" specifies the length of each password, as is 16: The longer, the longer it will take for a hacker to find the password by trial and error, especially if your limit the number of trials before freezing him/her out.

After generating passwords they are exported to a text file in /tmp which is automatically opened in your default text-editor. Files in /tmp are not preserved accross reboots nor the execution of a Save.

If the following pet is installed this Application will show up as Menu>Personal Category>Password Generator.

UniversalPasswordGenerator.pet
(134.45 KiB) Downloaded 34 times
Rantanplan
Posts: 140
Joined: Thu Jun 03, 2021 2:25 pm
Has thanked: 55 times
Been thanked: 30 times

Re: Universal Password Generator

Post by Rantanplan »

Hello @mikeslr ,

Thank you for your script.

For my part, I had written one (see attachment).
It is in French.
The GUI is built with xmessage.

gen_multi_mdp_gui.sh.txt
remove fake .txt extension
(3.66 KiB) Downloaded 8 times

Maybe it's not as powerful, or universal as yours.

Friendly.

User avatar
bigpup
Moderator
Posts: 7512
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 1021 times
Been thanked: 1682 times

Re: Universal Password Generator

Post by bigpup »

Well, it can do a better job than me, for making a password, I will never be able to remember :!: :lol:

The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

User avatar
mikeslr
Posts: 3080
Joined: Mon Jul 13, 2020 11:08 pm
Has thanked: 179 times
Been thanked: 991 times

Re: Universal Password Generator

Post by mikeslr »

I don't even try to remember. What I do is have a non-descriptively named word-processing file which contains a list like this:

gmail nobody@gmail.com pw |s%~:,Da9:?z/#@[

Optional: password protect that file. But no one other than I uses my computer and the file is buried among gbs of other files.
Suggested: copy file to a USB just in case you accidently wipe your drive.

To log in, open the file and cut & paste. Close the file.

Post Reply

Return to “Security/Privacy”