实验吧MD5之守株待兔解题思路
解题链接
http://ctf5.shiyanbar.com/misc/keys/keys.php
解题思路
首先我们多打开几次解题链接,发现系统密钥大约在一秒钟左右变一次,所以联想到时间戳。
解题过程
编写python脚本,然后执行得出答案
python脚本代码
import time
import requests
def getTime():
return str(int(time.time()))#获取当前的时间戳
def getFlag(time1):
url='http://ctf5.shiyanbar.com/misc/keys/keys.php?key='+time1
r=requests.get(url)
reponse = requests.get(url)
print(r.text)打印返回的网站数据
print(reponse)请求结果是否成功
for i in range(10):
getFlag(getTime())
执行脚本后我们可以发现有script中就是flag
对于网上的write up
我看了网上许多write up都是错误的
首先是脚本中不需要对MD5解压,所以也就没有必要引进hashlib库,更没有必要引进thread库。
还有就是很多write up里面写的是return str(int(time.time())+3)#获取三秒后的时间戳,这样写的话密钥永远对不上怎么能跑出flag,如果非要这样写那必须要在getFlag的第一行加入time.sleep(3)才能得到flag。
实验吧MD5之守株待兔解题思路的更多相关文章
- 记一次CTF比赛过程与解题思路-MISC部分
前言 最近好久没更新博客和公众号了,有朋友问是不是在憋大招,但我不好意思说其实是因为最近一段时间太懒了,一直在当咸鱼- 意识到很久没更新这个问题,我是想写点什么的,但好像一直当咸鱼也没啥可分享的,最近 ...
- n皇后2种解题思路与代码-Java与C++实现
林炳文Evankaka原创作品.转载请注明出处http://blog.csdn.net/evankaka 摘要:本文主要讲了n皇后问题的解题思路,并分别用java和c++实现了过程,最后,对于算法改进 ...
- 阿里聚安全攻防挑战赛第三题Android PwnMe解题思路
阿里聚安全攻防挑战赛第三题Android PwnMe解题思路 大家在聚安全挑战赛正式赛第三题中,遇到android app 远程控制的题目.我们今天带你一探究竟,如何攻破这道题目. 一.题目 购物应用 ...
- [LeetCode] 16. 3Sum Closest 解题思路
Given an array S of n integers, find three integers in S such that the sum is closest to a given num ...
- [LeetCode] 234. Palindrome Linked List 解题思路
Given a singly linked list, determine if it is a palindrome. Follow up:Could you do it in O(n) time ...
- [LeetCode] 76. Minimum Window Substring 解题思路
Given a string S and a string T, find the minimum window in S which will contain all the characters ...
- [LeetCode] 3Sum 解题思路
Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all un ...
- [LeetCode] Minimum Size Subarray Sum 解题思路
Given an array of n positive integers and a positive integer s, find the minimal length of a subarra ...
- [LeetCode] Word Break 解题思路
Given a string s and a dictionary of words dict, determine if s can be segmented into a space-separa ...
随机推荐
- [原创]基于Zynq AXI-Bram Standalone & Linux 例程
基于Zynq AXI-Bram Standalone & Linux 例程 待添加完善中
- neo4j 学习笔记
1.参考 https://blog.csdn.net/appleyk/article/category/7408344 系列文章 (不支持 spring boo 2.0 以下的,入门可做参考) 2.底 ...
- codeforces 493 div1 e
题解: 和这件zhcs的那题有点像 第一种做法是考虑i,i+1之间的贡献 这样子就是矩形加减然后求矩形最小值个数 另一种做法是我们从左向右维护mx-nx-r+l 跟之前那题一样我们知道这个的最小值为0 ...
- SQL反模式学习笔记20 明文密码
目标:恢复或重置密码 反模式:使用明文存储密码 1.存储密码 使用明文存储密码或者在网络上传递密码是不安全的. 如果攻击者截取到你用来插入(或者修改)密码的sql语句,就可以获得密码. 黑客获 ...
- webpack报错运行时没有定义
一.问题描述 ReferenceError: regeneratorRuntime is not defined 二.问题分析 缺少regenerator的运行时库,具体原理,可查看babel文章. ...
- Python中re的match、search、findall、finditer区别
原文地址: http://blog.csdn.net/djskl/article/details/44357389 这四个方法是从某个字符串中寻找特定子串或判断某个字符串是否符合某个模式的常用方法. ...
- Python 之map、filter、reduce
MAP 1.Python中的map().filter().reduce() 这三个是应用于序列的内置函数,这个序列包括list.tuple.str. 格式: 1>map(func,swq1[,s ...
- [LeetCode] Card Flipping Game 翻卡片游戏
On a table are N cards, with a positive integer printed on the front and back of each card (possibly ...
- Java正则表达式过滤并消除非法字符
package sd; import java.util.regex.Matcher; import java.util.regex.Pattern; /** * * @author 大汉 * */ ...
- python全栈开发 * 继承性 层叠性 盒模型 标准文档流 * 180809
---恢复内容开始--- 一继承性 1.继承: 给父级设置一些属性,子级继承了父级的该属性,这就是我们的css中的继承. 2. 可继承: color . font-*(size). text-*(de ...