> 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/pt-br/web-vulnerabilities/race-condition-attack/race-condition-file-write-pentesting-web.md).

# Escrita de arquivo por condição de corrida

Cada vez que pesquisamos um diretório, um **shared-file.txt** arquivo é criado e armazenado em:

<figure><img src="/files/6590d70d3c289f7fc0bcda0f20ff0b921b275fcd" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/717933ea7ddbb0b6aac233e190c45c0720fc2ff0" alt=""><figcaption></figcaption></figure>

Aqui está o **código** do RaceCondition-file-write:

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

1. nós definimos **nas solicitações do listener** na filtragem pelo campo que nos interessa:

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

```

2. De [Burp Suite](/pt-br/hacking-tools/web/burpsuite.md), enviamos várias solicitações ao mesmo tempo para outra URL:

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

3. Como ele fica saturado de tempos em tempos, nós **recebemos o código** de outro arquivo:

<figure><img src="/files/d331bb3e90a6f9077d984b34ed488e0264103632" 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/pt-br/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.
