Page 1 of 1
Ppass - Simple password generator
Posted: Thu 18 Jun 2009, 11:44
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
Posted: Thu 18 Jun 2009, 13:35
by Lobster
Thanks for this
8 characters is standard now
I have to use a password book
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'
Posted: Fri 19 Jun 2009, 09:05
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.
Posted: Fri 19 Jun 2009, 11:11
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
Posted: Fri 19 Jun 2009, 11:56
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
# ---------------------
Posted: Fri 26 Jun 2009, 11:08
by aragon
hi vovchick,
is it possible to have a fixed length e.g. 8 or 10 chars with your script?
aragon
Posted: Fri 26 Jun 2009, 11:43
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
Posted: Fri 26 Jun 2009, 11:53
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