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요청한 비밀번호를 기꺼이 인쇄하지만 특정 지점(지정된 파일의 엔트로피에 의해 결정됨)을 넘어서면 보안이 향상되지 않습니다 .

관련 정보