本帖最后由 c0d1 于 2020-3-13 21:47 编辑
[Python] 纯文本查看 复制代码 # uncompyle6 version 3.6.4
# Python bytecode 3.8 (3413)
# Decompiled from: Python 2.7.17 (v2.7.17:c2f86d86e6, Oct 19 2019, 21:01:17) [MSC v.1500 64 bit (AMD64)]
# Warning: this version has problems handling the Python 3 byte type in contants properly.
# Embedded file name: StartV2.py
# Size of source mod 2**32: 34074 bytes
import tkinter as tk
from time import strftime, localtime, time
import tkinter.messagebox
def encryption(x):
def toasc(x):
y = ''
for i in x:
try:
out = ord(str(i))
except:
out = ord(i)
else:
y += str(out)
return y
def tochr(x):
length = len(x)
out = ''
if length % 2 != 0:
x = '0' + x
length = len(x)
for i in range(2, length, 2):
if chr(int(x[i - 2:i])) in '1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ':
out += chr(int(x[i - 2:i]))
return out
x = toasc(x)
x = x[0::2] + x[0::5] + x[0::3]
x = str(int(x) // 237)
x = str(int(x[-8:]) ** 8)
x = tochr(x[-32:])
return x
t = strftime('%Y-%m-%d %H:%M:%S', localtime(time()))
day = str(t[0:10])
hour = str(t[0:13])
cipher_day = encryption(day)
cipher_hour = encryption(hour)
def midwindow(window, setwidth, setheight, x=0.5, y=0.5):
screenwidth = window.winfo_screenwidth()
screenheight = window.winfo_screenheight()
outwidth = int((screenwidth - setwidth) * x)
outheight = int((screenheight - setheight) * y)
result = '{0}x{1}+{2}+{3}'.format(setwidth, setheight, outwidth, outheight)
return result
def xy(wh, num, percant=0.5):
result = int((wh - num) * percant)
return result
title = u'\u8eab\u4efd\u9a8c\u8bc1'
start_menu = tk.Tk()
start_width, start_height = (300, 250)
border_size = midwindow(start_menu, start_width, start_height)
resizable = False
start_menu.title(title)
start_menu.geometry(border_size)
start_menu.resizable(width=resizable, height=resizable)
tk.Label(text=u'\u8bf7\u8f93\u5165\u5355\u7801', font=('Arial', 20)).pack(side='top')
code = tk.StringVar()
entry_code = tk.Entry(start_menu, textvariable=code, font=('Arial', 18)).pack(side='top')
def compare():
x = code.get()
if x == cipher_hour:
tk.messagebox.showinfo(title=u'\u606d\u559c', message=u'\u8be5\u7801\u5728\u8fd9\u4e2a\u5c0f\u65f6\u5185\u53ef\u4ee5\u767b\u5165')
else:
if x == cipher_day:
tk.messagebox.showinfo(title=u'\u606d\u559c', message=u'\u8be5\u7801\u5728\u4eca\u5929\u5185\u53ef\u4ee5\u767b\u5165')
else:
if x == '20010609':
tk.messagebox.showinfo(title=u'\u60a8\u597d', message=u'\u6b22\u8fce\u60a8')
else:
tk.messagebox.showerror(title='Error', message=u'\u9519\u8bef')
buttom = tk.Button(start_menu, text=u'\u786e\u8ba4', command=compare).pack(side='top')
start_menu.mainloop()
# okay decompiling StartV2.pyc
文字部分没有转码了 |