Notice
Recent Posts
Recent Comments
Link
«   2026/02   »
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
Tags
more
Archives
Today
Total
관리 메뉴

cdor1's lab

Webhacking.kr 11번 본문

Security/Web

Webhacking.kr 11번

Cdor1 2017. 3. 27. 09:19

preg_match 함수로 $pat변수에 있는 정규식과 val이라는 입력값을 비교한다.


$pat="/[1-3][a-f]{5}_.*118.221.173.47.*\tp\ta\ts\ts/";

세 단위로 짤라서 보려고 한다.


정규식은 /로 시작해서 /로 끝난다.

[1-3][a-f]{5}

[1-3] == 1과3사이 한 문자

[a-f]{5} == a과f사이 문자 5번 반복


_.*118.221.173.47.*

_ == 그냥 _(정규식에 없음)

.* == 어떤 문자 0번이상 반복 (0번 이상이므로 상관x)

118.221.173.47 == 내ip


\tp\ta\ts\ts

\t반복 == \t는 url인코딩으로 %09

그러니까 %09p%09a%09s%09s


?val=1aaaaa_118.221.173.47%09p%09a%09s%09s

다 해주면 이렇게 뚝딱!

'Security > Web' 카테고리의 다른 글

Webhacking.kr 14번  (0) 2017.03.29
Webhacking.kr 12번  (0) 2017.03.28
Webhacking.kr 10번  (0) 2017.03.25
Webhacking.kr 8번  (0) 2017.03.24
Webhacking.kr 7번  (4) 2017.03.23
Comments