mirror of
https://github.com/kp2pml30/dotfiles.git
synced 2026-04-14 22:31:46 +04:00
update
This commit is contained in:
parent
5d8c6dd080
commit
f2f4ead62f
7 changed files with 9317 additions and 6 deletions
11
private/genpass.py
Normal file
11
private/genpass.py
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
import secrets
|
||||
|
||||
with open("words.txt", "rt") as f:
|
||||
lines = [l.strip() for l in f]
|
||||
|
||||
bits = secrets.randbits(300)
|
||||
mx = len(lines)
|
||||
while bits > 0:
|
||||
print(lines[bits % mx], end=' ')
|
||||
bits //= mx
|
||||
print()
|
||||
Loading…
Add table
Add a link
Reference in a new issue