Ppass - Simple password generator

Stuff that has yet to be sorted into a category.
Post Reply
Message
Author
aragon
Posts: 1698
Joined: Mon 15 Oct 2007, 12:18
Location: Germany

Ppass - Simple password generator

#1 Post by aragon »

Version: 0.1

Ppass is a simple gtkdialog-gui for pwgen (included). It generates a list on 10 random passwords (8 chars). You could choose between 2 'security levels'.

If you need longer passwords => use another tool ;-)

aragon
Attachments
ppass.png
(45.7 KiB) Downloaded 931 times
ppass-0.1.pet
(13.78 KiB) Downloaded 549 times

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#2 Post by Lobster »

Thanks for this :)
8 characters is standard now

I have to use a password book :shock:
One tip I liked is combining the
name of the program or location with a standard password
- perhaps based on song lyrics

so you might have

gmailTamfibitw
diggTamfibitw

that is 'The answer my friend is blowing in the wind'
Last edited by Lobster on Fri 19 Jun 2009, 15:24, edited 1 time in total.
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

User avatar
vovchik
Posts: 1507
Joined: Tue 24 Oct 2006, 00:02
Location: Ukraine

#3 Post by vovchik »

Dear aragon,

Here is a little script I put together to generate passwords based upon the kernel's /dev/random function. I think it does as good a job as your pwgen for most practical purposes - though I haven't tested its "strength" - and is roughly 15x smaller. Please have a look if you eventually do a rewrite of your gui.

With kind regards,
vovchik

PS. Lobster, that is a very useful little tip - using lyrics. I think I'll adopt the method.
Attachments
mypasswd.tar.gz
(586 Bytes) Downloaded 531 times

aragon
Posts: 1698
Joined: Mon 15 Oct 2007, 12:18
Location: Germany

#4 Post by aragon »

hi vovchick,

seems to me a very clever script. if it's ok for you, i will create a new version with your code.

if i want to include a secure version with special characters i will have to add them to "mychars", correct?

aragon

User avatar
vovchik
Posts: 1507
Joined: Tue 24 Oct 2006, 00:02
Location: Ukraine

#5 Post by vovchik »

Dear aragon,

Please feel free to use the script as you wish. You are right in that extra chars can be added to the my_chars var. I just modded the script a tiny bit and added a max_len var to control the length of the password. Please have a look, because it may offer more flexibility than the original.

With kind regards,
vovchik

PS. Das Gui-Programm hat mir gefallen. Vielleicht können wir Barry ueberreden es ein Bestandteil des normalen Puppys zu machen. Wäre nicht schlecht.

Code: Select all

#!/bin/sh

# -----------------------------------------------------------------
# Program:	mypasswd
# Author:	vovchik
# Date:		19.06.2009
# Platform:	Puppy Linux
# Depends:	bash, od
# Purpose:	To generate random passwords using upper and lowercase
#			ascii chars and numbers 0-9. The program makes use of
#			the Linux kernel random function /dev/random.
# -----------------------------------------------------------------

# ---------------------
function init_vars ()
# ---------------------
{
min_num=1
max_num=63
my_index=1
max_len=8
my_chars=" 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
my_asc=""
}

# ---------------------
function make_passwd ()
# ---------------------
{
my_pass=""
while [ $my_index -le $max_len ]
do
	my_num=$(( $min_num+(`od -An -N2 -i /dev/random` )%($max_num-$min_num+1) ))
	my_asc=`echo ${my_chars:$my_num:1}`
	my_index=$((my_index+1))
	my_pass=$my_pass$my_asc
done
}

# ---------------------
function show_result ()
# ---------------------
{
echo "My password is: $my_pass"
}


# ---------------------
# main
# ---------------------

init_vars
make_passwd
show_result

# ---------------------
# end main
# ---------------------

aragon
Posts: 1698
Joined: Mon 15 Oct 2007, 12:18
Location: Germany

#6 Post by aragon »

hi vovchick,

is it possible to have a fixed length e.g. 8 or 10 chars with your script?

aragon

User avatar
vovchik
Posts: 1507
Joined: Tue 24 Oct 2006, 00:02
Location: Ukraine

#7 Post by vovchik »

Hi aragon,

Sure, just change the max_len=8 to max_len=12 or 20, if you wish. If you name that quantity using a var, you can pass the length to the script, which may be convenient. And you can change the my_chars var easily, too, but make sure you have at least as many chars (+1 blank at the beginning to avoid a division by zero) as in the max_num var. I suppose script could be improved by having the length of the my_chars var computed automatically and assigned to the my_chars var. I think that would be efficient and save you the trouble of counting the string length manually, as I now have it. I also came across another password generating snippet that looked very useful - different method entirely - but don't know where I copied it to. If I find it again, I will post it here.

With kind regards,
vovchik

User avatar
vovchik
Posts: 1507
Joined: Tue 24 Oct 2006, 00:02
Location: Ukraine

#8 Post by vovchik »

Dear aragon,

With a bit of grepping on "history" I found the other program, which looks interesting and works. I have attached it.

With kind regards,
vovchik
Attachments
genpass.tar.gz
(1.02 KiB) Downloaded 536 times

Post Reply