> For the complete documentation index, see [llms.txt](https://hacking-notes.jord4n.pro/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hacking-notes.jord4n.pro/zh/web-vulnerabilities/race-condition-attack/race-condition-file-write-pentesting-web.md).

# 竞态条件文件写入

每次我们搜索一个目录时，都会 **shared-file.txt** 会创建一个文件并存储在：

<figure><img src="/files/05c6c6c164659279fb4c6213efc36cf443804c34" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/7d94e2bca490df11f42f1f94fe7c367e2ee4e337" alt=""><figcaption></figcaption></figure>

这是 **代码** 的 RaceCondition-file-write：

<figure><img src="/files/64d53df2ec51c6afe3557869233a9132d1d91f67" alt=""><figcaption></figcaption></figure>

1. 我们我们设置 **en 监听器请求** en 按我们感兴趣的字段进行过滤：

```bash
whithe true; do curl -s -X GET 'http://localhost:5000/test' | grep -v "test"; done

```

2. 从 [Burp Suite](/zh/hacking-tools/web/burpsuite.md)，我们同时向另一个 URL 发送多个请求：

<figure><img src="/files/b6fe3898e4a67fab5d3404f9f2bb4ce93dac5e67" alt=""><figcaption></figcaption></figure>

3. 因为它时不时会饱和，我们 **收到代码** 来自另一个文件：

<figure><img src="/files/3df0ec9e0d89749f86ecf90a072ea234a89ae5d8" alt=""><figcaption></figcaption></figure>


---

# 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, and the optional `goal` query parameter:

```
GET https://hacking-notes.jord4n.pro/zh/web-vulnerabilities/race-condition-attack/race-condition-file-write-pentesting-web.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
