Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
diceware-debian
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
drebs
diceware-debian
Commits
7fe35aa9
Commit
7fe35aa9
authored
10 years ago
by
ulif
Browse files
Options
Downloads
Patches
Plain Diff
Set -s default to zero.
parent
ee371ea7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
README.rst
+14
-11
14 additions, 11 deletions
README.rst
diceware.py
+1
-1
1 addition, 1 deletion
diceware.py
tests/test_diceware.py
+1
-1
1 addition, 1 deletion
tests/test_diceware.py
with
16 additions
and
13 deletions
README.rst
+
14
−
11
View file @
7fe35aa9
...
...
@@ -14,7 +14,7 @@ Arnold G. Reinhold on http://diceware.com . It generates passphrases
by concatenating words randomly picked from wordlists. For instance::
$ diceware
Art83LiarRivetBlytheIs>am
MyraPend93rdSixthEagleAid
The passphrase contains by default six capitalized words with no space
char or similar in-between and a single special char (the ``">"`` in the
...
...
@@ -55,23 +55,26 @@ With ``-n`` you can tell how many words are supposed to be picked for
your new passphrase::
$ diceware -n 1
A*ay
Thud
$ diceware -n 2
FaheyFr?ed
KnitMargo
The number of special chars put into the generated phrase can be
determined with the ``-s`` option::
You can `diceware` additionally let generate special chars to replace
characters in the 'normal' passphrase. The number of special chars
generated can be determined with the ``-s`` option (*default is zero*)::
$ diceware -s 2
LipidFool$kullRu6yI'mPack
Heroic%unkLon#DmLewJohns
Here ``"
$
"`` and ``"
'
"`` are the special chars.
Here ``"
%
"`` and ``"
#
"`` are the special chars.
To switch s
pecial chars
completely off, set ``-s`` to zero
::
S
pecial chars
are taken from the following list
::
$ diceware -s 0
LazyGainMaimBlondDentUtmost
~!#$%^&*()-=+[]\{}:;\"'<>?/0123456789
Please note that several special chars might replace the same original
char, resulting in a passphrase with less special chars than requested.
By default the single phrase words are capitalized, i.e. the first
char of each word is made uppercase. This does not neccessarily give
...
...
@@ -79,7 +82,7 @@ better security (1 bit at most), but it helps reading a phrase.
You can nevertheless disable caps with the ``--no-caps`` option::
$ diceware --no-caps
-s 0
$ diceware --no-caps
oceanblendbaronferrylistenvalet
This leads to lower-case passphrases, maybe easier to type on smart
...
...
This diff is collapsed.
Click to expand it.
diceware.py
+
1
−
1
View file @
7fe35aa9
...
...
@@ -32,7 +32,7 @@ def handle_options(args):
'
--no-caps
'
,
action
=
'
store_false
'
,
dest
=
'
capitalize
'
,
help
=
'
Turn off capitalization.
'
)
parser
.
add_argument
(
'
-s
'
,
'
--specials
'
,
default
=
1
,
type
=
int
,
metavar
=
'
NUM
'
,
'
-s
'
,
'
--specials
'
,
default
=
0
,
type
=
int
,
metavar
=
'
NUM
'
,
help
=
"
Insert NUM special chars into generated word.
"
)
parser
.
set_defaults
(
capitalize
=
True
)
args
=
parser
.
parse_args
(
args
)
...
...
This diff is collapsed.
Click to expand it.
tests/test_diceware.py
+
1
−
1
View file @
7fe35aa9
...
...
@@ -137,7 +137,7 @@ class TestDicewareModule(object):
options
=
handle_options
([])
assert
options
.
num
==
6
assert
options
.
capitalize
is
True
assert
options
.
specials
==
1
assert
options
.
specials
==
0
def
test_main
(
self
,
capsys
):
# we can get a passphrase
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment