This commit is contained in:
Gary Gan 2025-06-30 21:05:34 +08:00
parent 133cfeea63
commit eb9cae6ec2
73 changed files with 1729 additions and 199 deletions

42
Lock.py Normal file
View File

@ -0,0 +1,42 @@
import hashlib
import os
class PasswordLock:
def __init__(self):
self.salt = b'\xb2S"e}\xdf\xb0\xfe\x9c\xde\xde\xfe\xf3\x1d\xdc>'
def hash_password(self, password):
# 将密码转换为字节流
password_bytes = password.encode('utf-8')
# 将盐值和密码组合并进行哈希
hash_obj = hashlib.sha256(self.salt + password_bytes)
password_hash = hash_obj.hexdigest()
return password_hash
def verify_password(self, input_password, stored_hash):
# 使用相同的盐值对输入密码进行哈希
calculated_hash = self.hash_password(input_password)
# 比较计算出的哈希值与存储的哈希值
return calculated_hash == stored_hash
# 使用示例
if __name__ == "__main__":
lock = PasswordLock()
# 用户设置密码
user_password = input("请设置一个三位数密码: ")
# 加密密码
password_hash = lock.hash_password(user_password)
print(f"密码已加密,哈希值: {password_hash}")
# 验证密码
test_password = input("请输入密码进行验证: ")
if lock.verify_password(test_password, password_hash):
print("密码验证成功!")
else:
print("密码验证失败!")

View File

@ -210,7 +210,7 @@ class SourceCollector:
if item == self.path[idx-1]: if item == self.path[idx-1]:
del self.path[idx] del self.path[idx]
self.path.extend(self.bfs_path(self.path[-1],self.end_pos))

BIN
assets/lock.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

129
codeforces_c3.py Normal file
View File

@ -0,0 +1,129 @@
#!/usr/bin/env python3
import sys
def solve():
n = int(input())
# 基于示例的策略分析:
# 示例1: 目标100, x未知 -> add -10(失败) -> add 1(成功) -> mul 10(成功) -> 结果100
# 示例2: 目标5, x未知 -> digit(成功) -> div 2(成功) -> 结果5
# 观察:我们需要一个能处理任意初始值的通用策略
# 通用策略:
# 1. 先用digit将值标准化到较小范围
# 2. 然后用算术操作构造目标
# 第一步:标准化
print("digit")
sys.stdout.flush()
response = int(input())
if response != 1:
return
# 现在值在某个较小的范围内但可能不是1-9因为digit可能需要多次
# 第二步:构造目标
if n <= 9:
# 对于单位数目标,尝试多种调整策略
success = False
# 策略1尝试各种可能的当前值调整到n
for possible_current in range(1, 100): # 扩大搜索范围
if success:
break
# 计算需要的调整
diff = n - possible_current
# 尝试加法调整
if abs(diff) <= 10**18:
print(f"add {diff}")
sys.stdout.flush()
response = int(input())
if response == 1:
success = True
break
# 策略2如果加法失败尝试除法如示例2
if not success and n < 10:
for divisor in range(2, 20):
print(f"div {divisor}")
sys.stdout.flush()
response = int(input())
if response == 1:
# 除法成功,可能需要继续调整
for adj in range(-10, 11):
if adj == 0:
continue
print(f"add {adj}")
sys.stdout.flush()
response = int(input())
if response == 1:
success = True
break
break
else:
# 对于大数目标,使用乘法+加法组合
success = False
# 策略1找到合适的因数分解 n = a * b
for a in range(1, min(100, n+1)):
if success:
break
if n % a == 0:
b = n // a
if b <= 10**18:
# 尝试构造 a然后乘以 b
# 首先尝试调整到 a
for current_guess in range(1, 100):
diff = a - current_guess
print(f"add {diff}")
sys.stdout.flush()
response = int(input())
if response == 1:
# 成功调整到 a现在乘以 b
print(f"mul {b}")
sys.stdout.flush()
response = int(input())
if response == 1:
success = True
break
else:
# 乘法失败,尝试下一个分解
break
# 如果这个调整失败尝试下一个current_guess
if success:
break
# 策略2如果因数分解失败尝试直接构造
if not success:
for current_guess in range(1, 100):
diff = n - current_guess
if abs(diff) <= 10**18:
print(f"add {diff}")
sys.stdout.flush()
response = int(input())
if response == 1:
success = True
break
# 输出结果
print("!")
sys.stdout.flush()
final_response = int(input())
def main():
t = int(input())
for _ in range(t):
solve()
if __name__ == "__main__":
main()

97
codeforces_c3_final.py Normal file
View File

@ -0,0 +1,97 @@
#!/usr/bin/env python3
import sys
def solve():
n = int(input())
# 最终策略:基于问题的深入理解
#
# 核心思想:
# 1. 使用digit操作标准化到小范围
# 2. 利用数学性质构造目标
# 对于所有情况先用digit标准化
print("digit")
sys.stdout.flush()
response = int(input())
if response != 1:
return
# 现在当前值是原数字的数字和
# 对于1-9的目标我们有简单策略
# 对于更大的目标,我们使用构造法
if n <= 9:
# 目标是1-9直接尝试所有可能的调整
# 由于我们不知道确切的当前值,枚举所有可能性
attempts = [
# 假设当前是1-9计算到n的差值
n - 1, n - 2, n - 3, n - 4, n - 5,
n - 6, n - 7, n - 8, n - 9
]
for diff in attempts:
print(f"add {diff}")
sys.stdout.flush()
response = int(input())
if response == 1:
break
else:
# 目标大于9使用乘法构造
# 策略找到n的一个小因子d使得n = d * q
# 然后构造d再乘以q
best_factor = None
best_quotient = None
# 寻找最佳的因子分解
for d in range(1, 10):
if n % d == 0:
q = n // d
if q <= 10**17: # 确保乘法不会溢出
best_factor = d
best_quotient = q
break
if best_factor is not None:
# 使用因子分解策略
# 先构造best_factor
for current_guess in range(1, 10):
diff = best_factor - current_guess
print(f"add {diff}")
sys.stdout.flush()
response = int(input())
if response == 1:
# 成功构造因子现在乘以quotient
print(f"mul {best_quotient}")
sys.stdout.flush()
response = int(input())
break
else:
# 没有合适的因子分解,使用直接加法
# 这种情况下假设当前是某个小数字直接加到n
for current_guess in range(1, 10):
diff = n - current_guess
if 0 < diff <= 10**18:
print(f"add {diff}")
sys.stdout.flush()
response = int(input())
if response == 1:
break
# 结束
print("!")
sys.stdout.flush()
final_response = int(input())
def main():
t = int(input())
for _ in range(t):
solve()
if __name__ == "__main__":
main()

110
codeforces_c3_v2.py Normal file
View File

@ -0,0 +1,110 @@
#!/usr/bin/env python3
import sys
def solve():
n = int(input())
# 基于理论分析的最优策略:
# 对任意目标n我们可以证明存在一个通用的构造方法
# 关键观察:
# 1. digit操作将任何数转换为其数字和最终会到1-9范围
# 2. 从任何1-9的数我们都可以用很少操作构造任意目标
# 最优构造策略:
if n == 1:
# 对于目标1digit -> 然后想办法变为1
print("digit")
sys.stdout.flush()
response = int(input())
# 现在尝试各种方法变为1
# 方法1: 如果当前是偶数,除以自身
for d in [2, 3, 4, 5, 6, 7, 8, 9]:
print(f"div {d}")
sys.stdout.flush()
response = int(input())
if response == 1:
# 除法成功现在可能是1或其他数
# 继续尝试到达1
break
# 方法2: 用加法调整
for adj in range(-8, 9):
if adj != 0:
print(f"add {adj}")
sys.stdout.flush()
response = int(input())
if response == 1:
break
elif 2 <= n <= 9:
# 对于2-9digit -> 调整到目标
print("digit")
sys.stdout.flush()
response = int(input())
# 枚举所有可能的当前值尝试调整到n
for current in range(1, 10):
diff = n - current
print(f"add {diff}")
sys.stdout.flush()
response = int(input())
if response == 1:
break
else:
# 对于n > 9使用构造策略
# 策略digit -> 构造一个因子 -> 乘法得到n
print("digit")
sys.stdout.flush()
response = int(input())
# 寻找n的最小因子除了1
smallest_factor = n
for f in range(2, min(10, n + 1)):
if n % f == 0:
smallest_factor = f
break
if smallest_factor < n:
# 找到了因子,使用分解策略
quotient = n // smallest_factor
# 尝试构造smallest_factor
for current in range(1, 10):
diff = smallest_factor - current
print(f"add {diff}")
sys.stdout.flush()
response = int(input())
if response == 1:
# 成功构造factor现在乘以quotient
print(f"mul {quotient}")
sys.stdout.flush()
response = int(input())
break
else:
# n是质数或没有小因子使用直接加法
for current in range(1, 10):
diff = n - current
if diff > 0 and diff <= 10**18:
print(f"add {diff}")
sys.stdout.flush()
response = int(input())
if response == 1:
break
# 输出答案
print("!")
sys.stdout.flush()
final_response = int(input())
def main():
t = int(input())
for _ in range(t):
solve()
if __name__ == "__main__":
main()

View File

@ -29,6 +29,7 @@ WALL_IMAGE = f"{ASSETS_PATH}/wall.png"
COIN_IMAGE = f"{ASSETS_PATH}/coin.png" COIN_IMAGE = f"{ASSETS_PATH}/coin.png"
TRAP_IMAGE = f"{ASSETS_PATH}/trap.png" TRAP_IMAGE = f"{ASSETS_PATH}/trap.png"
BOSS_IMAGE = f"{ASSETS_PATH}/boss.jpg" BOSS_IMAGE = f"{ASSETS_PATH}/boss.jpg"
LOCK_IMAGE = f"{ASSETS_PATH}/lock.png"
START_BUTTON_IMAGE = f"{ASSETS_PATH}/start_button.png" START_BUTTON_IMAGE = f"{ASSETS_PATH}/start_button.png"
SAVE_BUTTON_IMAGE = f"{ASSETS_PATH}/save.png" SAVE_BUTTON_IMAGE = f"{ASSETS_PATH}/save.png"
LOAD_BUTTON_IMAGE = f"{ASSETS_PATH}/load.png" LOAD_BUTTON_IMAGE = f"{ASSETS_PATH}/load.png"

43
debug_maze.py Normal file
View File

@ -0,0 +1,43 @@
#!/usr/bin/env python3
"""
调试迷宫生成问题
"""
import sys
import os
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
from maze_generator import MazeGenerator
def debug_maze_generation():
"""调试迷宫生成"""
print("=== 调试迷宫生成 ===")
# 创建迷宫生成器
generator = MazeGenerator(size=15, filename="debug_test.csv")
print(f"迷宫尺寸: {generator.size}")
# 初始化迷宫
generator.initialize_maze()
print(f"初始化后的迷宫大小: {len(generator.maze)} x {len(generator.maze[0]) if generator.maze else 0}")
# 生成迷宫结构
generator.create_maze(1, 1, generator.size - 2, generator.size - 2)
# 检查可用单元格
available_cells = generator.get_available_cells()
print(f"可用单元格数量: {len(available_cells)}")
if len(available_cells) == 0:
print("❌ 没有可用单元格,检查迷宫结构...")
# 打印迷宫以便调试
print("迷宫结构:")
for i, row in enumerate(generator.maze):
print(f"{i}行: {row}")
else:
print(f"✅ 找到 {len(available_cells)} 个可用单元格")
print(f"前5个可用单元格: {available_cells[:5]}")
if __name__ == "__main__":
debug_maze_generation()

38
main.py
View File

@ -6,6 +6,7 @@ from maze import Maze
from draw import Button, Toast from draw import Button, Toast
from save_ui import SaveLoadUI from save_ui import SaveLoadUI
from boss_fight_ui import BossFightUI from boss_fight_ui import BossFightUI
from mechanism_ui import MechanismUI
from config import * from config import *
import sys import sys
import os import os
@ -81,6 +82,7 @@ if __name__ == "__main__":
image_coin = pygame.image.load(COIN_IMAGE).convert_alpha() image_coin = pygame.image.load(COIN_IMAGE).convert_alpha()
image_trap = pygame.image.load(TRAP_IMAGE).convert_alpha() image_trap = pygame.image.load(TRAP_IMAGE).convert_alpha()
image_boss = pygame.image.load(BOSS_IMAGE).convert_alpha() image_boss = pygame.image.load(BOSS_IMAGE).convert_alpha()
image_lock = pygame.image.load(LOCK_IMAGE).convert_alpha()
# 初始按钮位置和按钮 # 初始按钮位置和按钮
button_positions = get_button_positions() button_positions = get_button_positions()
@ -101,6 +103,9 @@ if __name__ == "__main__":
# 创建Boss战斗界面 # 创建Boss战斗界面
boss_fight_ui = BossFightUI() boss_fight_ui = BossFightUI()
# 创建机关界面
mechanism_ui = MechanismUI(textFont)
# 路径控制变量 # 路径控制变量
auto_play = False auto_play = False
auto_play_timer = 0 auto_play_timer = 0
@ -131,16 +136,20 @@ if __name__ == "__main__":
boss_fight_ui.update() boss_fight_ui.update()
# 自动播放逻辑 # 自动播放逻辑
if auto_play and len(maze.full_path) > 0 and not maze.show_history and not boss_fight_ui.is_showing: if auto_play and len(maze.full_path) > 0 and not maze.show_history and not boss_fight_ui.is_showing and not mechanism_ui.is_showing:
auto_play_timer += 1 auto_play_timer += 1
if auto_play_timer >= auto_play_interval: if auto_play_timer >= auto_play_interval:
has_next, boss_encountered, boss_info = maze.next_path_step() has_next, boss_encountered, boss_info, mechanism_encountered, mechanism_info = maze.next_path_step()
if not has_next: if not has_next:
auto_play = False # 路径播放完成后停止自动播放 auto_play = False # 路径播放完成后停止自动播放
elif boss_encountered and boss_info: elif boss_encountered and boss_info:
# 显示Boss战斗界面 # 显示Boss战斗界面
boss_fight_ui.show_boss_fight(boss_info['boss_data'], boss_info['player_skills']) boss_fight_ui.show_boss_fight(boss_info['boss_data'], boss_info['player_skills'])
auto_play = False # 遇到boss时停止自动播放 auto_play = False # 遇到boss时停止自动播放
elif mechanism_encountered and mechanism_info:
# 显示机关界面
mechanism_ui.show_mechanism()
auto_play = False # 遇到机关时停止自动播放
auto_play_timer = 0 auto_play_timer = 0
# 历史迭代自动播放逻辑 # 历史迭代自动播放逻辑
@ -152,7 +161,11 @@ if __name__ == "__main__":
history_auto_timer = 0 history_auto_timer = 0
for event in pygame.event.get(): for event in pygame.event.get():
# 首先让Boss战斗界面处理事件 # 首先让机关界面处理事件
if mechanism_ui.handle_event(event):
continue
# 然后让Boss战斗界面处理事件
if boss_fight_ui.handle_event(event): if boss_fight_ui.handle_event(event):
continue continue
@ -166,8 +179,8 @@ if __name__ == "__main__":
elif save_result == "load_failed": elif save_result == "load_failed":
mes5.show() mes5.show()
# 如果存档界面或Boss战斗界面正在显示,不处理其他按钮事件 # 如果存档界面、Boss战斗界面或机关界面正在显示,不处理其他按钮事件
if not save_ui.show_save_list and not boss_fight_ui.is_showing: if not save_ui.show_save_list and not boss_fight_ui.is_showing and not mechanism_ui.is_showing:
buttons['start'].handle_event(event=event) buttons['start'].handle_event(event=event)
buttons['save'].handle_event(event=event) buttons['save'].handle_event(event=event)
buttons['load'].handle_event(event=event) buttons['load'].handle_event(event=event)
@ -234,10 +247,13 @@ if __name__ == "__main__":
# 路径控制 # 路径控制
if buttons['next_step'].pressed == True and len(maze.full_path) > 0 and not maze.show_history: if buttons['next_step'].pressed == True and len(maze.full_path) > 0 and not maze.show_history:
has_next, boss_encountered, boss_info = maze.next_path_step() has_next, boss_encountered, boss_info, mechanism_encountered, mechanism_info = maze.next_path_step()
if boss_encountered and boss_info: if boss_encountered and boss_info:
# 显示Boss战斗界面 # 显示Boss战斗界面
boss_fight_ui.show_boss_fight(boss_info['boss_data'], boss_info['player_skills']) boss_fight_ui.show_boss_fight(boss_info['boss_data'], boss_info['player_skills'])
elif mechanism_encountered and mechanism_info:
# 显示机关界面
mechanism_ui.show_mechanism()
if buttons['reset_path'].pressed == True and len(maze.full_path) > 0 and not maze.show_history: if buttons['reset_path'].pressed == True and len(maze.full_path) > 0 and not maze.show_history:
maze.reset_path() maze.reset_path()
@ -266,10 +282,13 @@ if __name__ == "__main__":
# 键盘控制 # 键盘控制
if event.type == pygame.KEYDOWN: if event.type == pygame.KEYDOWN:
if event.key == pygame.K_SPACE and len(maze.full_path) > 0 and not maze.show_history: if event.key == pygame.K_SPACE and len(maze.full_path) > 0 and not maze.show_history:
has_next, boss_encountered, boss_info = maze.next_path_step() has_next, boss_encountered, boss_info, mechanism_encountered, mechanism_info = maze.next_path_step()
if boss_encountered and boss_info: if boss_encountered and boss_info:
# 显示Boss战斗界面 # 显示Boss战斗界面
boss_fight_ui.show_boss_fight(boss_info['boss_data'], boss_info['player_skills']) boss_fight_ui.show_boss_fight(boss_info['boss_data'], boss_info['player_skills'])
elif mechanism_encountered and mechanism_info:
# 显示机关界面
mechanism_ui.show_mechanism()
elif event.key == pygame.K_r and len(maze.full_path) > 0 and not maze.show_history: elif event.key == pygame.K_r and len(maze.full_path) > 0 and not maze.show_history:
maze.reset_path() maze.reset_path()
auto_play = False auto_play = False
@ -312,7 +331,7 @@ if __name__ == "__main__":
running = False running = False
maze.draw(screen=screen, wall_texture=image_wall, coin_texture=image_coin, trap_texture=image_trap, boss_texture=image_boss) maze.draw(screen=screen, wall_texture=image_wall, coin_texture=image_coin, trap_texture=image_trap, boss_texture=image_boss, lock_texture=image_lock)
buttons['start'].draw(screen=screen) buttons['start'].draw(screen=screen)
buttons['save'].draw(screen=screen) buttons['save'].draw(screen=screen)
buttons['load'].draw(screen=screen) buttons['load'].draw(screen=screen)
@ -388,6 +407,9 @@ if __name__ == "__main__":
# 绘制Boss战斗界面必须在最上层 # 绘制Boss战斗界面必须在最上层
boss_fight_ui.draw(screen) boss_fight_ui.draw(screen)
# 绘制机关界面(必须在最上层)
mechanism_ui.draw(screen)
pygame.display.flip() pygame.display.flip()
pygame.quit() pygame.quit()

51
maze.py
View File

@ -36,6 +36,10 @@ class Maze:
self.boss_data = [] # Boss血量序列 self.boss_data = [] # Boss血量序列
self.player_skills = [] # 玩家技能序列 self.player_skills = [] # 玩家技能序列
# 已遇到的Boss和机关位置记录避免重复触发
self.encountered_bosses = set() # 已遇到的Boss位置 (y, x)
self.encountered_mechanisms = set() # 已遇到的机关位置 (y, x)
def update_display_size(self): def update_display_size(self):
"""根据当前迷宫大小更新显示尺寸""" """根据当前迷宫大小更新显示尺寸"""
if len(self.grid) > 0: if len(self.grid) > 0:
@ -84,6 +88,11 @@ class Maze:
print(f"Boss数据: {self.boss_data}") print(f"Boss数据: {self.boss_data}")
print(f"玩家技能: {self.player_skills}") print(f"玩家技能: {self.player_skills}")
# 在路径上放置机关只放置1个
placed_mechanisms = self.generater.place_mechanisms_on_path(self.full_path, mechanisms_count=1)
if placed_mechanisms:
print(f"已在路径上放置 {len(placed_mechanisms)} 个机关")
# 设置显示状态 # 设置显示状态
self.grid = self.generater.maze # 使用原始迷宫数据 self.grid = self.generater.maze # 使用原始迷宫数据
print(self.grid) print(self.grid)
@ -98,14 +107,21 @@ class Maze:
if self.path_step < len(self.full_path): if self.path_step < len(self.full_path):
# 获取当前要显示的位置 # 获取当前要显示的位置
current_y, current_x = self.full_path[self.path_step] current_y, current_x = self.full_path[self.path_step]
current_position = (current_y, current_x)
# 检查当前位置是否有boss # 检查当前位置是否有boss或机关
boss_encountered = False boss_encountered = False
mechanism_encountered = False
boss_info = None boss_info = None
mechanism_info = None
if self.generater.maze: if self.generater.maze:
current_cell = str(self.generater.maze[current_y][current_x]) current_cell = str(self.generater.maze[current_y][current_x])
if current_cell.lower().startswith('b'):
# 检查Boss只有在之前没有遇到过这个位置的Boss时才触发
if current_cell.lower().startswith('b') and current_position not in self.encountered_bosses:
boss_encountered = True boss_encountered = True
self.encountered_bosses.add(current_position) # 记录已遇到的Boss位置
# 如果有boss数据和玩家技能数据创建boss信息 # 如果有boss数据和玩家技能数据创建boss信息
if self.boss_data and self.player_skills: if self.boss_data and self.player_skills:
boss_info = { boss_info = {
@ -117,12 +133,22 @@ class Maze:
print(f"遇到Boss但缺少战斗数据Boss数据: {self.boss_data}, 玩家技能: {self.player_skills}") print(f"遇到Boss但缺少战斗数据Boss数据: {self.boss_data}, 玩家技能: {self.player_skills}")
boss_info = None boss_info = None
# 检查机关(只有在之前没有遇到过这个位置的机关时才触发)
elif current_cell.lower().startswith('l') and current_position not in self.encountered_mechanisms:
mechanism_encountered = True
self.encountered_mechanisms.add(current_position) # 记录已遇到的机关位置
mechanism_info = {
'position': (current_y, current_x),
'cell_value': current_cell
}
print(f"遇到机关!位置: ({current_y}, {current_x}), 机关值: {current_cell}")
self.path_step += 1 self.path_step += 1
self.update_grid_with_path() self.update_grid_with_path()
# 返回是否遇到boss和boss信息 # 返回是否有下一步、是否遇到boss、boss信息、是否遇到机关、机关信息
return True, boss_encountered, boss_info return True, boss_encountered, boss_info, mechanism_encountered, mechanism_info
return False, False, None return False, False, None, False, None
def reset_path(self): def reset_path(self):
"""重置路径显示""" """重置路径显示"""
@ -130,6 +156,11 @@ class Maze:
self.is_path_complete = False self.is_path_complete = False
self.grid = self.generater.maze if self.generater.maze else [] self.grid = self.generater.maze if self.generater.maze else []
# 重置已遇到的Boss和机关记录允许重新体验
self.encountered_bosses = set()
self.encountered_mechanisms = set()
print("路径重置Boss和机关遭遇记录已清除")
def auto_advance_path(self): def auto_advance_path(self):
"""自动推进路径显示""" """自动推进路径显示"""
if not self.is_path_complete: if not self.is_path_complete:
@ -221,7 +252,7 @@ class Maze:
def draw(self, screen, wall_texture, coin_texture, trap_texture, boss_texture): def draw(self, screen, wall_texture, coin_texture, trap_texture, boss_texture, lock_texture):
if len(self.grid) == 0: if len(self.grid) == 0:
return return
@ -234,6 +265,7 @@ class Maze:
coin_texture = pygame.transform.scale(coin_texture, (tile_size, tile_size)) coin_texture = pygame.transform.scale(coin_texture, (tile_size, tile_size))
trap_texture = pygame.transform.scale(trap_texture, (tile_size, tile_size)) trap_texture = pygame.transform.scale(trap_texture, (tile_size, tile_size))
boss_texture = pygame.transform.scale(boss_texture, (tile_size, tile_size)) boss_texture = pygame.transform.scale(boss_texture, (tile_size, tile_size))
lock_texture = pygame.transform.scale(lock_texture, (tile_size, tile_size))
for y in range(self.size): for y in range(self.size):
for x in range(self.size): for x in range(self.size):
@ -243,6 +275,9 @@ class Maze:
if self.grid[y][x].startswith('b'): if self.grid[y][x].startswith('b'):
screen.blit(boss_texture, (x * tile_size, y * tile_size)) screen.blit(boss_texture, (x * tile_size, y * tile_size))
continue continue
if self.grid[y][x].startswith('l'):
screen.blit(lock_texture, (x * tile_size, y * tile_size))
continue
if self.grid[y][x].startswith('g'): if self.grid[y][x].startswith('g'):
screen.blit(coin_texture, (x * tile_size, y * tile_size)) screen.blit(coin_texture, (x * tile_size, y * tile_size))
@ -371,6 +406,10 @@ class Maze:
self.is_path_complete = False self.is_path_complete = False
self.full_path = [] self.full_path = []
# 重置已遇到的Boss和机关记录
self.encountered_bosses = set()
self.encountered_mechanisms = set()
# 显示相关状态 # 显示相关状态
self.grid = [] self.grid = []

View File

@ -129,17 +129,16 @@ class MazeGenerator:
def place_special_elements(self, boss_count=0, traps_range=(3, 8), def place_special_elements(self, boss_count=0, traps_range=(3, 8),
mechanisms_range=(2, 6), skill_traps=5,gold_range=(3,8)): mechanisms_range=(2, 6), skill_traps=5,gold_range=(3,8)):
"""放置特殊元素(支持技能触发陷阱)- 不包括BossBoss将在路径生成后放置""" """放置特殊元素(支持技能触发陷阱)- 不包括Boss和机关,这些将在路径生成后放置"""
available = self.get_available_cells() available = self.get_available_cells()
random.shuffle(available) random.shuffle(available)
# 计算所需单元格数量不包括Boss # 计算所需单元格数量不包括Boss和机关
required = 2 + random.randint(*traps_range) + random.randint(*mechanisms_range) + skill_traps + random.randint(*gold_range) required = 2 + random.randint(*traps_range) + skill_traps + random.randint(*gold_range)
if len(available) < required: if len(available) < required:
raise ValueError(f"空间不足,需要{required}个单元格,实际可用{len(available)}") raise ValueError(f"空间不足,需要{required}个单元格,实际可用{len(available)}")
# 放置出入口 # 放置出入口
start, end = available.pop(), available.pop() start, end = available.pop(), available.pop()
self.special_elements.extend([(start[0], start[1], self.START), (end[0], end[1], self.END)]) self.special_elements.extend([(start[0], start[1], self.START), (end[0], end[1], self.END)])
self.maze[start[0]][start[1]] = self.START self.maze[start[0]][start[1]] = self.START
@ -161,24 +160,33 @@ class MazeGenerator:
self.special_elements.append((pos[0], pos[1], f"{self.TRAP}{val}")) self.special_elements.append((pos[0], pos[1], f"{self.TRAP}{val}"))
self.maze[pos[0]][pos[1]] = f"{self.TRAP}{val}" self.maze[pos[0]][pos[1]] = f"{self.TRAP}{val}"
# 放置机关 # 技能触发陷阱
mechanisms = random.randint(*mechanisms_range) for _ in range(skill_traps):
for _ in range(mechanisms):
pos = available.pop() pos = available.pop()
val = random.randint(10, 30) val = random.randint(5, 20)
self.special_elements.append((pos[0], pos[1], f"{self.MECHANISM}{val}")) self.special_elements.append((pos[0], pos[1], f"{self.TRAP}{val}"))
self.maze[pos[0]][pos[1]] = f"{self.MECHANISM}{val}" self.maze[pos[0]][pos[1]] = f"{self.TRAP}{val}"
# 注释掉机关放置,机关将在路径生成后放置
# # 放置机关
# mechanisms = random.randint(*mechanisms_range)
# for _ in range(mechanisms):
# pos = available.pop()
# val = random.randint(10, 30)
# self.special_elements.append((pos[0], pos[1], f"{self.MECHANISM}{val}"))
# self.maze[pos[0]][pos[1]] = f"{self.MECHANISM}{val}"
# 放置金币 # 放置金币
mechanisms = random.randint(*gold_range) gold_count = random.randint(*gold_range)
for _ in range(mechanisms): for _ in range(gold_count):
pos = available.pop() pos = available.pop()
val = random.randint(10, 30) val = random.randint(10, 30)
self.special_elements.append((pos[0], pos[1], f"{self.GOLD}{val}")) self.special_elements.append((pos[0], pos[1], f"{self.GOLD}{val}"))
self.maze[pos[0]][pos[1]] = f"{self.GOLD}{val}" self.maze[pos[0]][pos[1]] = f"{self.GOLD}{val}"
def generate(self, seed=None, traps_range=(3, 8), def generate(self, seed=None, traps_range=(3, 8),
mechanisms_range=(2, 6), skill_traps=5): mechanisms_range=(1, 1), skill_traps=5):
"""生成迷宫主方法 - Boss将在路径生成后单独放置""" """生成迷宫主方法 - Boss和机关将在路径生成后单独放置"""
# 清除之前的历史记录 # 清除之前的历史记录
self.history_mazes = [] self.history_mazes = []
self.special_elements = [] self.special_elements = []
@ -187,8 +195,8 @@ class MazeGenerator:
self.initialize_maze() self.initialize_maze()
self.create_maze(1, 1, self.size - 2, self.size - 2) self.create_maze(1, 1, self.size - 2, self.size - 2)
self.patch_maze_edges() # 自动修正边界 self.patch_maze_edges() # 自动修正边界
self.place_special_elements(0, traps_range, mechanisms_range, skill_traps) # boss_count=0 self.place_special_elements(0, traps_range, mechanisms_range, skill_traps) # boss_count=0, mechanisms也不在这里放置
print(f"成功生成迷宫: {self.name} (Boss将在路径生成后放置)") print(f"成功生成迷宫: {self.name} (Boss和机关将在路径生成后放置)")
def export_to_csv(self, filename): def export_to_csv(self, filename):
"""导出迷宫到CSV文件""" """导出迷宫到CSV文件"""
@ -399,6 +407,63 @@ class MazeGenerator:
return placed_bosses return placed_bosses
def place_mechanisms_on_path(self, path, mechanisms_count=1, mechanisms_range=(1, 1)):
"""
在给定路径上随机放置机关
Args:
path: 路径列表格式为[(y1, x1), (y2, x2), ...]
mechanisms_count: 要放置的机关数量默认为1
mechanisms_range: 机关数量范围当mechanisms_count为None时使用
Returns:
list: 放置机关的位置列表
"""
if not path or len(path) < 3:
print("路径太短,无法放置机关")
return []
# 如果没有指定机关数量使用默认值1
if mechanisms_count is None:
mechanisms_count = 1
# 排除起点和终点,只在中间路径上放置机关
middle_path = path[1:-1] # 去掉第一个(起点)和最后一个(终点)
# 过滤掉已经被Boss和其他特殊元素占据的位置
available_positions = []
for pos in middle_path:
y, x = pos
cell_str = str(self.maze[y][x])
# 只在通路位置或路径标记位置放置机关避免覆盖Boss和其他特殊元素
if (self.maze[y][x] == self.ROUTE or cell_str.startswith('p')) and not cell_str.startswith('b'):
available_positions.append(pos)
if len(available_positions) < mechanisms_count:
print(f"路径中可用位置不足,只能放置{len(available_positions)}个机关")
mechanisms_count = len(available_positions)
if mechanisms_count <= 0:
print("无可用位置放置机关")
return []
# 随机选择机关放置位置,确保不重复
mechanism_positions = random.sample(available_positions, mechanisms_count)
placed_mechanisms = []
for pos in mechanism_positions:
y, x = pos
# 再次检查位置是否可用(避免重复放置)
if self.maze[y][x] == self.ROUTE or str(self.maze[y][x]).startswith('p'):
val = random.randint(10, 30)
mechanism_element = f"{self.MECHANISM}{val}"
self.maze[y][x] = mechanism_element
self.special_elements.append((y, x, mechanism_element))
placed_mechanisms.append((y, x, val))
print(f"在路径位置 ({y}, {x}) 放置机关,奖励: {val}")
return placed_mechanisms
def main(): def main():
# 示例1: 生成带技能陷阱的迷宫 # 示例1: 生成带技能陷阱的迷宫
generator = MazeGenerator( generator = MazeGenerator(

146
mechanism_ui.py Normal file
View File

@ -0,0 +1,146 @@
import pygame
import json
import random
import os
from config import *
class MechanismUI:
def __init__(self, font):
self.font = font
self.is_showing = False
self.mechanism_data = None
self.window_rect = pygame.Rect(0, 0, 600, 400)
self.close_button_rect = pygame.Rect(0, 0, 80, 40)
self.setup_window()
def setup_window(self):
"""设置窗口位置"""
self.window_rect.center = (UI_WIDTH // 2, UI_HEIGHT // 2)
self.close_button_rect.x = self.window_rect.right - 90
self.close_button_rect.y = self.window_rect.y + 10
def load_random_password_file(self):
"""从pwd_output目录随机加载一个密码文件"""
pwd_dir = "pwd_output"
if not os.path.exists(pwd_dir):
print(f"目录 {pwd_dir} 不存在")
return None
# 获取所有json文件
json_files = [f for f in os.listdir(pwd_dir) if f.endswith('.json')]
if not json_files:
print(f"目录 {pwd_dir} 中没有找到json文件")
return None
# 随机选择一个文件
selected_file = random.choice(json_files)
file_path = os.path.join(pwd_dir, selected_file)
try:
with open(file_path, 'r', encoding='utf-8') as f:
data = json.load(f)
print(f"成功加载密码文件: {selected_file}")
return data
except Exception as e:
print(f"加载密码文件失败: {str(e)}")
return None
def show_mechanism(self):
"""显示机关界面"""
self.mechanism_data = self.load_random_password_file()
if self.mechanism_data:
self.is_showing = True
print("机关界面已显示")
else:
print("无法显示机关界面:密码数据加载失败")
def hide_mechanism(self):
"""隐藏机关界面"""
self.is_showing = False
self.mechanism_data = None
print("机关界面已隐藏")
def handle_event(self, event):
"""处理事件"""
if not self.is_showing:
return False
if event.type == pygame.MOUSEBUTTONDOWN:
if self.close_button_rect.collidepoint(event.pos):
self.hide_mechanism()
return True
elif event.type == pygame.KEYDOWN:
if event.key == pygame.K_ESCAPE:
self.hide_mechanism()
return True
return True # 阻止其他事件处理
def draw(self, screen):
"""绘制机关界面"""
if not self.is_showing or not self.mechanism_data:
return
# 绘制半透明背景
overlay = pygame.Surface((UI_WIDTH, UI_HEIGHT))
overlay.set_alpha(128)
overlay.fill((0, 0, 0))
screen.blit(overlay, (0, 0))
# 绘制主窗口
pygame.draw.rect(screen, COLOR_WHITE, self.window_rect)
pygame.draw.rect(screen, COLOR_BLACK, self.window_rect, 3)
# 绘制标题
title_text = self.font.render("机关密码破解", True, COLOR_BLACK)
title_rect = title_text.get_rect(centerx=self.window_rect.centerx, y=self.window_rect.y + 20)
screen.blit(title_text, title_rect)
# 绘制密码信息
password = self.mechanism_data.get("password", "未知")
password_text = self.font.render(f"最终密码: {password}", True, (255, 0, 0))
password_rect = password_text.get_rect(centerx=self.window_rect.centerx, y=self.window_rect.y + 60)
screen.blit(password_text, password_rect)
# 绘制三种策略的信息
results = self.mechanism_data.get("results", {})
y_offset = 100
method_names = {
"method1": "策略一: 暴力破解",
"method2": "策略二: 启发式搜索",
"method3": "策略三: 智能分析"
}
for method_key, method_info in results.items():
if method_key in method_names:
method_name = method_names[method_key]
tries = method_info.get("tries", 0)
password_array = method_info.get("password", [])
# 绘制策略名称
method_text = self.font.render(method_name, True, (0, 0, 255))
screen.blit(method_text, (self.window_rect.x + 30, self.window_rect.y + y_offset))
# 绘制尝试次数
tries_text = self.font.render(f"尝试次数: {tries}", True, COLOR_BLACK)
screen.blit(tries_text, (self.window_rect.x + 50, self.window_rect.y + y_offset + 25))
# 绘制密码数组
password_str = "".join(map(str, password_array))
password_array_text = self.font.render(f"密码: {password_str}", True, COLOR_GREEN)
screen.blit(password_array_text, (self.window_rect.x + 50, self.window_rect.y + y_offset + 50))
y_offset += 80
# 绘制关闭按钮
pygame.draw.rect(screen, COLOR_GRAY, self.close_button_rect)
pygame.draw.rect(screen, COLOR_BLACK, self.close_button_rect, 2)
close_text = self.font.render("关闭", True, COLOR_BLACK)
close_rect = close_text.get_rect(center=self.close_button_rect.center)
screen.blit(close_text, close_rect)
# 绘制操作提示
hint_text = self.font.render("按ESC键或点击关闭按钮退出", True, COLOR_GRAY)
hint_rect = hint_text.get_rect(centerx=self.window_rect.centerx, y=self.window_rect.bottom - 30)
screen.blit(hint_text, hint_rect)

381
mylock.py
View File

@ -1,5 +1,6 @@
import os import os
import json import json
import random
from Lock import PasswordLock from Lock import PasswordLock
@ -18,190 +19,204 @@ def satisfies_prime_unique_condition(digits):
return all(is_prime(d) for d in digits) and len(set(digits)) == 3 return all(is_prime(d) for d in digits) and len(set(digits)) == 3
def crack_method1(conditions): def crack_method1(conditions, stored_hash):
"""从高位到低位回溯(第一位→第二位→第三位)""" """从高位到低位回溯(第一位→第二位→第三位)"""
possible_passwords = [] tries = 1
tries = 0 found_password = None
found = False
lock = PasswordLock()
# 根据线索生成每位的合法数字范围
digit_options = [[] for _ in range(3)]
for i in range(3):
for d in range(10):
valid = True
for cond in conditions:
if cond == [-1, -1]:
if not is_prime(d):
valid = False
break
elif len(cond) == 2:
a, t = cond
a = abs(a)
if a - 1 == i and ((t == 0 and d % 2 != 0) or (t == 1 and d % 2 != 1)):
valid = False
break
elif len(cond) == 3:
if cond[i] != -1 and d != cond[i]:
valid = False
break
if valid:
digit_options[i].append(d)
for i in range(3):
random.shuffle(digit_options[i])
def backtrack(index, current_digits): def backtrack(index, current_digits):
nonlocal tries nonlocal tries, found, found_password
tries += 1 if found:
if index == 3:
for condition in conditions:
if condition == [-1, -1]:
if not satisfies_prime_unique_condition(current_digits):
return
elif len(condition) == 2:
a, t = condition
a = abs(a)
if 1 <= a <= 3:
if t == 0 and current_digits[a - 1] % 2 != 0:
return
elif t == 1 and current_digits[a - 1] % 2 != 1:
return
else:
return
elif len(condition) == 3:
b1, b2, b3 = condition
if b1 != -1 and current_digits[0] != b1:
return
if b2 != -1 and current_digits[1] != b2:
return
if b3 != -1 and current_digits[2] != b3:
return
possible_passwords.append("".join(map(str, current_digits)))
return return
for digit in range(10): if index == 3:
if index == 0: password = "".join(map(str, current_digits))
has_fixed_value = any(len(cond) == 3 and cond[0] != -1 for cond in conditions) calculated_hash = lock.hash_password(password)
if has_fixed_value:
fixed_values = [cond[0] for cond in conditions if len(cond) == 3 and cond[0] != -1]
if digit not in fixed_values: if calculated_hash == stored_hash:
continue found_password = password
elif index == 1: found = True
has_fixed_value = any(len(cond) == 3 and cond[1] != -1 for cond in conditions) return
if has_fixed_value:
fixed_values = [cond[1] for cond in conditions if len(cond) == 3 and cond[1] != -1] tries += 1
if digit not in fixed_values: return
continue
elif index == 2: for digit in digit_options[index]:
has_fixed_value = any(len(cond) == 3 and cond[2] != -1 for cond in conditions)
if has_fixed_value:
fixed_values = [cond[2] for cond in conditions if len(cond) == 3 and cond[2] != -1]
if digit not in fixed_values:
continue
current_digits.append(digit) current_digits.append(digit)
backtrack(index + 1, current_digits) backtrack(index + 1, current_digits)
current_digits.pop() current_digits.pop()
if found:
return
backtrack(0, []) backtrack(0, [])
return possible_passwords, tries return [found_password] if found_password else [], tries
def crack_method2(conditions): def crack_method2(conditions, stored_hash):
"""从第二位开始回溯(第二位→第三位→第一位)""" """按条件优先级排序的回溯方法:先处理约束最多的位置"""
possible_passwords = [] tries = 1
tries = 0 found_password = None
found = False
lock = PasswordLock()
digit_options = [[] for _ in range(3)]
for i in range(3):
for d in range(10):
valid = True
for cond in conditions:
if cond == [-1, -1]:
if not is_prime(d):
valid = False
break
elif len(cond) == 2:
a, t = cond
a = abs(a)
if a - 1 == i and ((t == 0 and d % 2 != 0) or (t == 1 and d % 2 != 1)):
valid = False
break
elif len(cond) == 3:
if cond[i] != -1 and d != cond[i]:
valid = False
break
if valid:
digit_options[i].append(d)
for i in range(3):
random.shuffle(digit_options[i])
sorted_indices = sorted(range(3), key=lambda x: len(digit_options[x]))
def backtrack(index, current_digits): def backtrack(index, current_digits):
nonlocal tries nonlocal tries, found, found_password
tries += 1 if found:
if index == 3:
reordered = [current_digits[2], current_digits[0], current_digits[1]]
for condition in conditions:
if condition == [-1, -1]:
if not satisfies_prime_unique_condition(reordered):
return
elif len(condition) == 2:
a, t = condition
a = abs(a)
if 1 <= a <= 3:
if t == 0 and reordered[a - 1] % 2 != 0:
return
elif t == 1 and reordered[a - 1] % 2 != 1:
return
else:
return
elif len(condition) == 3:
b1, b2, b3 = condition
if b1 != -1 and reordered[0] != b1:
return
if b2 != -1 and reordered[1] != b2:
return
if b3 != -1 and reordered[2] != b3:
return
possible_passwords.append("".join(map(str, reordered)))
return return
for digit in range(10): if index == 3:
if index == 0: # 第二位 reordered = [0, 0, 0]
has_fixed_value = any(len(cond) == 3 and cond[1] != -1 for cond in conditions) for i, pos in enumerate(sorted_indices):
if has_fixed_value: reordered[pos] = current_digits[i]
fixed_values = [cond[1] for cond in conditions if len(cond) == 3 and cond[1] != -1] password = "".join(map(str, reordered))
if digit not in fixed_values: calculated_hash = lock.hash_password(password)
continue
elif index == 1: # 第三位 if calculated_hash == stored_hash:
has_fixed_value = any(len(cond) == 3 and cond[2] != -1 for cond in conditions) found_password = password
if has_fixed_value: found = True
fixed_values = [cond[2] for cond in conditions if len(cond) == 3 and cond[2] != -1] return
if digit not in fixed_values:
continue tries += 1
elif index == 2: # 第一位 return
has_fixed_value = any(len(cond) == 3 and cond[0] != -1 for cond in conditions)
if has_fixed_value: current_index = sorted_indices[index]
fixed_values = [cond[0] for cond in conditions if len(cond) == 3 and cond[0] != -1] for digit in digit_options[current_index]:
if digit not in fixed_values:
continue
current_digits.append(digit) current_digits.append(digit)
backtrack(index + 1, current_digits) backtrack(index + 1, current_digits)
current_digits.pop() current_digits.pop()
if found:
return
backtrack(0, []) backtrack(0, [])
return possible_passwords, tries return [found_password] if found_password else [], tries
def crack_method3(conditions): def crack_method3(conditions, stored_hash):
"""从第三位开始回溯(第三位→第一位→第二位)""" """双向回溯:从左右两侧同时构建密码"""
possible_passwords = [] tries = 1
tries = 0 found_password = None
found = False
lock = PasswordLock()
def backtrack(index, current_digits): digit_options = [[] for _ in range(3)]
nonlocal tries
tries += 1 for i in range(3):
if index == 3: for d in range(10):
reordered = [current_digits[1], current_digits[2], current_digits[0]] valid = True
for condition in conditions: for cond in conditions:
if condition == [-1, -1]: if cond == [-1, -1]:
if not satisfies_prime_unique_condition(reordered): if not is_prime(d):
return valid = False
elif len(condition) == 2: break
a, t = condition elif len(cond) == 2:
a, t = cond
a = abs(a) a = abs(a)
if 1 <= a <= 3: if a - 1 == i and ((t == 0 and d % 2 != 0) or (t == 1 and d % 2 != 1)):
if t == 0 and reordered[a - 1] % 2 != 0: valid = False
return break
elif t == 1 and reordered[a - 1] % 2 != 1: elif len(cond) == 3:
return if cond[i] != -1 and d != cond[i]:
else: valid = False
return break
elif len(condition) == 3: if valid:
b1, b2, b3 = condition digit_options[i].append(d)
if b1 != -1 and reordered[0] != b1:
return for i in range(3):
if b2 != -1 and reordered[1] != b2: random.shuffle(digit_options[i])
return
if b3 != -1 and reordered[2] != b3: def backtrack(left_pos, right_pos, current_digits):
return nonlocal tries, found, found_password
possible_passwords.append("".join(map(str, reordered)))
if found:
return return
for digit in range(10): if len(current_digits) == 3:
if index == 0: # 第三位 password = "".join(map(str, current_digits))
has_fixed_value = any(len(cond) == 3 and cond[2] != -1 for cond in conditions) calculated_hash = lock.hash_password(password)
if has_fixed_value:
fixed_values = [cond[2] for cond in conditions if len(cond) == 3 and cond[2] != -1]
if digit not in fixed_values:
continue
elif index == 1: # 第一位
has_fixed_value = any(len(cond) == 3 and cond[0] != -1 for cond in conditions)
if has_fixed_value:
fixed_values = [cond[0] for cond in conditions if len(cond) == 3 and cond[0] != -1]
if digit not in fixed_values:
continue
elif index == 2: # 第二位
has_fixed_value = any(len(cond) == 3 and cond[1] != -1 for cond in conditions)
if has_fixed_value:
fixed_values = [cond[1] for cond in conditions if len(cond) == 3 and cond[1] != -1]
if digit not in fixed_values:
continue
current_digits.append(digit)
backtrack(index + 1, current_digits)
current_digits.pop()
backtrack(0, []) if calculated_hash == stored_hash:
return possible_passwords, tries found_password = password
found = True
return
tries += 1
return
# 根据当前方向选择位置
if left_pos <= right_pos:
for digit in digit_options[left_pos]:
current_digits.append(digit)
backtrack(left_pos + 1, right_pos, current_digits)
current_digits.pop()
if found:
return
else:
for digit in digit_options[right_pos]:
current_digits.insert(0, digit)
backtrack(left_pos, right_pos - 1, current_digits)
current_digits.pop(0)
if found:
return
backtrack(0, 2, [])
return [found_password] if found_password else [], tries
def format_json(data): def format_json(data):
"""自定义 JSON 格式化函数""" """自定义 JSON 格式化函数"""
@ -240,8 +255,8 @@ def format_json(data):
def main(): def main():
# 输入和输出路径 # 输入和输出路径
input_dir = r"" # path input_dir = r"pwd"
output_dir = r"" # path output_dir = r"pwd_output"
# 如果输出目录不存在,则创建 # 如果输出目录不存在,则创建
os.makedirs(output_dir, exist_ok=True) os.makedirs(output_dir, exist_ok=True)
@ -254,7 +269,7 @@ def main():
with open(input_file_path, 'r', encoding='utf-8') as f: with open(input_file_path, 'r', encoding='utf-8') as f:
try: try:
# 读取原始 JSON 文本内容(保留结构 # 读取原始 JSON 文本内容(字符串
original_content = f.read() original_content = f.read()
# 解析为字典用于处理 # 解析为字典用于处理
sample_data = json.loads(original_content) sample_data = json.loads(original_content)
@ -262,24 +277,36 @@ def main():
print(f"跳过无效的 JSON 文件: {filename}") print(f"跳过无效的 JSON 文件: {filename}")
continue continue
conditions = sample_data["C"] conditions = sample_data.get("C", [])
stored_hash = sample_data["L"] stored_hash = sample_data.get("L", "")
print(f"\n正在处理文件: {filename}") print(f"\n正在处理文件: {filename}")
pwd1, tries1 = crack_method1(conditions) # 调用三种方法破解密码
pwd2, tries2 = crack_method2(conditions) pwd1, tries1 = crack_method1(conditions, stored_hash)
pwd3, tries3 = crack_method3(conditions) pwd2, tries2 = crack_method2(conditions, stored_hash)
pwd3, tries3 = crack_method3(conditions, stored_hash)
lock = PasswordLock() # 找到第一个非空结果作为最终密码
matched_passwords = [] matched_passwords = []
if pwd1:
for pwd in pwd1 + pwd2 + pwd3: matched_passwords.append(pwd1[0])
if pwd not in matched_passwords and lock.verify_password(pwd, stored_hash): if pwd2:
matched_passwords.append(pwd) matched_passwords.append(pwd2[0])
if pwd3:
matched_passwords.append(pwd3[0])
first_match = matched_passwords[0] if matched_passwords else "" first_match = matched_passwords[0] if matched_passwords else ""
# 打印每个方法的尝试次数
print(f"方法1尝试次数: {tries1}")
print(f"方法2尝试次数: {tries2}")
print(f"方法3尝试次数: {tries3}")
# 计算并打印平均尝试次数
avg_tries = (tries1 + tries2 + tries3) / 3
print(f"平均尝试次数: {avg_tries:.1f}")
# 更新 JSON 内容中的结果部分 # 更新 JSON 内容中的结果部分
result_update = { result_update = {
"password": first_match, "password": first_match,
@ -303,6 +330,24 @@ def main():
print(f"结果已保存至: {output_file_path}") print(f"结果已保存至: {output_file_path}")
# 新增:比较写入内容是否与原始内容一致(忽略 results 字段中的 tries
with open(output_file_path, 'r', encoding='utf-8') as f:
written_content = f.read()
# 解析原始和写入后的内容为 dict
original_dict = json.loads(original_content)
written_dict = json.loads(written_content)
# 删除 results 字段用于比较
original_dict.pop("results", None)
written_dict.pop("results", None)
# 重新序列化为字符串进行比较
if json.dumps(original_dict, sort_keys=True) == json.dumps(written_dict, sort_keys=True):
print("输出内容(除 results 外)与原始内容一致")
else:
print("输出内容(除 results 外)与原始内容不一致")
if __name__ == "__main__": if __name__ == "__main__":
main() main()

13
pwd/pwd_000.json Normal file
View File

@ -0,0 +1,13 @@
{
"C": [
[2,-1,-1],
[-1,0,-1]
],
"L": "347088a782a525d04d5db928977eed08aaf985ad80e4912446adba1d717ab682",
"password": "205",
"results": {
"method1": {"tries": 6, "password": [2, 0, 5]},
"method2": {"tries": 7, "password": [2, 0, 5]},
"method3": {"tries": 5, "password": [2, 0, 5]}
}
}

14
pwd/pwd_001.json Normal file
View File

@ -0,0 +1,14 @@
{
"C": [
[-1,7,-1],
[1,1],
[2,1]
],
"L": "ef489e31e9f932ff343749a1f66f5132e4392161979ab6c75f7958b2107aa3aa",
"password": "773",
"results": {
"method1": {"tries": 34, "password": [7, 7, 3]},
"method2": {"tries": 35, "password": [7, 7, 3]},
"method3": {"tries": 36, "password": [7, 7, 3]}
}
}

14
pwd/pwd_002.json Normal file
View File

@ -0,0 +1,14 @@
{
"C": [
[3,-1,-1],
[3,1],
[2,0]
],
"L": "38b5eddb98061eb811e4660c492769a7641d77163748915f19b56da70b2bb4cd",
"password": "365",
"results": {
"method1": {"tries": 18, "password": [3, 6, 5]},
"method2": {"tries": 16, "password": [3, 6, 5]},
"method3": {"tries": 12, "password": [3, 6, 5]}
}
}

12
pwd/pwd_003.json Normal file
View File

@ -0,0 +1,12 @@
{
"C": [
[2,0]
],
"L": "54a76d5a60849cbe4a6e7f75d830fe73f413586f329cec620eaf69bea2ade132",
"password": "946",
"results": {
"method1": {"tries": 477, "password": [9, 4, 6]},
"method2": {"tries": 458, "password": [9, 4, 6]},
"method3": {"tries": 317, "password": [9, 4, 6]}
}
}

12
pwd/pwd_004.json Normal file
View File

@ -0,0 +1,12 @@
{
"C": [
[3,-1,-1]
],
"L": "755ba5c1907b9df34ef9d65c9ef9d32f25614816f3f6a5a699b86540ad7f46a9",
"password": "313",
"results": {
"method1": {"tries": 14, "password": [3, 1, 3]},
"method2": {"tries": 15, "password": [3, 1, 3]},
"method3": {"tries": 94, "password": [3, 1, 3]}
}
}

14
pwd/pwd_005.json Normal file
View File

@ -0,0 +1,14 @@
{
"C": [
[-1,9,-1],
[1,0],
[2,-1,-1]
],
"L": "b6b6f5f531ebb073c291dd679f1b01aab1dd4b7b3f94fa08bd126805650b37d8",
"password": "295",
"results": {
"method1": {"tries": 6, "password": [2, 9, 5]},
"method2": {"tries": 7, "password": [2, 9, 5]},
"method3": {"tries": 7, "password": [2, 9, 5]}
}
}

14
pwd/pwd_006.json Normal file
View File

@ -0,0 +1,14 @@
{
"C": [
[1,0],
[-1,3,-1],
[3,0]
],
"L": "286da4632ef25db843f432010a4ce57a9a20bbb2732743349e538387ff03fb97",
"password": "238",
"results": {
"method1": {"tries": 10, "password": [2, 3, 8]},
"method2": {"tries": 15, "password": [2, 3, 8]},
"method3": {"tries": 9, "password": [2, 3, 8]}
}
}

14
pwd/pwd_007.json Normal file
View File

@ -0,0 +1,14 @@
{
"C": [
[-1,-1,5],
[1,1],
[3,1]
],
"L": "528e74638d1476111b128f8d94883225bf7fdd607b89bc0f6e5c9947e0372b1a",
"password": "755",
"results": {
"method1": {"tries": 36, "password": [7, 5, 5]},
"method2": {"tries": 37, "password": [7, 5, 5]},
"method3": {"tries": 21, "password": [7, 5, 5]}
}
}

12
pwd/pwd_008.json Normal file
View File

@ -0,0 +1,12 @@
{
"C": [
[3,1]
],
"L": "1190fb88a3821ccece881dc87af9f877e036ff0ec858ff82d7c5431246657671",
"password": "477",
"results": {
"method1": {"tries": 239, "password": [4, 7, 7]},
"method2": {"tries": 29, "password": [4, 7, 7]},
"method3": {"tries": 259, "password": [4, 7, 7]}
}
}

12
pwd/pwd_009.json Normal file
View File

@ -0,0 +1,12 @@
{
"C": [
[-1,-1]
],
"L": "11cfd52ee4313c86fff1cc50c3403c891c94cdd2427fc985ab1cd380654cbfe1",
"password": "732",
"results": {
"method1": {"tries": 21, "password": [7, 3, 2]},
"method2": {"tries": 19, "password": [7, 3, 2]},
"method3": {"tries": 14, "password": [7, 3, 2]}
}
}

14
pwd/pwd_010.json Normal file
View File

@ -0,0 +1,14 @@
{
"C": [
[-1,-1],
[-1,2,-1],
[3,1]
],
"L": "54668768990130bb9311a9ecc4b1540aa989ec328be5e66860a0d0d222ac4751",
"password": "725",
"results": {
"method1": {"tries": 6, "password": [7, 2, 5]},
"method2": {"tries": 5, "password": [7, 2, 5]},
"method3": {"tries": 6, "password": [7, 2, 5]}
}
}

13
pwd/pwd_011.json Normal file
View File

@ -0,0 +1,13 @@
{
"C": [
[-1,-1,6],
[3,0]
],
"L": "a92ef4ff4c91b8dc516ab99793b250136367cb726854463ec0f20ea3a4074b33",
"password": "376",
"results": {
"method1": {"tries": 38, "password": [3, 7, 6]},
"method2": {"tries": 46, "password": [3, 7, 6]},
"method3": {"tries": 70, "password": [3, 7, 6]}
}
}

12
pwd/pwd_012.json Normal file
View File

@ -0,0 +1,12 @@
{
"C": [
[5,-1,-1]
],
"L": "1dc13577545c00c68900358e14499f863bd538529bf7fe25a1aa15538fcefd19",
"password": "533",
"results": {
"method1": {"tries": 34, "password": [5, 3, 3]},
"method2": {"tries": 45, "password": [5, 3, 3]},
"method3": {"tries": 74, "password": [5, 3, 3]}
}
}

14
pwd/pwd_013.json Normal file
View File

@ -0,0 +1,14 @@
{
"C": [
[2,1],
[1,1],
[-1,-1,7]
],
"L": "55d064bf74d7ad3f2383012ba22528483a51735c41caa315d6da4bc2932186da",
"password": "957",
"results": {
"method1": {"tries": 23, "password": [9, 5, 7]},
"method2": {"tries": 21, "password": [9, 5, 7]},
"method3": {"tries": 3, "password": [9, 5, 7]}
}
}

12
pwd/pwd_014.json Normal file
View File

@ -0,0 +1,12 @@
{
"C": [
[2,0]
],
"L": "72d4a72601bc0461c78b57774f04b2e331f6b54307dfd6a57da0404696405407",
"password": "322",
"results": {
"method1": {"tries": 163, "password": [3, 2, 2]},
"method2": {"tries": 224, "password": [3, 2, 2]},
"method3": {"tries": 233, "password": [3, 2, 2]}
}
}

14
pwd/pwd_015.json Normal file
View File

@ -0,0 +1,14 @@
{
"C": [
[3,1],
[2,1],
[-1,7,-1]
],
"L": "7a328a202c195ef362df07bb6b2440855eda415e38668231dd2520e3bb8826ef",
"password": "673",
"results": {
"method1": {"tries": 32, "password": [6, 7, 3]},
"method2": {"tries": 38, "password": [6, 7, 3]},
"method3": {"tries": 3, "password": [6, 7, 3]}
}
}

13
pwd/pwd_016.json Normal file
View File

@ -0,0 +1,13 @@
{
"C": [
[3,1],
[-1,-1,5]
],
"L": "81d5400ab2eca801a80837500be67485d0f8b297db1fa8ecbe4a23b66b65f6b8",
"password": "825",
"results": {
"method1": {"tries": 83, "password": [8, 2, 5]},
"method2": {"tries": 84, "password": [8, 2, 5]},
"method3": {"tries": 57, "password": [8, 2, 5]}
}
}

14
pwd/pwd_017.json Normal file
View File

@ -0,0 +1,14 @@
{
"C": [
[-1,4,-1],
[2,0],
[3,0]
],
"L": "28df3327f1bcdf12f715f4205bd5f8c99f5f44fb75453afc23e8bb0a3714241e",
"password": "342",
"results": {
"method1": {"tries": 17, "password": [3, 4, 2]},
"method2": {"tries": 23, "password": [3, 4, 2]},
"method3": {"tries": 47, "password": [3, 4, 2]}
}
}

13
pwd/pwd_018.json Normal file
View File

@ -0,0 +1,13 @@
{
"C": [
[-1,-1],
[-1,-1,3]
],
"L": "21967d701a06c3e02a934e208c599183e6da36ec4e7d5f8fdcfb3209474083fa",
"password": "273",
"results": {
"method1": {"tries": 2, "password": [2, 7, 3]},
"method2": {"tries": 2, "password": [2, 7, 3]},
"method3": {"tries": 2, "password": [2, 7, 3]}
}
}

12
pwd/pwd_019.json Normal file
View File

@ -0,0 +1,12 @@
{
"C": [
[2,0]
],
"L": "a8b1a9f6741f4903c9f8e337849118532809ebdfb05aa9b99c3377d529c5579c",
"password": "783",
"results": {
"method1": {"tries": 394, "password": [7, 8, 3]},
"method2": {"tries": 295, "password": [7, 8, 3]},
"method3": {"tries": 15, "password": [7, 8, 3]}
}
}

14
pwd/pwd_020.json Normal file
View File

@ -0,0 +1,14 @@
{
"C": [
[1,0],
[6,-1,-1],
[3,0]
],
"L": "5fce2d1a75f54c4dbf70ac4ad3b1d66920f7209e0aae5982f893447cddc4ce58",
"password": "652",
"results": {
"method1": {"tries": 27, "password": [6, 5, 2]},
"method2": {"tries": 33, "password": [6, 5, 2]},
"method3": {"tries": 18, "password": [6, 5, 2]}
}
}

14
pwd/pwd_021.json Normal file
View File

@ -0,0 +1,14 @@
{
"C": [
[1,1],
[2,0],
[-1,-1,8]
],
"L": "19350eedb2b07bedd0d604c04c26c7bd71f8b3dce8885a43df8085a9aa819bc0",
"password": "728",
"results": {
"method1": {"tries": 17, "password": [7, 2, 8]},
"method2": {"tries": 18, "password": [7, 2, 8]},
"method3": {"tries": 16, "password": [7, 2, 8]}
}
}

14
pwd/pwd_022.json Normal file
View File

@ -0,0 +1,14 @@
{
"C": [
[-1,-1,2],
[1,1],
[-1,2,-1]
],
"L": "35276b964e7b1f91eb9634ad24a7ef260d2cfd7d7a354209492b132ad66574a4",
"password": "722",
"results": {
"method1": {"tries": 4, "password": [7, 2, 2]},
"method2": {"tries": 4, "password": [7, 2, 2]},
"method3": {"tries": 3, "password": [7, 2, 2]}
}
}

12
pwd/pwd_023.json Normal file
View File

@ -0,0 +1,12 @@
{
"C": [
[-1,0,-1]
],
"L": "61399aa8f0e6d1336857bc64290db7a41af69edd7f8af6909bf981b539485ec8",
"password": "503",
"results": {
"method1": {"tries": 54, "password": [5, 0, 3]},
"method2": {"tries": 65, "password": [5, 0, 3]},
"method3": {"tries": 55, "password": [5, 0, 3]}
}
}

13
pwd/pwd_024.json Normal file
View File

@ -0,0 +1,13 @@
{
"C": [
[0,-1,-1],
[-1,5,-1]
],
"L": "670544e235ad5f18b949f224bfdc86e9751fbfe04f9fa202144825342e6e9a1c",
"password": "051",
"results": {
"method1": {"tries": 2, "password": [0, 5, 1]},
"method2": {"tries": 2, "password": [0, 5, 1]},
"method3": {"tries": 2, "password": [0, 5, 1]}
}
}

14
pwd/pwd_025.json Normal file
View File

@ -0,0 +1,14 @@
{
"C": [
[3,0],
[-1,-1,2],
[1,1]
],
"L": "4303efd52a6c11047de02002aced680808dbdd0c2c5ed6dc06f5d24f979d701b",
"password": "542",
"results": {
"method1": {"tries": 25, "password": [5, 4, 2]},
"method2": {"tries": 1, "password": [5, 4, 2]},
"method3": {"tries": 33, "password": [5, 4, 2]}
}
}

13
pwd/pwd_026.json Normal file
View File

@ -0,0 +1,13 @@
{
"C": [
[2,0],
[3,0]
],
"L": "dd21cbefcda693704ad8e8d8045d4bc01a2ba4875a8cc069a8105e5362b7f3b7",
"password": "226",
"results": {
"method1": {"tries": 59, "password": [2, 2, 6]},
"method2": {"tries": 89, "password": [2, 2, 6]},
"method3": {"tries": 209, "password": [2, 2, 6]}
}
}

12
pwd/pwd_027.json Normal file
View File

@ -0,0 +1,12 @@
{
"C": [
[-1,-1]
],
"L": "78cc114968ab659cb55dabd23e31d30186cf6529d6e7529cdfadb5940d5be8e5",
"password": "357",
"results": {
"method1": {"tries": 10, "password": [3, 5, 7]},
"method2": {"tries": 4, "password": [3, 5, 7]},
"method3": {"tries": 12, "password": [3, 5, 7]}
}
}

14
pwd/pwd_028.json Normal file
View File

@ -0,0 +1,14 @@
{
"C": [
[1,1],
[-1,1,-1],
[3,1]
],
"L": "fd6c3f5085ea7aec0ea67683fd144303b0747091af782b246683811047e6dab8",
"password": "715",
"results": {
"method1": {"tries": 18, "password": [7, 1, 5]},
"method2": {"tries": 16, "password": [7, 1, 5]},
"method3": {"tries": 3, "password": [7, 1, 5]}
}
}

13
pwd/pwd_029.json Normal file
View File

@ -0,0 +1,13 @@
{
"C": [
[3,0],
[-1,3,-1]
],
"L": "5e9bf15c58b8a37d559a77155d431df6f5352071fea05a49abf84902ddc73f79",
"password": "538",
"results": {
"method1": {"tries": 30, "password": [5, 3, 8]},
"method2": {"tries": 35, "password": [5, 3, 8]},
"method3": {"tries": 1, "password": [5, 3, 8]}
}
}

14
pwd_output/pwd_000.json Normal file
View File

@ -0,0 +1,14 @@
{
"C": [
[2, -1, -1],
[-1, 0, -1]
],
"L": "347088a782a525d04d5db928977eed08aaf985ad80e4912446adba1d717ab682",
"password": "205",
"results": {
"method1": {"tries": 1, "password": [2, 0, 5]},
"method2": {"tries": 6, "password": [2, 0, 5]},
"method3": {"tries": 6, "password": [2, 0, 5]}
}
}

14
pwd_output/pwd_001.json Normal file
View File

@ -0,0 +1,14 @@
{
"C": [
[-1, 7, -1],
[1, 1],
[2, 1]
],
"L": "ef489e31e9f932ff343749a1f66f5132e4392161979ab6c75f7958b2107aa3aa",
"password": "773",
"results": {
"method1": {"tries": 40, "password": [7, 7, 3]},
"method2": {"tries": 4, "password": [7, 7, 3]},
"method3": {"tries": 20, "password": [7, 7, 3]}
}
}

14
pwd_output/pwd_002.json Normal file
View File

@ -0,0 +1,14 @@
{
"C": [
[3, -1, -1],
[3, 1],
[2, 0]
],
"L": "38b5eddb98061eb811e4660c492769a7641d77163748915f19b56da70b2bb4cd",
"password": "365",
"results": {
"method1": {"tries": 9, "password": [3, 6, 5]},
"method2": {"tries": 24, "password": [3, 6, 5]},
"method3": {"tries": 18, "password": [3, 6, 5]}
}
}

12
pwd_output/pwd_003.json Normal file
View File

@ -0,0 +1,12 @@
{
"C": [
[2, 0]
],
"L": "54a76d5a60849cbe4a6e7f75d830fe73f413586f329cec620eaf69bea2ade132",
"password": "946",
"results": {
"method1": {"tries": 258, "password": [9, 4, 6]},
"method2": {"tries": 336, "password": [9, 4, 6]},
"method3": {"tries": 140, "password": [9, 4, 6]}
}
}

12
pwd_output/pwd_004.json Normal file
View File

@ -0,0 +1,12 @@
{
"C": [
[3, -1, -1]
],
"L": "755ba5c1907b9df34ef9d65c9ef9d32f25614816f3f6a5a699b86540ad7f46a9",
"password": "313",
"results": {
"method1": {"tries": 98, "password": [3, 1, 3]},
"method2": {"tries": 54, "password": [3, 1, 3]},
"method3": {"tries": 2, "password": [3, 1, 3]}
}
}

14
pwd_output/pwd_005.json Normal file
View File

@ -0,0 +1,14 @@
{
"C": [
[-1, 9, -1],
[1, 0],
[2, -1, -1]
],
"L": "b6b6f5f531ebb073c291dd679f1b01aab1dd4b7b3f94fa08bd126805650b37d8",
"password": "295",
"results": {
"method1": {"tries": 6, "password": [2, 9, 5]},
"method2": {"tries": 6, "password": [2, 9, 5]},
"method3": {"tries": 5, "password": [2, 9, 5]}
}
}

14
pwd_output/pwd_006.json Normal file
View File

@ -0,0 +1,14 @@
{
"C": [
[1, 0],
[-1, 3, -1],
[3, 0]
],
"L": "286da4632ef25db843f432010a4ce57a9a20bbb2732743349e538387ff03fb97",
"password": "238",
"results": {
"method1": {"tries": 19, "password": [2, 3, 8]},
"method2": {"tries": 3, "password": [2, 3, 8]},
"method3": {"tries": 9, "password": [2, 3, 8]}
}
}

14
pwd_output/pwd_007.json Normal file
View File

@ -0,0 +1,14 @@
{
"C": [
[-1, -1, 5],
[1, 1],
[3, 1]
],
"L": "528e74638d1476111b128f8d94883225bf7fdd607b89bc0f6e5c9947e0372b1a",
"password": "755",
"results": {
"method1": {"tries": 50, "password": [7, 5, 5]},
"method2": {"tries": 8, "password": [7, 5, 5]},
"method3": {"tries": 17, "password": [7, 5, 5]}
}
}

12
pwd_output/pwd_008.json Normal file
View File

@ -0,0 +1,12 @@
{
"C": [
[3, 1]
],
"L": "1190fb88a3821ccece881dc87af9f877e036ff0ec858ff82d7c5431246657671",
"password": "477",
"results": {
"method1": {"tries": 97, "password": [4, 7, 7]},
"method2": {"tries": 281, "password": [4, 7, 7]},
"method3": {"tries": 225, "password": [4, 7, 7]}
}
}

12
pwd_output/pwd_009.json Normal file
View File

@ -0,0 +1,12 @@
{
"C": [
[-1, -1]
],
"L": "11cfd52ee4313c86fff1cc50c3403c891c94cdd2427fc985ab1cd380654cbfe1",
"password": "732",
"results": {
"method1": {"tries": 43, "password": [7, 3, 2]},
"method2": {"tries": 34, "password": [7, 3, 2]},
"method3": {"tries": 54, "password": [7, 3, 2]}
}
}

14
pwd_output/pwd_010.json Normal file
View File

@ -0,0 +1,14 @@
{
"C": [
[-1, -1],
[-1, 2, -1],
[3, 1]
],
"L": "54668768990130bb9311a9ecc4b1540aa989ec328be5e66860a0d0d222ac4751",
"password": "725",
"results": {
"method1": {"tries": 12, "password": [7, 2, 5]},
"method2": {"tries": 1, "password": [7, 2, 5]},
"method3": {"tries": 6, "password": [7, 2, 5]}
}
}

13
pwd_output/pwd_011.json Normal file
View File

@ -0,0 +1,13 @@
{
"C": [
[-1, -1, 6],
[3, 0]
],
"L": "a92ef4ff4c91b8dc516ab99793b250136367cb726854463ec0f20ea3a4074b33",
"password": "376",
"results": {
"method1": {"tries": 97, "password": [3, 7, 6]},
"method2": {"tries": 1, "password": [3, 7, 6]},
"method3": {"tries": 78, "password": [3, 7, 6]}
}
}

12
pwd_output/pwd_012.json Normal file
View File

@ -0,0 +1,12 @@
{
"C": [
[5, -1, -1]
],
"L": "1dc13577545c00c68900358e14499f863bd538529bf7fe25a1aa15538fcefd19",
"password": "533",
"results": {
"method1": {"tries": 57, "password": [5, 3, 3]},
"method2": {"tries": 75, "password": [5, 3, 3]},
"method3": {"tries": 13, "password": [5, 3, 3]}
}
}

14
pwd_output/pwd_013.json Normal file
View File

@ -0,0 +1,14 @@
{
"C": [
[2, 1],
[1, 1],
[-1, -1, 7]
],
"L": "55d064bf74d7ad3f2383012ba22528483a51735c41caa315d6da4bc2932186da",
"password": "957",
"results": {
"method1": {"tries": 22, "password": [9, 5, 7]},
"method2": {"tries": 7, "password": [9, 5, 7]},
"method3": {"tries": 17, "password": [9, 5, 7]}
}
}

12
pwd_output/pwd_014.json Normal file
View File

@ -0,0 +1,12 @@
{
"C": [
[2, 0]
],
"L": "72d4a72601bc0461c78b57774f04b2e331f6b54307dfd6a57da0404696405407",
"password": "322",
"results": {
"method1": {"tries": 315, "password": [3, 2, 2]},
"method2": {"tries": 114, "password": [3, 2, 2]},
"method3": {"tries": 400, "password": [3, 2, 2]}
}
}

14
pwd_output/pwd_015.json Normal file
View File

@ -0,0 +1,14 @@
{
"C": [
[3, 1],
[2, 1],
[-1, 7, -1]
],
"L": "7a328a202c195ef362df07bb6b2440855eda415e38668231dd2520e3bb8826ef",
"password": "673",
"results": {
"method1": {"tries": 13, "password": [6, 7, 3]},
"method2": {"tries": 37, "password": [6, 7, 3]},
"method3": {"tries": 7, "password": [6, 7, 3]}
}
}

13
pwd_output/pwd_016.json Normal file
View File

@ -0,0 +1,13 @@
{
"C": [
[3, 1],
[-1, -1, 5]
],
"L": "81d5400ab2eca801a80837500be67485d0f8b297db1fa8ecbe4a23b66b65f6b8",
"password": "825",
"results": {
"method1": {"tries": 96, "password": [8, 2, 5]},
"method2": {"tries": 44, "password": [8, 2, 5]},
"method3": {"tries": 70, "password": [8, 2, 5]}
}
}

14
pwd_output/pwd_017.json Normal file
View File

@ -0,0 +1,14 @@
{
"C": [
[-1, 4, -1],
[2, 0],
[3, 0]
],
"L": "28df3327f1bcdf12f715f4205bd5f8c99f5f44fb75453afc23e8bb0a3714241e",
"password": "342",
"results": {
"method1": {"tries": 11, "password": [3, 4, 2]},
"method2": {"tries": 18, "password": [3, 4, 2]},
"method3": {"tries": 43, "password": [3, 4, 2]}
}
}

13
pwd_output/pwd_018.json Normal file
View File

@ -0,0 +1,13 @@
{
"C": [
[-1, -1],
[-1, -1, 3]
],
"L": "21967d701a06c3e02a934e208c599183e6da36ec4e7d5f8fdcfb3209474083fa",
"password": "273",
"results": {
"method1": {"tries": 13, "password": [2, 7, 3]},
"method2": {"tries": 12, "password": [2, 7, 3]},
"method3": {"tries": 12, "password": [2, 7, 3]}
}
}

12
pwd_output/pwd_019.json Normal file
View File

@ -0,0 +1,12 @@
{
"C": [
[2, 0]
],
"L": "a8b1a9f6741f4903c9f8e337849118532809ebdfb05aa9b99c3377d529c5579c",
"password": "783",
"results": {
"method1": {"tries": 191, "password": [7, 8, 3]},
"method2": {"tries": 387, "password": [7, 8, 3]},
"method3": {"tries": 75, "password": [7, 8, 3]}
}
}

14
pwd_output/pwd_020.json Normal file
View File

@ -0,0 +1,14 @@
{
"C": [
[1, 0],
[6, -1, -1],
[3, 0]
],
"L": "5fce2d1a75f54c4dbf70ac4ad3b1d66920f7209e0aae5982f893447cddc4ce58",
"password": "652",
"results": {
"method1": {"tries": 30, "password": [6, 5, 2]},
"method2": {"tries": 48, "password": [6, 5, 2]},
"method3": {"tries": 22, "password": [6, 5, 2]}
}
}

14
pwd_output/pwd_021.json Normal file
View File

@ -0,0 +1,14 @@
{
"C": [
[1, 1],
[2, 0],
[-1, -1, 8]
],
"L": "19350eedb2b07bedd0d604c04c26c7bd71f8b3dce8885a43df8085a9aa819bc0",
"password": "728",
"results": {
"method1": {"tries": 6, "password": [7, 2, 8]},
"method2": {"tries": 11, "password": [7, 2, 8]},
"method3": {"tries": 1, "password": [7, 2, 8]}
}
}

14
pwd_output/pwd_022.json Normal file
View File

@ -0,0 +1,14 @@
{
"C": [
[-1, -1, 2],
[1, 1],
[-1, 2, -1]
],
"L": "35276b964e7b1f91eb9634ad24a7ef260d2cfd7d7a354209492b132ad66574a4",
"password": "722",
"results": {
"method1": {"tries": 1, "password": [7, 2, 2]},
"method2": {"tries": 3, "password": [7, 2, 2]},
"method3": {"tries": 3, "password": [7, 2, 2]}
}
}

12
pwd_output/pwd_023.json Normal file
View File

@ -0,0 +1,12 @@
{
"C": [
[-1, 0, -1]
],
"L": "61399aa8f0e6d1336857bc64290db7a41af69edd7f8af6909bf981b539485ec8",
"password": "503",
"results": {
"method1": {"tries": 44, "password": [5, 0, 3]},
"method2": {"tries": 99, "password": [5, 0, 3]},
"method3": {"tries": 26, "password": [5, 0, 3]}
}
}

13
pwd_output/pwd_024.json Normal file
View File

@ -0,0 +1,13 @@
{
"C": [
[0, -1, -1],
[-1, 5, -1]
],
"L": "670544e235ad5f18b949f224bfdc86e9751fbfe04f9fa202144825342e6e9a1c",
"password": "051",
"results": {
"method1": {"tries": 3, "password": [0, 5, 1]},
"method2": {"tries": 2, "password": [0, 5, 1]},
"method3": {"tries": 5, "password": [0, 5, 1]}
}
}

14
pwd_output/pwd_025.json Normal file
View File

@ -0,0 +1,14 @@
{
"C": [
[3, 0],
[-1, -1, 2],
[1, 1]
],
"L": "4303efd52a6c11047de02002aced680808dbdd0c2c5ed6dc06f5d24f979d701b",
"password": "542",
"results": {
"method1": {"tries": 14, "password": [5, 4, 2]},
"method2": {"tries": 14, "password": [5, 4, 2]},
"method3": {"tries": 27, "password": [5, 4, 2]}
}
}

13
pwd_output/pwd_026.json Normal file
View File

@ -0,0 +1,13 @@
{
"C": [
[2, 0],
[3, 0]
],
"L": "dd21cbefcda693704ad8e8d8045d4bc01a2ba4875a8cc069a8105e5362b7f3b7",
"password": "226",
"results": {
"method1": {"tries": 95, "password": [2, 2, 6]},
"method2": {"tries": 32, "password": [2, 2, 6]},
"method3": {"tries": 212, "password": [2, 2, 6]}
}
}

12
pwd_output/pwd_027.json Normal file
View File

@ -0,0 +1,12 @@
{
"C": [
[-1, -1]
],
"L": "78cc114968ab659cb55dabd23e31d30186cf6529d6e7529cdfadb5940d5be8e5",
"password": "357",
"results": {
"method1": {"tries": 43, "password": [3, 5, 7]},
"method2": {"tries": 36, "password": [3, 5, 7]},
"method3": {"tries": 54, "password": [3, 5, 7]}
}
}

14
pwd_output/pwd_028.json Normal file
View File

@ -0,0 +1,14 @@
{
"C": [
[1, 1],
[-1, 1, -1],
[3, 1]
],
"L": "fd6c3f5085ea7aec0ea67683fd144303b0747091af782b246683811047e6dab8",
"password": "715",
"results": {
"method1": {"tries": 5, "password": [7, 1, 5]},
"method2": {"tries": 24, "password": [7, 1, 5]},
"method3": {"tries": 5, "password": [7, 1, 5]}
}
}

13
pwd_output/pwd_029.json Normal file
View File

@ -0,0 +1,13 @@
{
"C": [
[3, 0],
[-1, 3, -1]
],
"L": "5e9bf15c58b8a37d559a77155d431df6f5352071fea05a49abf84902ddc73f79",
"password": "538",
"results": {
"method1": {"tries": 25, "password": [5, 3, 8]},
"method2": {"tries": 42, "password": [5, 3, 8]},
"method3": {"tries": 21, "password": [5, 3, 8]}
}
}