CTFhub目錄遍歷
阿新 • • 發佈:2020-12-07
技術標籤:CTF
根據響應包長度判斷flag在哪裡
#! /usr/bin/env python
# _*_ coding:utf-8 _*_
import requests
url="http://challenge-72fb97d76e335ef0.sandbox.ctfhub.com:10080/flag_in_here"
url1="http://challenge-72fb97d76e335ef0.sandbox.ctfhub.com:10080/flag_in_here/1/1"
r1=requests.get(url1)
r1_len=len(r1.text)
for i in range(1,5):
for j in range(1,5):
url_test=url+"/"+str(i)+"/"+str(j)
r=requests.get(url_test)
get_file_len=len(r.text)
if r1_len != get_file_len:
print(url_test)