
GET파라미터, val에 위 정규식을 만족하는 문장을 넣어야 하는 모양이다.
지운 하얀색부분엔 내 아이피가 적혀있다. 정규식은 그럼 어떻게 읽어야하는가?
모두 다 알고 있으면 아주 좋겠으나 이제 배우는 사람도 있지 않겠나라고 말하지만 나도 읽을줄 모르니 내가 즐겨 사용하는 정규식 사이트에 들어가서 해설을 보도록 한다
[1-3] match a single character present in the list below 1-3 a single character in the range between 1 and 3 [a-f]{5} match a single character present in the list below Quantifier: {5} Exactly 5 times a-f a single character in the range between a and f (case sensitive) _ matches the character _ literally .* matches any character (except newline) Quantifier: * Between zero and unlimited times, as many times as possible, giving back as needed [greedy] (IP A) matches the characters 115 literally . matches any character (except newline) (IP B) matches the characters 145 literally . matches any character (except newline) (IP C) matches the characters 179 literally . matches any character (except newline) (IP D) matches the characters 30 literally .* matches any character (except newline) Quantifier: * Between zero and unlimited times, as many times as possible, giving back as needed [greedy] \t Tab (ASCII 9) p matches the character p literally (case sensitive) \t Tab (ASCII 9) a matches the character a literally (case sensitive) \t Tab (ASCII 9) s matches the character s literally (case sensitive) \t Tab (ASCII 9) s matches the character s literally (case sensitive)
해석이 나온다. 보기만해도 현기증이 나오는 영어들이지만 어쩌겠나
하나씩 보면,
[1-3] 은 1과 3사이의 숫자를 입력
[a-f] 는 a부터 f사이의 알파벳인데, 뒤에 {5}가 붙어있다. (5회 반복)
_는 말그대로 _를 붙이는거고,
.*는 any character를 넣어야 되니 그냥 알파벳을 아무거나 적어준다.
이후에 아이피들을 쭉 적어주고.
다시 .*가 나타나니 아무거나 적어준다. 지금까지 만들어진걸 보면 이런 모양이다.

깔끔하게 매치됐다. 문제는 뒤쪽인데, 탭문자가 들어가있다. 탭은 urlencode해서 넣어줘야한다. 요기서는 탭을 감지를 못한다.
url을 완성해서 엔터를 치면 끝. 대략 이런 모양이 된다.
http://webhacking.kr/challenge/codeing/code2.html?val=1fffff_f123.567.222.222a%09p%09a%09s%09s