ฉันใช้เครื่องมือบรรทัดคำสั่ง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#your@email.com 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#username@example.com
ปัญหาเดียวคือฉันไม่สามารถหาวิธีระบุจำนวนอักขระที่ฉันต้องการรหัสผ่าน โดยค่าเริ่มต้นมันสร้างรหัสผ่าน 8 ตัวอักษรซึ่งมีความอ่อนไหวต่อการบังคับให้ดุร้าย
อีกวิธีหนึ่งคือฉันสามารถใช้apgซึ่งอนุญาตให้ฉันระบุจำนวนอักขระ แต่ฉันไม่เห็นวิธีที่จะapgใช้ไฟล์และสตริงเป็นเมล็ดเพื่อให้อักขระที่สามารถทำซ้ำได้
มีวิธีที่ฉันสามารถpwgenสร้างรหัสผ่านตามความยาวที่ระบุได้หรือไม่?