> For the complete documentation index, see [llms.txt](https://docs.cooku222.kr/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cooku222.kr/security/web-hacking/dreamhack/dreamhack-simple-web-request.md).

# \[Dreamhack] simple-web-request

문제 출처: <https://dreamhack.io/wargame/challenges/830>

***

#### 문제

<figure><img src="https://blog.kakaocdn.net/dna/wVVM8/btsD26OYZnQ/AAAAAAAAAAAAAAAAAAAAAG_28hLH2Dtdn2aAg84kb6K790zDaWC_9YVDoa0g2CZm/img.jpg?credential=yqXZFxpELC7KVnFOS48ylbz2pIh7yKj8&#x26;expires=1782831599&#x26;allow_ip=&#x26;allow_referer=&#x26;signature=DuE81bh%2Fiapr20hPL4fJaK77rBI%3D" alt="" height="706" width="1011"><figcaption></figcaption></figure>

&#x20;

#### 풀이

코드 안에 답이 있다.&#x20;

```
if prm1 == "getget" and prm2 == "rerequest";
    return redirect(url_for("step2", prev_step_num = step1_num))
```

해당 코드대로

<figure><img src="https://blog.kakaocdn.net/dna/lcf64/btsD26OY28e/AAAAAAAAAAAAAAAAAAAAAJa7K0A4b6uYeqo6hOFlJ8BZXOF5Sdw7560_cz0VIpGe/img.jpg?credential=yqXZFxpELC7KVnFOS48ylbz2pIh7yKj8&#x26;expires=1782831599&#x26;allow_ip=&#x26;allow_referer=&#x26;signature=qIwWxiqh7QPdKpl6BtUFKFAEx4o%3D" alt="" height="283" width="723"><figcaption></figcaption></figure>

를 입력해주면 다음 단계로 쉽게 넘어갈 수 있다.

```
if prm1 == "pooost" and prm2 == "requeeest":
    return render_template("flag.html", flag_txt=FLAG)
```

마찬가지로 다음 단계도 똑같이 진행해준다. \
이번에는 pooost와 requeeest를 커맨드 창에 입력해주면 된다.

<figure><img src="https://blog.kakaocdn.net/dna/w1pPu/btsD4t3AEh6/AAAAAAAAAAAAAAAAAAAAAPO2OqAa4TlcZbxgnbDQicmj4pWetbo245u_ME6XMdHh/img.jpg?credential=yqXZFxpELC7KVnFOS48ylbz2pIh7yKj8&#x26;expires=1782831599&#x26;allow_ip=&#x26;allow_referer=&#x26;signature=mp84bM2%2BOTWvUuEj8RnzGqLDEqU%3D" alt="" height="243" width="378"><figcaption></figcaption></figure>

<figure><img src="https://blog.kakaocdn.net/dna/boubJ6/btsD3Mvxxbk/AAAAAAAAAAAAAAAAAAAAAGPX6w7uDZL_bikQWPFa3hC2tI559xwZyMfTIdvjSdM0/img.png?credential=yqXZFxpELC7KVnFOS48ylbz2pIh7yKj8&#x26;expires=1782831599&#x26;allow_ip=&#x26;allow_referer=&#x26;signature=McDLpcGKH%2BsZsg5CyumN%2BEkGl50%3D" alt="" height="156" width="697"><figcaption></figcaption></figure>

플래그 값을 쉽게 얻을 수 있는 문제였다.

<br>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cooku222.kr/security/web-hacking/dreamhack/dreamhack-simple-web-request.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
