用户:
酒_笙查看:0 回复:3 评论:0 创建时间:2021-06-26T17:28:44
【作品展示】

【作品介绍】
添加生成密钥功能。(仅方式一,有几率密钥为0)
【作品源代码】
import time
import random
# Necessary data
vault = 0
Userinput = 'userinput'
Passint = 'none'
inint = 'none'
verify = '000000'
Getinfo = '9'
command = 'none'
pastinfo = 0
ram = 0
cam = 0
dam = 0
wt = 0
ways = 0
ft = 0
newkey = 0
print(time.ctime())
# def
def GetKey():
print('输入密钥:')
Userinput = input()
Getinfo = Userinput[11]
ram = int(Getinfo)
Getinfo = ram
cam = Userinput[3]
dam = int(cam)
cam = dam
Get_Mdc_11()
if (Userinput[6] == 'C' and Userinput[8] == 'W' and Userinput[10] == 'H'):
if (Userinput[11] == cam):
Passerent()
else:
print('[Error]密钥获取失败')
elif (Userinput[0] == '0' and Userinput[6] == '6' and Userinput[8] == '9'):
if (Userinput[11] == cam):
Passerent()
else:
print('[Error]密钥获取失败')
else:
print('[Error]密钥获取失败')
def Passerent():
print('[INFO]密钥输入成功!')
print('是否记住密钥?[y/n]')
Passint = input()
if (Passint == 'y'):
print('[INFO]成功记住!')
elif (Passint == 'n'):
print('[INFO]密钥被遗忘!')
Userinput = 'none'
else:
print('[INFO]失败!')
def Get_Mdc_11(Getinfo):
if (Getinfo % 3 != 0):
passint += (Getinfo % 3)
if (Getinfo <= 8):
pastinfo += Getinfo
else:
Getinfo = (pastinfo % 5)
else:
pastinfo += 1
def Setkey(wt):
for __count in range(wt):
ways = random.randint(1, 2)
if (ways == 1):
newkey = str(newkey)
newkey = str(random.randint(0, 9))
for __count in range(6):
newkey.append(str(random.randint(0, 9)))
newkey.append('C')
newkey.append('F')
newkey.append('W')
newkey.append('H')
fm = newkey[3]
fm = int[fm]
喵 = 0
if (fm % 3 != 0):
喵 += (fm % 3)
if (fm <= 8):
喵 += fm
else:
喵 = (fm % 5)
else:
喵 += 1
newkey.append(fm)
for __count in range(20):
newkey.append(random.randint(0, 9))
keys.append(newkey)
newkey = 0
else:
newkey = 0
# The code section
print('command:')
command = input()
if (command == '/ik'):
GetKey()
if ('/ck' in command):
wt = command[4:]
wt = int(wt)
Setkey(wt)
print(keys)
【提示】
部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:
https://python.codemao.cn
酒_笙这是一个挤牙膏般的更新(
)
添加命令用于批量生成密钥
/ck
命令示例:
/ck 10
即会生成10个密钥
但因为时间匆忙,部分代码使用后会错误
如果出现错误,尽情谅解
修复错误(5个):
1./ik 验证密钥时的00000000000成立
2.修复vault值notfound错误
3.验证密钥时密钥输入的错误
4.执行时直接错误的错误
5.中、英输入法命令错误
欢迎修改、指正错误
支持CC最新修改协议:
相同方式分享(SA):您可以自由复制、散布、展示及演出本作品;若您改变、转变或改作本作品,仅在遵守与本著作相同的授权条款下,您才能散布由本作品产生的衍生作品。
允许无条件修改本程序,不包括不止于违反我国法律条款。
点赞0
评论