import pyautogui
import keyboard
import datetime
now=datetime.datetime.now()
day = now.strftime('%j')
week = now.strftime('%U')
month = now.strftime('%m')
year = now.strftime('%y')
def code():
while True:
code = pyautogui.password(text='请输入密码', title='登录', default='', mask='*')
if code == day*3 or week*3 ....... :
pyautogui.alert(text='欢迎使用', title='登录', button='OK')
break
else:
pyautogui.alert(text='密码错误', title='登录', button='OK')
exit()
if __name__ == '__main__':
code()
想以date×数字 获得一串根据时间变化的无序密码,请问需要怎么改动,自学能力有限. 解决追加10元