Write-up

[SuNiNaTas] level 1

ch4rli3kop 2019. 4. 13. 21:43
반응형

Suninatas level 1

keyword : string manipulation

<%
   str = Request("str")

   If not str = "" Then
       result = Replace(str,"a","aad")
       result = Replace(result,"i","in")
       result1 = Mid(result,2,2)
       result2 = Mid(result,4,6)
       result = result1 & result2
       Response.write result
       If result = "admin" Then
           pw = "????????"
       End if
   End if
%>

요약해보면 a->aad, i->in이고 Mid(result, 2, 2)는 result가 abcde라면 bc를 리턴하는 함수이다. result = result1 & result2는 그냥 두 문자열을 이어주는 거라고 생각하면 될 것 같다.

위의 조건들에 부합하는 적당한 문자열 ami를 입력해주면 Solve.


반응형

'Write-up' 카테고리의 다른 글

[SuNiNaTas] level 3  (0) 2019.04.13
[SuNiNaTas] level 2  (0) 2019.04.13
[Lord Of BufferOverFlow] 1 ~ 20 (CLEAR)  (0) 2019.03.21
[bandit] bandit27 ~ bandit33 (CLEAR)  (0) 2019.02.28
[bandit] bandit19 ~ bandit27  (0) 2019.02.28