repo.or.cz
/
hband-tools.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
new tool
[hband-tools.git]
/
user-tools
/
PMpwgen
blob
57ea936b6d59ad948f5739aeec73d69f9d75fc0a
1
#!/bin/bash
2
3
true
<<EOF
4
=pod
5
6
=head1 NAME
7
8
PMpwgen - Poor man's password generator
9
10
=cut
11
12
EOF
13
14
15
n
=
0
16
17
cat
/
dev
/
urandom | \
18
tr
-d -c
'A-Za-z0-9_.:;!@%-'
| \
19
while
read -n
"
${1:-8}
"
pass
20
do
21
let
n
++
22
[
$n
-gt
"
${2:-10}
"
] &&
break
23
echo
"
$pass
"
24
done