1 #!/bin/bash/env python 2 User_list=[‘topaz‘,‘nannan‘] 3 Pass_list=[‘123‘,‘456‘] 4 User = input("Name: ") 5 f = open(‘deny.txt‘,‘a‘) 6 d = open(‘deny.txt‘).read() 7 if User in d: 8 print("you are lock...") 9 exit() 10 elif User in User_list: 11 count = 0 12 while count < 3 : 13 Passwd = input("Password:") 14 if Passwd == Pass_list[User_list.index(User)]: 15 print("Welcome~") 16 exit() 17 else: 18 count +=1 19 else: 20 print("hhe,too many times 8~") 21 f.write(User) 22 f.write(‘,‘) 23 f.close() 24 else: 25 print("sign up") 26 exit()
时间: 2024-10-12 19:29:53