pwgenは特定の長さのパスワードを出力できますか?

pwgenは特定の長さのパスワードを出力できますか?

pwgen私はコマンドラインフラグで得られる再現性が気に入っているので、コマンドラインツールを使用してパスワードを生成しますsha1。マニュアルページを引用すると、次のようになります。

   -H, --sha1=/path/to/file[#seed]
          Will  use the sha1's hash of given file and the optional seed to
          create password. It will allow you to compute the same  password
          later, if you remember the file, seed, and pwgen's options used.
          ie: pwgen -H ~/your_favorite.mp3#[email protected] gives a list  of
          possibles  passwords for your pop3 account, and you can ask this
          list again and again.

          WARNING: The passwords generated using this option are not  very
          random.   If you use this option, make sure the attacker can not
          obtain a copy of the file.  Also, note that the name of the file
          may  be  easily available from the ~/.history or ~/.bash_history
          file.

私はこれを使って次のようなパスワードを生成(そして検索)します。

pwgen -1cnsy --sha1=/path/to/my/gpg/private-key.asc#[email protected]

唯一の問題は、パスワードに必要な文字数を指定する方法が見つからないことです。デフォルトでは8桁のパスワードが生成されるため、無差別代入攻撃に対してより脆弱です。

あるいは、文字数を指定することもできますが、繰り返し可能な文字を提供するためにファイルと文字列をシードするapg方法はありません。apg

pwgen指定された長さのパスワードを生成する方法はありますか?

ベストアンサー1

Usage: pwgen [ OPTIONS ] [ pw_length ] [ num_pw ]

したがって:

pwgen -1cnsy --sha1=/path/to/my/gpg/private-key.asc#[email protected] 42

pwgen要求されたパスワードを喜んで印刷しますが、特定のポイント(指定されたファイルのエントロピーによって決まります)を超えてもセキュリティは向上しません。

おすすめ記事