Skip to content

Commit

Permalink
发现高危漏洞,有使用本项目的建议立即下架等待更新修复
Browse files Browse the repository at this point in the history
  • Loading branch information
aiyuechuang committed Jul 15, 2024
1 parent 0f5d7da commit 3f3ab31
Show file tree
Hide file tree
Showing 7 changed files with 555 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@
- 2024-07-12 00:03:30:优化订阅页面
- 2024-07-12 09:42:39:更改订阅页面布局、修改代码中管理员账号密码
- 2024-07-12 09:55:58:简化 `link.html` 的代码结构

- 2024-07-15 22:07:55:⚠️⚠️⚠️发现高危漏洞,直接访问后台链接会跳过管理员账号密码验证!待修复!!!


## 声名

本项目全权由 AI悦创维护,如果想要哪去当作毕业设计、课设等。请及时联系与我沟通,严禁商用。
本项目全权由 AI悦创维护,如果想要拿去当作毕业设计、课设等。请及时联系与我沟通,严禁商用。
Binary file added history_data/pickle_opt/data/passwords.pickle
Binary file not shown.
60 changes: 60 additions & 0 deletions history_data/pickle_opt/good.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
import pickle
from datetime import datetime, timedelta


# 定义 Admin 和 Password 类
class Admin:
def __init__(self, username, password):
self.username = username
self.password = password


class Password:
def __init__(self, password, created_at, valid_days):
self.password = password
self.created_at = created_at
self.valid_days = valid_days


# 自定义 Unpickler 类
class CustomUnpickler(pickle.Unpickler):
def find_class(self, module, name):
if module == "models" and name == "Admin":
return Admin
elif module == "models" and name == "Password":
return Password
return super().find_class(module, name)


# 读取密码的函数
def read_passwords(file_path):
with open(file_path, 'rb') as file:
passwords = CustomUnpickler(file).load()
return passwords


# 获取密码信息的函数
def get_password_info(password_obj):
password = password_obj.password
created_at = password_obj.created_at
valid_until = created_at + timedelta(days=password_obj.valid_days)
return {
'password': password,
'created_at': created_at,
'valid_until': valid_until
}


# 路径到pickle文件
passwords_file_path = 'data/passwords.pickle'
# 从文件中读取密码
passwords_list = read_passwords(passwords_file_path)

# 收集每个密码的信息
passwords_info = [get_password_info(password_obj) for password_obj in passwords_list]

import pandas as pd

# 显示密码信息为DataFrame
passwords_df = pd.DataFrame(passwords_info)
print(passwords_df)
2 changes: 1 addition & 1 deletion history_data/pickle_opt/pickle_opt.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@

print(loaded_admins)
for item in loaded_admins:
print(item.name)
print(item)
41 changes: 41 additions & 0 deletions history_data/pickle_opt/pickle_opt_two.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import pickle
from datetime import datetime, timedelta


class Admin:
def __init__(self, username, password):
self.username = username
self.password = password


class Password:
def __init__(self, password, created_at, valid_days):
self.password = password
self.created_at = created_at
self.valid_days = valid_days


def read_passwords(file_path):
with open(file_path, 'rb') as file:
passwords = pickle.load(file)
return passwords


def get_password_info(password_obj):
password = password_obj.password
created_at = datetime.strptime(password_obj.created_at, '%Y-%m-%d %H:%M:%S')
valid_until = created_at + timedelta(days=password_obj.valid_days)
return {
'password': password,
'created_at': created_at,
'valid_until': valid_until
}


passwords_file_path = 'data/passwords.pickle'
passwords_list = read_passwords(passwords_file_path)

for password_obj in passwords_list:
password_info = get_password_info(password_obj)
print(
f"Password: {password_info['password']}, Created At: {password_info['created_at']}, Valid Until: {password_info['valid_until']}")
Loading

0 comments on commit 3f3ab31

Please sign in to comment.