Created
February 19, 2021 14:58
-
-
Save gallypette/15a0b2ed888b99176816921527205d23 to your computer and use it in GitHub Desktop.
Galane VTC password generator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import sys | |
import string | |
import secrets | |
alphabet = string.ascii_letters + string.digits | |
for arg in sys.argv: | |
with open(arg, "rt") as fin: | |
with open("{}.pwd".format(arg), "wt") as fout: | |
for line in fin: | |
password = ''.join(secrets.choice(alphabet) for i in range(8)) | |
fout.write(line.replace('"password":""', '"password":"{}"'.format(password))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment