解题链接

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之守株待兔解题思路的更多相关文章

  1. 记一次CTF比赛过程与解题思路-MISC部分

    前言 最近好久没更新博客和公众号了,有朋友问是不是在憋大招,但我不好意思说其实是因为最近一段时间太懒了,一直在当咸鱼- 意识到很久没更新这个问题,我是想写点什么的,但好像一直当咸鱼也没啥可分享的,最近 ...

  2. n皇后2种解题思路与代码-Java与C++实现

    林炳文Evankaka原创作品.转载请注明出处http://blog.csdn.net/evankaka 摘要:本文主要讲了n皇后问题的解题思路,并分别用java和c++实现了过程,最后,对于算法改进 ...

  3. 阿里聚安全攻防挑战赛第三题Android PwnMe解题思路

    阿里聚安全攻防挑战赛第三题Android PwnMe解题思路 大家在聚安全挑战赛正式赛第三题中,遇到android app 远程控制的题目.我们今天带你一探究竟,如何攻破这道题目. 一.题目 购物应用 ...

  4. [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 ...

  5. [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 ...

  6. [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 ...

  7. [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 ...

  8. [LeetCode] Minimum Size Subarray Sum 解题思路

    Given an array of n positive integers and a positive integer s, find the minimal length of a subarra ...

  9. [LeetCode] Word Break 解题思路

    Given a string s and a dictionary of words dict, determine if s can be segmented into a space-separa ...

随机推荐

  1. sort排序用法

    Python] sorted函数 我们需要对List.Dict进行排序,Python提供了两个方法对给定的List L进行排序,方法1.用List的成员函数sort进行排序,在本地进行排序,不返回副本 ...

  2. MyString

    [摘自C++程序设计语言] MyString.h #include <cstring> #include <iostream> #include <stdexcept&g ...

  3. 03.DataStructure

    01.list ''' list 특징 - 1차원 배열 구조 형식) 변수 = [값1, 값2] - 다양한 자료형 저장 가능 - index 사용=순서 존재 형식) 변수[n] - 값 수정( ...

  4. Codeforces 715B. Complete The Graph 最短路,Dijkstra,构造

    原文链接https://www.cnblogs.com/zhouzhendong/p/CF715B.html 题解 接下来说的“边”都指代“边权未知的边”. 将所有边都设为 L+1,如果dis(S,T ...

  5. Java 常用知识点

    Java 常用知识点 1.日期格式化 SimpleDateFormat Date date=new Date(System.currentTimeMillis()) ; SimpleDateForma ...

  6. pymongo使用手册

    MongoDB是由C++语言编写的非关系型数据库,是一个基于分布式文件存储的开源数据库系统,其内容存储形式类似JSON对象,它的字段值可以包含其他文档.数组及文档数组,非常灵活.在这一节中,我们就来看 ...

  7. JavaScript函数表达式与函数声明

    什么是函数? 函数是事件驱动或者被调用时执行的重复代码块. 作用域: 1. 全局作用域 2. 函数作用域(局部作用域) var i = 100; //全局作用域 function fun(){ var ...

  8. [LeetCode] Similar RGB Color 相似的红绿蓝颜色

    In the following, every capital letter represents some hexadecimal digit from 0 to f. The red-green- ...

  9. [LeetCode] Convert Binary Search Tree to Sorted Doubly Linked List 将二叉搜索树转为有序双向链表

    Convert a BST to a sorted circular doubly-linked list in-place. Think of the left and right pointers ...

  10. linux 中数据库的常用操作

    1-连接数据库: mysql -h localhost -u jiangbiao -p xxxxx@xxx:~$ mysql -h localhost -u jiangbiao -p Enter pa ...