当前位置: 首页 > news >正文

[HUBUCTF 2022 新生赛]help

感受:

1,未知参数可以动调

2,解题可以手搓(无奈之举)

3,可以用脚本

过程

无壳,直接丢IDA里

看到

三个地方,生成迷宫,走迷宫,md5加密

看生成迷宫

下断点,调试出来,甚至不用理解,还是要知道是16*16的迷宫

就是脚本了

maze = [[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[1,0,0,0,0,0,1,1,1,1,1,1,0,1,1,1],[1,0,1,1,1,0,1,1,1,1,1,1,0,1,1,1],[1,0,1,1,1,0,1,1,0,0,0,1,0,1,1,1],[1,0,1,1,1,0,1,1,0,1,0,1,0,1,1,1],[1,0,1,1,1,0,0,0,0,1,0,1,0,1,1,1],[1,0,1,1,1,1,1,1,0,1,0,1,0,1,1,1],[1,0,1,1,1,1,1,1,0,0,0,1,0,1,1,1],[1,0,1,1,1,1,1,1,1,0,1,1,0,1,1,1],[1,0,1,1,1,1,1,1,1,0,1,1,0,1,1,1],[1,0,0,0,0,1,1,0,0,0,0,1,0,0,0,1],[1,1,1,1,0,1,1,1,1,0,1,1,0,1,0,1],[1,1,1,1,0,1,1,1,1,0,1,1,0,1,0,1],[1,0,0,0,0,1,1,1,1,0,1,1,0,1,0,0],[1,0,1,1,1,1,1,1,1,0,0,0,0,1,1,1],[1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1],
]#二维地图可换path_len = 0x7fffffff  # 不限制路径长度def bfs(start, end, barrier):directions = [(0, 1), (1, 0), (0, -1), (-1, 0)]for i in range(len(maze)):for j in range(len(maze[i])):if maze[i][j] == start:start = (i, j)if maze[i][j] == end:end = (i, j)queue = deque()queue.append((start, [start]))visited = set()visited.add(start)while queue:position, path = queue.popleft()if position == end:return pathelif len(path) == path_len:return pathfor d in directions:next_position = (position[0] + d[0], position[1] + d[1])if 0 <= next_position[0] < len(maze) and 0 <= next_position[1] < len(maze[0]) and \maze[next_position[0]][next_position[1]] != barrier and next_position not in visited:queue.append((next_position, path + [next_position]))visited.add(next_position)return Noneif __name__ == '__main__':maze[15][1] = 'S'  # 起点maze[13][15] = 'E'  # 终点path = bfs('S', 'E', 1)print("移动路径坐标:", path)print("移动路径方位:{", end='')for i in range(1, len(path)):x1, y1 = path[i - 1]x2, y2 = path[i]if x1 > x2: print("w", end='')elif x1 < x2: print("s", end='')elif y1 > y2: print("a", end='')elif y1 < y2: print("d", end='')print('}')

文章转载自:

http://6WPL2nAf.qcsbs.cn
http://RD25HenP.qcsbs.cn
http://4l6qFphi.qcsbs.cn
http://qLOqbf1c.qcsbs.cn
http://rJvQc56l.qcsbs.cn
http://fX5Ra01Z.qcsbs.cn
http://cv9e3trv.qcsbs.cn
http://Yn1scuL0.qcsbs.cn
http://0wLU6Giv.qcsbs.cn
http://ILr7Ruas.qcsbs.cn
http://mxRDCAzR.qcsbs.cn
http://y7ywJDEG.qcsbs.cn
http://VpL2beeI.qcsbs.cn
http://7nsQ5BOj.qcsbs.cn
http://iF6CNSHT.qcsbs.cn
http://bhzQTRBU.qcsbs.cn
http://C0nnL89p.qcsbs.cn
http://weHsLGtR.qcsbs.cn
http://yGqTQuBc.qcsbs.cn
http://NUeSxII6.qcsbs.cn
http://3PZexEjB.qcsbs.cn
http://3oXyVNuq.qcsbs.cn
http://oFANXOJI.qcsbs.cn
http://hTqsArTp.qcsbs.cn
http://jAWPyk2p.qcsbs.cn
http://J5W2vWJ7.qcsbs.cn
http://nyi7uVd7.qcsbs.cn
http://Bp36S8PN.qcsbs.cn
http://97OjDuGy.qcsbs.cn
http://DzmCMTxp.qcsbs.cn
http://www.dtcms.com/a/376072.html

相关文章:

  • Matlab机器人工具箱6.1 导入stl模型——用SerialLink描述
  • 大数据存储域——Kafka设计原理
  • B站 韩顺平 笔记 (Day 28)
  • Biomedical HPC+AI Platform:48款计算生物学工具集成的一站式高性能在线平台,赋能药物发现
  • Linux 基础 IO 核心知识总结:从系统调用到缓冲区机制(一)
  • 滴滴二面(准备二)
  • leetcode14(判断子序列)
  • 深度学习基本模块:Conv2D 二维卷积层
  • spring中case一直返回else中的值-问题和原理详解
  • 传输层:UDP/TCP协议
  • Java学习之——“IO流“的进阶流之序列化流的学习
  • LeetCode 面试经典 150 题:轮转数组(三次翻转法详解 + 多解法对比)
  • 什么是PFC控制器
  • 【卷积神经网络详解与实例3】——池化与反池化操作
  • Bean的生命周期 高频考点!
  • Redis 主从复制详解:原理、配置与主从切换实战
  • Java锁机制全解析:从AQS到CAS,深入理解synchronized与ReentrantLock
  • 基于SpringBoot的天气预报系统的设计与实现
  • Android 14 servicemanager的前世今生
  • TC_Motion多轴运动-电子齿轮
  • webrtc弱网-DelayBasedBwe 类源码分析与算法原理
  • 【Floor报错注入】
  • Docker生产部署
  • 小型语言模型:智能体AI的未来?
  • js垃圾回收机制
  • STM32开发(USART总线:UART总线)
  • Typescript - 通俗易懂的 interface 接口,创建接口 / 基础使用 / 可选属性 / 只读属性 / 任意属性(详细教程)
  • FastGPT源码解析 Agent 智能体应用创建流程和代码分析
  • [网络入侵AI检测] 模型性能评估与报告
  • chmod与chown命令的深度解析