[ webhacking.kr ] 1번 old

sangjun

·

2022. 2. 2. 13:26

반응형

문제 소스

<?php
  include "../../config.php";
  if($_GET['view-source'] == 1){ view_source(); }
  if(!$_COOKIE['user_lv']){
    SetCookie("user_lv","1",time()+86400*30,"/challenge/web-01/");
    echo("<meta http-equiv=refresh content=0>");
  }
?>
<html>
<head>
<title>Challenge 1</title>
</head>
<body bgcolor=black>
<center>
<br><br><br><br><br>
<font color=white>
---------------------<br>
<?php
  if(!is_numeric($_COOKIE['user_lv'])) $_COOKIE['user_lv']=1;
  if($_COOKIE['user_lv']>=4) $_COOKIE['user_lv']=1;
  if($_COOKIE['user_lv']>3) solve(1);
  echo "<br>level : {$_COOKIE['user_lv']}";
?>
<br>
<a href=./?view-source=1>view-source</a>
</body>
</html>

 

문제 풀이

- user_lv 쿠키를 3.XX로 설정해주기

 

반응형

'War Games > webhacking.kr' 카테고리의 다른 글

[ webhacking.kr ] 2번 old  (0) 2022.02.02
[ webhacking.kr ] 50번 old  (6) 2022.01.26
[ webhacking.kr ] 51번 old  (0) 2022.01.26
[ webhacking.kr ] 52번 old  (0) 2022.01.26
[ webhacking.kr ] 53번 old  (0) 2022.01.26

0개의 댓글