Compare commits
No commits in common. "bceaeeb2ca89b5279b7e53e5436d58d473920748" and "aedc80a5556e84a08166e6723a828a7ea2a19b76" have entirely different histories.
bceaeeb2ca
...
aedc80a555
15
pw.py
15
pw.py
@ -4,27 +4,24 @@ import random
|
||||
|
||||
def generate_pw(length):
|
||||
import string
|
||||
charset = string.ascii_letters + string.digits + '+-_?!.:,;'
|
||||
charset = string.ascii_letters + string.digits + '+-_?!.:,;';
|
||||
return ''.join([random.choice(charset) for _ in range(length)])
|
||||
|
||||
def main():
|
||||
import sys
|
||||
import os
|
||||
import time
|
||||
|
||||
import win32clipboard
|
||||
if len(sys.argv) > 1:
|
||||
length = int(sys.argv[1])
|
||||
else:
|
||||
length = 12
|
||||
pw = generate_pw(length)
|
||||
print(pw)
|
||||
|
||||
if os.name == 'nt':
|
||||
import win32clipboard
|
||||
win32clipboard.OpenClipboard()
|
||||
win32clipboard.EmptyClipboard()
|
||||
win32clipboard.SetClipboardText(pw, win32clipboard.CF_UNICODETEXT)
|
||||
win32clipboard.CloseClipboard()
|
||||
win32clipboard.OpenClipboard()
|
||||
win32clipboard.EmptyClipboard()
|
||||
win32clipboard.SetClipboardText(pw, win32clipboard.CF_UNICODETEXT)
|
||||
win32clipboard.CloseClipboard()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
@ -1 +0,0 @@
|
||||
pywin32
|
Loading…
Reference in New Issue
Block a user