Blob


1 .\" Copyright (c) 2021, 2022, 2023 Omar Polo <op@omarpolo.com>
2 .\"
3 .\" Permission to use, copy, modify, and distribute this software for any
4 .\" purpose with or without fee is hereby granted, provided that the above
5 .\" copyright notice and this permission notice appear in all copies.
6 .\"
7 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
8 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
9 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
10 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
11 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
12 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
13 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
14 .Dd November 23, 2023
15 .Dt PWG 1
16 .Os
17 .Sh NAME
18 .Nm pwg
19 .Nd password generator
20 .Sh SYNOPSIS
21 .Nm
22 .Op Fl an
23 .Op Fl w Ar wordlist
24 .Op Ar length
25 .Sh DESCRIPTION
26 .Nm
27 generates a random string of characters or a diceware-style passphrase
28 using a word list, a file with one word per line.
29 The random properties are the ones provided by the operating system'
30 .Pa /dev/urandom
31 device.
32 .Pp
33 The options are as follows:
34 .Bl -tag -width Ds
35 .It Fl a
36 Use only alphanumeric characters.
37 .It Fl n
38 Use only numbers.
39 .It Fl w Ar wordlist
40 Generate a passphrase from a the given
41 .Ar wordlist
42 instead of a random string of characters.
43 .El
44 .Pp
45 If no
46 .Ar length
47 is given, an appropriate one is used.
48 .Sh EXIT STATUS
49 .Ex -std
50 .Sh EXAMPLES
51 Generate a passphrase using the EFF
52 .Dq large
53 wordlist:
54 .Bd -literal
55 $ ftp \-o\- https://www.eff.org/files/2016/07/18/eff_large_wordlist.txt \e
56 | awk '{print $2}' >~/wordlist
57 $ pwg \-w ~/wordlist
58 elm retouch disclose snaking pregame bonfire
59 .Ed
60 .Sh AUTHORS
61 .An -nosplit
62 The
63 .Nm
64 utility was written by
65 .An Omar Polo Aq Mt op@omarpolo.com .