Start pppassword

This commit is contained in:
Artemis Tosini 2018-09-14 19:07:05 +00:00
parent 148683f8f0
commit b3fa4050c1
Signed by: artemist
GPG key ID: 094FBF1D31E6C1BB
2 changed files with 13 additions and 0 deletions

13
scripts/pppassword Executable file
View file

@ -0,0 +1,13 @@
#!/usr/bin/env python3
import sys
import os
import secrets
a = "".join(sys.argv[1:])
d = "pq"
if "u" in a:
d = d + "PQ"
l = 16 + secrets.randbelow(16)
print(''.join([secrets.choice(d) for _ in range(l)]))