> 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-automatisation-script-phpinfolfi.py-pentesting-web.md).

# 竞争条件 phpinfo LFI 自动化

我们使用一个自动化脚本来利用这些进程中的竞态条件。

{% embed url="<https://www.insomniasec.com/downloads/publications/phpinfolfi.py>" %}

#### 脚本的适配

我们根据具体情况调整脚本。

<figure><img src="/files/29e8f4282090358ae03e37fcf45486939e9cbf39" alt=""><figcaption></figcaption></figure>

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

#### 成功获取机器访问权限：

我们成功通过利用竞态条件获得对机器的访问权限。

<figure><img src="/files/3f7f210d40ac3c4c45ed3bb355c5b62d4c039cc3" 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-automatisation-script-phpinfolfi.py-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.
