> 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/type-juggling-attack/type-juggling-md5-et-pentesting-web.md).

# 类型混淆 MD5

> 如果 MD5 密码以 `0e`开头，它会被存储在一个变量中，并且由于 **“魔法数字”** 而在宽松相等比较中变得脆弱，这些值都会被类似地求值。例如，在 PHP 中，以数字开头的字符串在用于数值比较时会自动转换为数字。因此，如果攻击者提供一个以 0 开头的字符串，例如 `00123`，程序会将其转换为整数 `123`.

<figure><img src="/files/8f053014c0562d5a83e4f18a8692a701e7d62a6b" alt="" width="437"><figcaption></figcaption></figure>

下面是几个包含“魔法数字”的密码示例：

<figure><img src="/files/16c555a582f208ae9a5dd241c0c3e31457b595fd" 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/type-juggling-attack/type-juggling-md5-et-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.
