import os,sys,getpass,time,json
print('*欢迎来到召唤师峡谷')
login_name = input('请输入您的账号:')
lock_file = open('lock_file.txt','r+')
lock_list = lock_file.readlines()
lock = []
for lock_info in lock_list:
lock_info = lock_info.strip('\n')
lock.append(lock_info)
#print(lock)
if login_name in lock:
sys.exit("你的账号被封停,请联系客服")
user_file = open('user_file.txt','r+')
user_list = user_file.readlines()
#user_list = user_list.strip('\n')
user = []
for user_info in user_list:
user_info = user_info.strip('\n')
user_info = user_info.split() #
user.append(user_info)
print(user)
count = 0
b = [x[0] for x in user]
a = [x[1] for x in user]
print(b)
print(a)
if login_name in b:
while count < 3:
login_pwd = input('请输入密码:')
if login_pwd == a[b.index(login_name)]:
sys.exit('即将进入游戏')
else:
count += 1
print('密码错误,请重新输入,你好友%s次机会'%(3-count))
else:
lock_file.write(login_name + '\r\n')
sys.exit('输入次数过多,账号已被绑定')
else:
print('账号不存在')
lock_file.close()
user_file.close()
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。